From f85a5071ca50b168c509ed66c31516e1d28193c4 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 17 Feb 2011 14:40:46 -0200 Subject: [PATCH] --- yaml --- r: 234453 b: refs/heads/master c: 74cfc17dc1a69c37ce6c8a76c1ce84bcb796eb0e h: refs/heads/master i: 234451: 7de29005807ef2f8106235e1023d83300bdf2856 v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-report.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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;