From 7c6cfcd6e202a7f7f1fe8e7151ae5c9c44874a13 Mon Sep 17 00:00:00 2001 From: Frederic Weisbecker Date: Sun, 5 Jul 2009 07:39:17 +0200 Subject: [PATCH] --- yaml --- r: 155221 b: refs/heads/master c: 91b4eaea93f5be95f4477554399680a53aff2343 h: refs/heads/master i: 155219: 3e47ef3273fb6a9a88f7a997a7a47679cba03106 v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-report.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index e65e4271eb10..542f4b1038be 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a79f0da80a508448434476b77f9d3d1a469eab67 +refs/heads/master: 91b4eaea93f5be95f4477554399680a53aff2343 diff --git a/trunk/tools/perf/builtin-report.c b/trunk/tools/perf/builtin-report.c index fa937f5c3c39..9f9575afab08 100644 --- a/trunk/tools/perf/builtin-report.c +++ b/trunk/tools/perf/builtin-report.c @@ -1684,9 +1684,19 @@ static int __cmd_report(void) sample_type = perf_header__sample_type(); - if (sort__has_parent && !(sample_type & PERF_SAMPLE_CALLCHAIN)) { - fprintf(stderr, "selected --sort parent, but no callchain data\n"); - exit(-1); + if (!(sample_type & PERF_SAMPLE_CALLCHAIN)) { + if (sort__has_parent) { + fprintf(stderr, "selected --sort parent, but no" + " callchain data. Did you call" + " perf record without -g?\n"); + exit(-1); + } + if (callchain) { + fprintf(stderr, "selected -c but no callchain data." + " Did you call perf record without" + " -g?\n"); + exit(-1); + } } if (load_kernel() < 0) {