diff --git a/[refs] b/[refs] index d864ed00b2ec..7d0eb6b180d1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 712a4b6049724278121d56aba683151d86c8c35a +refs/heads/master: 74cfc17dc1a69c37ce6c8a76c1ce84bcb796eb0e diff --git a/trunk/tools/perf/builtin-report.c b/trunk/tools/perf/builtin-report.c index f9a99a1ce609..dddcc7ea2bec 100644 --- a/trunk/tools/perf/builtin-report.c +++ b/trunk/tools/perf/builtin-report.c @@ -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;