summaryrefslogtreecommitdiffstats
path: root/tools/perf/perf.h
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2012-02-09 16:12:38 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-02-14 02:35:04 +0100
commit7e1ccd3804281fc0755eb726b654469c40a96d89 (patch)
treedd262703dfc95983c4a8308b5f40fb41b404a1a6 /tools/perf/perf.h
parentperf tools: Factor out feature op to process header sections (diff)
downloadlinux-7e1ccd3804281fc0755eb726b654469c40a96d89.tar.xz
linux-7e1ccd3804281fc0755eb726b654469c40a96d89.zip
perf tools: cleanup initialization of attr->size
The perf_event_attr size needs to be initialized in all cases because it captures the ABI version. This patch moves the initialization of the field from the perf_event_open() syscall stub to its proper location in the event_attr_init(). Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20120209151238.GA10272@quad Signed-off-by: Stephane Eranian <eranian@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/perf.h')
-rw-r--r--tools/perf/perf.h1
1 files changed, 0 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,
pid_t pid, int cpu, int group_fd,
unsigned long flags)
{
- attr->size = sizeof(*attr);
return syscall(__NR_perf_event_open, attr, pid, cpu,
group_fd, flags);
}