diff options
Diffstat (limited to 'tools/perf/perf.h')
-rw-r--r-- | tools/perf/perf.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index af0a5046d743..87a1aca4a424 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h | |||
@@ -53,11 +53,12 @@ static inline unsigned long long rdclock(void) | |||
53 | _min1 < _min2 ? _min1 : _min2; }) | 53 | _min1 < _min2 ? _min1 : _min2; }) |
54 | 54 | ||
55 | static inline int | 55 | static inline int |
56 | sys_perf_counter_open(struct perf_counter_attr *attr_uptr, | 56 | sys_perf_counter_open(struct perf_counter_attr *attr, |
57 | pid_t pid, int cpu, int group_fd, | 57 | pid_t pid, int cpu, int group_fd, |
58 | unsigned long flags) | 58 | unsigned long flags) |
59 | { | 59 | { |
60 | return syscall(__NR_perf_counter_open, attr_uptr, pid, cpu, | 60 | attr->size = sizeof(*attr); |
61 | return syscall(__NR_perf_counter_open, attr, pid, cpu, | ||
61 | group_fd, flags); | 62 | group_fd, flags); |
62 | } | 63 | } |
63 | 64 | ||