From: Arnaldo Carvalho de Melo <a...@redhat.com>

Found by code inspection, while looking at thread__resolve_callchain()
callsites, one had it, the other didn't.

Cc: Adrian Hunter <adrian.hun...@intel.com>
Cc: David Ahern <dsah...@gmail.com>
Cc: Jiri Olsa <jo...@kernel.org>
Cc: Milian Wolff <milian.wo...@kdab.com>
Cc: Namhyung Kim <namhy...@kernel.org>
Cc: Wang Nan <wangn...@huawei.com>
Link: http://lkml.kernel.org/n/tip-6r8i2afd3523thuuaxl39...@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com>
---
 tools/perf/builtin-script.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 0e93282b405e..5099740aa50b 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -791,7 +791,7 @@ static void process_event(struct perf_script *script,
        if (PRINT_FIELD(IP)) {
                struct callchain_cursor *cursor = NULL, cursor_callchain;
 
-               if (symbol_conf.use_callchain &&
+               if (symbol_conf.use_callchain && sample->callchain &&
                    thread__resolve_callchain(al->thread, &cursor_callchain, 
evsel,
                                              sample, NULL, NULL, 
scripting_max_stack) == 0)
                        cursor = &cursor_callchain;
-- 
2.5.5

Reply via email to