aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index fa937f5c3c39..9f9575afab08 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -1684,9 +1684,19 @@ static int __cmd_report(void)
1684 1684
1685 sample_type = perf_header__sample_type(); 1685 sample_type = perf_header__sample_type();
1686 1686
1687 if (sort__has_parent && !(sample_type & PERF_SAMPLE_CALLCHAIN)) { 1687 if (!(sample_type & PERF_SAMPLE_CALLCHAIN)) {
1688 fprintf(stderr, "selected --sort parent, but no callchain data\n"); 1688 if (sort__has_parent) {
1689 exit(-1); 1689 fprintf(stderr, "selected --sort parent, but no"
1690 " callchain data. Did you call"
1691 " perf record without -g?\n");
1692 exit(-1);
1693 }
1694 if (callchain) {
1695 fprintf(stderr, "selected -c but no callchain data."
1696 " Did you call perf record without"
1697 " -g?\n");
1698 exit(-1);
1699 }
1690 } 1700 }
1691 1701
1692 if (load_kernel() < 0) { 1702 if (load_kernel() < 0) {