runtime/linux/autoconf-perf-structpid.c
raw| 1 | #include <linux/perf_event.h> |
| 2 | |
| 3 | void fn (void); |
| 4 | |
| 5 | void fn (void) { |
| 6 | struct perf_event_attr *attr = NULL; |
| 7 | int cpu = 0; |
| 8 | struct task_struct *tsk = NULL; |
| 9 | perf_overflow_handler_t callback = NULL; |
| 10 | |
| 11 | /* linux-2.6 commit 38a81da2205f94 */ |
| 12 | (void) perf_event_create_kernel_counter(attr, |
| 13 | cpu, |
| 14 | tsk, /* as opposed to int pid */ |
| 15 | callback); |
| 16 | } |