* [tip:perf/core] perf script: Check sample->callchain before using it
@ 2016-04-23 13:01 tip-bot for Arnaldo Carvalho de Melo
0 siblings, 0 replies; only message in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2016-04-23 13:01 UTC (permalink / raw)
To: linux-tip-commits
Cc: hpa, milian.wolff, linux-kernel, tglx, wangnan0, jolsa, mingo,
adrian.hunter, acme, namhyung, dsahern
Commit-ID: 922315210b8007a26374e30712813b714af71cac
Gitweb: http://git.kernel.org/tip/922315210b8007a26374e30712813b714af71cac
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Mon, 18 Apr 2016 11:31:46 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 18 Apr 2016 11:31:46 -0300
perf script: Check sample->callchain before using it
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 0e93282b..5099740 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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-23 13:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-23 13:01 [tip:perf/core] perf script: Check sample->callchain before using it tip-bot for Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox