Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1382644 > unrolled thread

[PATCH 03/14] perf script: Check sample->callchain before using it

Started byArnaldo Carvalho de Melo <acme@kernel.org>
First post2016-04-19 18:00 +0200
Last post2016-04-19 18:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 03/14] perf script: Check sample->callchain before using it Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-19 18:00 +0200

#1382644 — [PATCH 03/14] perf script: Check sample->callchain before using it

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-04-19 18:00 +0200
Subject[PATCH 03/14] perf script: Check sample->callchain before using it
Message-ID<rpGef-KT-39@gated-at.bofh.it>
From: Arnaldo Carvalho de Melo <acme@redhat.com>

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

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-6r8i2afd3523thuuaxl39yhk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web