diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-11-09 16:04:26 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-11-28 14:20:45 -0300 |
commit | 501e5bbec3c19498fa520fd3ffd68bd907f31bf7 (patch) | |
tree | d5528250b6b231c5df03e652470c6630f2ac8218 /lib | |
parent | 8e2d8e204247aa9eeb87893f6b8bf0cf29428b31 (diff) | |
download | linux-501e5bbec3c19498fa520fd3ffd68bd907f31bf7.tar.gz linux-501e5bbec3c19498fa520fd3ffd68bd907f31bf7.tar.bz2 linux-501e5bbec3c19498fa520fd3ffd68bd907f31bf7.zip |
perf script: Fix --per-event-dump for auxtrace synth evsels
When processing PERF_RECORD_AUXTRACE_INFO several perf_evsel entries
will be synthesized and inserted into session->evlist, eventually ending
in perf_script.tool.sample(), which ends up calling builtin-script.c's
process_event(), that expects evsel->priv to be a perf_evsel_script
object with a valid FILE pointer in fp.
So we need to intercept the processing of PERF_RECORD_AUXTRACE_INFO and
then setup evsel->priv for these newly created perf_evsel instances, do
it to fix the segfault in process_event() trying to use a NULL for that
FILE pointer.
Reported-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: yuzhoujian <yuzhoujian@didichuxing.com>
Fixes: a14390fde64e ("perf script: Allow creating per-event dump files")
Link: http://lkml.kernel.org/n/tip-bthnur8r8de01gxvn2qayx6e@git.kernel.org
[ Merge fix by Ravi Bangoria before pushing upstream to preserv bisectability ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions