diff options
author | Adrian Hunter <[email protected]> | 2015-08-20 11:26:45 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2015-08-21 10:29:22 -0300 |
commit | 05169df5561363ff04ac04d6aad0be3b45c26ac1 (patch) | |
tree | 2c749cd6f9ffdce0295e2f37f6f878e89618bbd6 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 82819ffb42fb45197bacf3223191deca31d3eb91 (diff) |
perf script: Fix segfault using --show-mmap-events
Patch "perf script: Don't assume evsel position of tracking events"
changed 'perf script' to use 'perf_evlist__id2evsel()'. That results
in a segfault if there is more than 1 event and there are
synthesized mmap events e.g.
$ perf record -e cycles,instructions -p$$ sleep 1
$ perf script --show-mmap-events
Segmentation fault (core dumped)
That happens because these synthesized events have an 'id' of zero
which does not match any 'evsel'.
Currently, these synthesized events use the sample type of the first
evsel.
Change 'perf_evlist__id2evsel()' to reflect that which also makes
it consistent with 'perf_evlist__event2evsel()'.
Signed-off-by: Adrian Hunter <[email protected]>
Fixes: 06b234ec26fd ("perf script: Don't assume evsel position of tracking events")
Cc: Jiri Olsa <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions