File: autoconf-perf-structpid.c

package info (click to toggle)
systemtap 1.7-1%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 18,448 kB
  • sloc: ansic: 43,401; cpp: 42,120; exp: 12,293; sh: 8,703; xml: 7,522; perl: 2,088; tcl: 954; python: 912; makefile: 625; ruby: 419; awk: 94; asm: 73; sed: 16
file content (14 lines) | stat: -rw-r--r-- 444 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <linux/perf_event.h>

void fn (void) {
  struct perf_event_attr *attr = NULL;
  int cpu = 0;
  struct task_struct *tsk = NULL;
  perf_overflow_handler_t callback = NULL;

  /* linux-2.6 commit 38a81da2205f94 */
  (void) perf_event_create_kernel_counter(attr,
                                   cpu,                  
                                   tsk, /* as opposed to int pid */
                                   callback);  
}