diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-05-22 09:34:54 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-26 07:53:05 -0400 |
commit | f3e08c5341c528284460530b546608f27232f737 (patch) | |
tree | d7406bf51c704a1e7385575b726edb358076766d /Documentation/perf_counter | |
parent | ce7e43653b08db094326f378958bc293a68e8e5b (diff) |
perf report: Fix segfault on unknown symbols
Ingo reported:
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000003e25080f80 in strlen () from /lib64/libc.so.6
> Missing separate debuginfos, use: debuginfo-install elfutils.x86_64
> glibc.x86_64 zlib.x86_64
> (gdb) bt
> #0 0x0000003e25080f80 in strlen () from /lib64/libc.so.6
> #1 0x0000003e2506954e in fputs () from /lib64/libc.so.6
> #2 0x00000000004059e8 in cmd_report (argc=<value optimized out>,
> argv=<value optimized out>) at builtin-report.c:521
> #3 0x0000000000402dad in handle_internal_command (argc=1, argv=0x7fffe1218e30)
> at perf.c:226
> #4 0x0000000000402f6d in main (argc=1, argv=0x7fffe1218e30) at perf.c:324
> (gdb)
Signed-off-by Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter')
-rw-r--r-- | Documentation/perf_counter/builtin-report.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c index e857201e1e0f..21386a8c6f62 100644 --- a/Documentation/perf_counter/builtin-report.c +++ b/Documentation/perf_counter/builtin-report.c | |||
@@ -518,7 +518,7 @@ static size_t symhist__fprintf(struct symhist *self, FILE *fp) | |||
518 | size_t ret = fprintf(fp, "%#llx [%c] ", (unsigned long long)self->ip, self->level); | 518 | size_t ret = fprintf(fp, "%#llx [%c] ", (unsigned long long)self->ip, self->level); |
519 | 519 | ||
520 | if (self->level != '.') | 520 | if (self->level != '.') |
521 | ret += fprintf(fp, "%s", self->sym->name); | 521 | ret += fprintf(fp, "%s", self->sym ? self->sym->name: "<unknown>"); |
522 | else | 522 | else |
523 | ret += fprintf(fp, "%s: %s", | 523 | ret += fprintf(fp, "%s: %s", |
524 | self->dso ? self->dso->name : "<unknown", | 524 | self->dso ? self->dso->name : "<unknown", |