diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-report.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index f9a99a1ce609..dddcc7ea2bec 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -350,6 +350,12 @@ static int __cmd_report(void) | |||
350 | perf_session__fprintf_dsos(session, stdout); | 350 | perf_session__fprintf_dsos(session, stdout); |
351 | 351 | ||
352 | next = rb_first(&session->hists_tree); | 352 | next = rb_first(&session->hists_tree); |
353 | |||
354 | if (next == NULL) { | ||
355 | ui__warning("The %s file has no samples!\n", input_name); | ||
356 | goto out_delete; | ||
357 | } | ||
358 | |||
353 | while (next) { | 359 | while (next) { |
354 | struct hists *hists; | 360 | struct hists *hists; |
355 | 361 | ||