From: Jiri Olsa Date: Sun, 10 Jul 2016 11:07:55 +0000 (+0200) Subject: perf python: Init perf_event_attr::size in perf.evsel constructor X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ad4e3c04587c01c2e2b00c0e6a414dbededa6c55;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf python: Init perf_event_attr::size in perf.evsel constructor Currently 0 is passed as perf_event_attr::size, which could block usage of new features. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1468148882-10362-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 65c6c73d28fe..d0c1267741ee 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -653,6 +653,7 @@ static int pyrf_evsel__init(struct pyrf_evsel *pevsel, attr.precise_ip = precise_ip; attr.mmap_data = mmap_data; attr.sample_id_all = sample_id_all; + attr.size = sizeof(attr); perf_evsel__init(&pevsel->evsel, &attr, idx); return 0;