summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-02-18 08:25:05 +0100
committerIngo Molnar <mingo@elte.hu>2011-02-18 08:25:05 +0100
commite4cc9f4a207aeb819f358114eb23a04547d4807c (patch)
tree4c8f7f56427948ca9c2f30659ee18c6dcfdb4d08 /tools/perf/builtin-report.c
parente9345aab675382176740bc8a2c6d3caf1510e46d (diff)
parent668b8788f497b2386402daeca583d6300240d41d (diff)
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index f9a99a1ce60..dddcc7ea2be 100644
--- a/tools/perf/builtin-report.c
+++ b/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;