Skip to contentSkip to conversation

perf report: Fix segmentation fault when running with '-g none'

PATCH In review Yong Wang 1 participant 2 messages Jan 22, 2010 – Jan 27, 2010 perf events

lore
Share & tools
lore

Yong Wang

author
#0 lore raw

PATCH 1/1 perf report: Fix segmentation fault when running with '-g none'

Segmentation fault occurs when running perf report with '-g none':

Starting program: /root/perf report -g none

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x0808fbb9 in perf_session__insert_output_hist_entry (
min_callchain_hits=<value optimized out>, he=<value optimized out>, root=<value optimized out>) at util/hist.c:169
#2 perf_session__output_resort (min_callchain_hits=<value optimized out>,
he=<value optimized out>, root=<value optimized out>) at util/hist.c:204

#3  0x080575e9 in __cmd_report () at builtin-report.c:228
#4  cmd_report () at builtin-report.c:385
#5  0x0804b528 in run_builtin (p=0x8146b88, argc=3, argv=0xbffff818)
    at perf.c:263
#6  0x0804bd0b in handle_internal_command (argv=<value optimized out>,
    argc=<value optimized out>) at perf.c:328
#7  run_argv (argv=<value optimized out>, argc=<value optimized out>)
    at perf.c:372

#8 main (argv=<value optimized out>, argc=<value optimized out>) at perf.c:456

---
 tools/perfbuiltin-report.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-report.c +1 -1
index 4c3d699..cfc655d 100644
@@ -279,7 +279,7 @@ parse_callchain_opt(const struct option *opt __used, const char *arg,
 
 	else if (!strncmp(tok, "none", strlen(arg))) {
 		callchain_param.mode = CHAIN_NONE;
-		symbol_conf.use_callchain = true;
+		symbol_conf.use_callchain = false;
 
 		return 0;
 	}
#1 lore raw
Commit-ID:  b7ae11b34bf042cfb4dbaa3b63b2d5d6d33d4cc4
Gitweb:     http://git.kernel.org/tip/b7ae11b34bf042cfb4dbaa3b63b2d5d6d33d4cc4
Author:     Yong Wang <[email protected]>
AuthorDate: Fri, 22 Jan 2010 09:47:50 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 27 Jan 2010 11:01:43 +0100

perf report: Fix segmentation fault when running with '-g none'

Segmentation fault occurs when running perf report with '-g none'.

Cc Peter Zijlstra <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Frederic Weisbecker <[email protected]>

LKML-Reference: <[email protected]>

---
 tools/perf/builtin-report.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/builtin-report.c +1 -1
index db10c0e..860f1ee 100644
@@ -269,7 +269,7 @@ parse_callchain_opt(const struct option *opt __used, const char *arg,
 
 	else if (!strncmp(tok, "none", strlen(arg))) {
 		callchain_param.mode = CHAIN_NONE;
-		symbol_conf.use_callchain = true;
+		symbol_conf.use_callchain = false;
 
 		return 0;
 	}