perf tools: Don't try to lookup objdump for live mode
Namhyung Kim
maintainerPATCH 1/1 perf tools: Don't try to lookup objdump for live mode
From: Namhyung Kim <[email protected]>
Arnaldo reported that annotation during perf top resulted in a segfault. It was because the env->arch was NULL and we don't set it for a live session. In fact, no need to look up objdump in this case since we can use system's default (native) objdump.
Reported-by Arnaldo Carvalho de Melo <[email protected]>
Cc David Ahern <[email protected]>
Cc Irina Tirdea <[email protected]>
Signed-off-by Namhyung Kim <[email protected]>
--- tools/perf/arch/common.c | 7 +++++++ 1 file changed, 7 insertions(+)
tools/perf/arch/common.c +7 -0
@@ -199,6 +199,13 @@ out_error:int perf_session_env__lookup_objdump (struct perf_session_env *env) { +/* +* For live mode, env->arch will be NULL and we can use +* the native objdump tool. +*/ +if (env->arch ==NULL ) +return 0 ; +return perf_session_env__lookup_binutils_path (env,"objdump" , &objdump_path); }
Signature · 1 line
1.7.11.7
[tip:perf/core] perf tools: Don' t try to lookup objdump for live mode
Commit-ID: ff6f7778a66edc033044a6baa2459ce79519e571 Gitweb: http://git.kernel.org/tip/ff6f7778a66edc033044a6baa2459ce79519e571 Author: Namhyung Kim <[email protected]> AuthorDate: Wed, 7 Nov 2012 10:30:15 +0900 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 8 Nov 2012 17:26:52 -0300
perf tools: Don't try to lookup objdump for live mode
Arnaldo reported that annotation during perf top resulted in a segfault. It was because the env->arch was NULL and we don't set it for a live session. In fact, no need to look up objdump in this case since we can use system's default (native) objdump.
Reported-by Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by Namhyung Kim <[email protected]>
Cc David Ahern <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Irina Tirdea <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/arch/common.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
tools/perf/arch/common.c +7 -0
@@ -199,6 +199,13 @@ out_error:int perf_session_env__lookup_objdump (struct perf_session_env *env) { +/* +* For live mode, env->arch will be NULL and we can use +* the native objdump tool. +*/ +if (env->arch ==NULL ) +return 0 ; +return perf_session_env__lookup_binutils_path (env,"objdump" , &objdump_path); }