Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74cfc17d authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf report: Tell the user when a perf.data file has no samples



[root@emilia ~]# perf report --stdio
The perf.data file has no samples!
[root@emilia ~]#

The TUI shows a popup warning message with the same message.

Reported-by: default avatarIngo Molnar <mingo@elte.hu>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 712a4b60
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -350,6 +350,12 @@ static int __cmd_report(void)
		perf_session__fprintf_dsos(session, stdout);
		perf_session__fprintf_dsos(session, stdout);


	next = rb_first(&session->hists_tree);
	next = rb_first(&session->hists_tree);

	if (next == NULL) {
		ui__warning("The %s file has no samples!\n", input_name);
		goto out_delete;
	}

	while (next) {
	while (next) {
		struct hists *hists;
		struct hists *hists;