Commit 91557e847dbc715acf2d847a1ffec63f71b00b65
1 parent
063e047761
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
perf report: Use the right symbol for annotation
In non symbolic views, i.e. --sort without "symbol", as in: perf report --sort comm We're segfaulting in the --tui because we're testing the symbol resolved and then trying to use the symbol on the histogram entry where we're coalescing all hits for a COMM, and the first hist_entry for a comm may have a NULL symbol, i.e. the RIP didn't resolve to any symbol. In this case we're segfaulting, fix it by testing against the symbol in the histogram entry. Reported-by: William Cohen <wcohen@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-8ylwubbcmu27ucc9ffrku3yv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
tools/perf/builtin-report.c
... | ... | @@ -162,7 +162,7 @@ |
162 | 162 | * so we don't allocated the extra space needed because the stdio |
163 | 163 | * code will not use it. |
164 | 164 | */ |
165 | - if (al->sym != NULL && use_browser > 0) { | |
165 | + if (he->ms.sym != NULL && use_browser > 0) { | |
166 | 166 | struct annotation *notes = symbol__annotation(he->ms.sym); |
167 | 167 | |
168 | 168 | assert(evsel != NULL); |