public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf c2c report: Fix crash for empty browser
@ 2018-07-24  6:20 Jiri Olsa
  2018-07-26 19:30 ` Arnaldo Carvalho de Melo
  2018-08-02  8:12 ` [tip:perf/core] " tip-bot for Jiri Olsa
  0 siblings, 2 replies; 7+ messages in thread
From: Jiri Olsa @ 2018-07-24  6:20 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra, rodia

Do not try to display entry details if there's
not any. Currently this ends up in crash:
  $ perf c2c report
  perf: Segmentation fault

Reported-by: rodia@autistici.org
Link: http://lkml.kernel.org/n/tip-3d7qjz9x49ay9ncerfordcv3@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/builtin-c2c.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index f2ea85ee573f..f3aa9d02a5ab 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -2349,6 +2349,9 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he)
 	" s             Toggle full length of symbol and source line columns \n"
 	" q             Return back to cacheline list \n";
 
+	if (!he)
+		return 0;
+
 	/* Display compact version first. */
 	c2c.symbol_full = false;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-08-02  8:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-24  6:20 [PATCH] perf c2c report: Fix crash for empty browser Jiri Olsa
2018-07-26 19:30 ` Arnaldo Carvalho de Melo
2018-07-26 23:31   ` rodia
2018-07-27  7:06     ` Jiri Olsa
2018-07-27 14:13       ` Arnaldo Carvalho de Melo
2018-07-29 17:05         ` Jiri Olsa
2018-08-02  8:12 ` [tip:perf/core] " tip-bot for Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox