mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
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: Ingo Molnar <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Tom Zanussi <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
@@ -350,6 +350,12 @@ static int __cmd_report(void)
|
||||
perf_session__fprintf_dsos(session, stdout);
|
||||
|
||||
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) {
|
||||
struct hists *hists;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user