linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] perf report: Show error message when processing sample fails
@ 2015-11-27 17:32 Namhyung Kim
  2015-11-27 17:32 ` [PATCH 2/3] perf hist: Do not skip elided fields when processing samples Namhyung Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Namhyung Kim @ 2015-11-27 17:32 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, Peter Zijlstra, Jiri Olsa, LKML, David Ahern

Currently when perf fails to process samples for some reason, it doesn't
show any message about the failure.  This is very inconvenient for users
especially on TUI as screen is reset after the failure.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/builtin-report.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 8a9c6908f54e..af5db885ea9c 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -513,20 +513,26 @@ static int __cmd_report(struct report *rep)
 	if (rep->cpu_list) {
 		ret = perf_session__cpu_bitmap(session, rep->cpu_list,
 					       rep->cpu_bitmap);
-		if (ret)
+		if (ret) {
+			ui__error("failed to set cpu bitmap\n");
 			return ret;
+		}
 	}
 
 	if (rep->show_threads)
 		perf_read_values_init(&rep->show_threads_values);
 
 	ret = report__setup_sample_type(rep);
-	if (ret)
+	if (ret) {
+		/* report__setup_sample_type() already showed error message */
 		return ret;
+	}
 
 	ret = perf_session__process_events(session);
-	if (ret)
+	if (ret) {
+		ui__error("failed to process sample\n");
 		return ret;
+	}
 
 	report__warn_kptr_restrict(rep);
 
-- 
2.6.2


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

end of thread, other threads:[~2015-11-29  7:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27 17:32 [PATCH 1/3] perf report: Show error message when processing sample fails Namhyung Kim
2015-11-27 17:32 ` [PATCH 2/3] perf hist: Do not skip elided fields when processing samples Namhyung Kim
2015-11-28  0:51   ` Arnaldo Carvalho de Melo
2015-11-29  7:56   ` [tip:perf/core] perf hists: " tip-bot for Namhyung Kim
2015-11-27 17:32 ` [PATCH 3/3] perf hists browser: Update nr entries regardless of min percent Namhyung Kim
2015-11-28  0:53   ` Arnaldo Carvalho de Melo
2015-11-29  7:56   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-11-27 19:56 ` [PATCH 1/3] perf report: Show error message when processing sample fails Arnaldo Carvalho de Melo
2015-11-27 19:57   ` Arnaldo Carvalho de Melo
2015-11-28  1:48     ` Namhyung Kim
2015-11-29  7:56 ` [tip:perf/core] " tip-bot for Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).