diff options
| -rw-r--r-- | tools/perf/perf.h | 1 | ||||
| -rw-r--r-- | tools/perf/util/util.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index deb17dba4a5b..03a045618148 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h | |||
| @@ -167,7 +167,6 @@ sys_perf_event_open(struct perf_event_attr *attr, | |||
| 167 | pid_t pid, int cpu, int group_fd, | 167 | pid_t pid, int cpu, int group_fd, |
| 168 | unsigned long flags) | 168 | unsigned long flags) |
| 169 | { | 169 | { |
| 170 | attr->size = sizeof(*attr); | ||
| 171 | return syscall(__NR_perf_event_open, attr, pid, cpu, | 170 | return syscall(__NR_perf_event_open, attr, pid, cpu, |
| 172 | group_fd, flags); | 171 | group_fd, flags); |
| 173 | } | 172 | } |
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index fb25d1329218..8109a907841e 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c | |||
| @@ -14,6 +14,8 @@ void event_attr_init(struct perf_event_attr *attr) | |||
| 14 | attr->exclude_host = 1; | 14 | attr->exclude_host = 1; |
| 15 | if (!perf_guest) | 15 | if (!perf_guest) |
| 16 | attr->exclude_guest = 1; | 16 | attr->exclude_guest = 1; |
| 17 | /* to capture ABI version */ | ||
| 18 | attr->size = sizeof(*attr); | ||
| 17 | } | 19 | } |
| 18 | 20 | ||
| 19 | int mkdir_p(char *path, mode_t mode) | 21 | int mkdir_p(char *path, mode_t mode) |
