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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 60d7f8ec8505..fa68a36bc461 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -368,8 +368,9 @@ static int perf_report__setup_sample_type(struct perf_report *rep)
368{ 368{
369 struct perf_session *self = rep->session; 369 struct perf_session *self = rep->session;
370 u64 sample_type = perf_evlist__combined_sample_type(self->evlist); 370 u64 sample_type = perf_evlist__combined_sample_type(self->evlist);
371 bool is_pipe = perf_data_file__is_pipe(self->file);
371 372
372 if (!self->fd_pipe && !(sample_type & PERF_SAMPLE_CALLCHAIN)) { 373 if (!is_pipe && !(sample_type & PERF_SAMPLE_CALLCHAIN)) {
373 if (sort__has_parent) { 374 if (sort__has_parent) {
374 ui__error("Selected --sort parent, but no " 375 ui__error("Selected --sort parent, but no "
375 "callchain data. Did you call " 376 "callchain data. Did you call "
@@ -392,7 +393,7 @@ static int perf_report__setup_sample_type(struct perf_report *rep)
392 } 393 }
393 394
394 if (sort__mode == SORT_MODE__BRANCH) { 395 if (sort__mode == SORT_MODE__BRANCH) {
395 if (!self->fd_pipe && 396 if (!is_pipe &&
396 !(sample_type & PERF_SAMPLE_BRANCH_STACK)) { 397 !(sample_type & PERF_SAMPLE_BRANCH_STACK)) {
397 ui__error("Selected -b but no branch data. " 398 ui__error("Selected -b but no branch data. "
398 "Did you call perf record without -b?\n"); 399 "Did you call perf record without -b?\n");
@@ -488,6 +489,7 @@ static int __cmd_report(struct perf_report *rep)
488 struct map *kernel_map; 489 struct map *kernel_map;
489 struct kmap *kernel_kmap; 490 struct kmap *kernel_kmap;
490 const char *help = "For a higher level overview, try: perf report --sort comm,dso"; 491 const char *help = "For a higher level overview, try: perf report --sort comm,dso";
492 struct perf_data_file *file = session->file;
491 493
492 signal(SIGINT, sig_handler); 494 signal(SIGINT, sig_handler);
493 495
@@ -572,7 +574,7 @@ static int __cmd_report(struct perf_report *rep)
572 return 0; 574 return 0;
573 575
574 if (nr_samples == 0) { 576 if (nr_samples == 0) {
575 ui__error("The %s file has no samples!\n", session->filename); 577 ui__error("The %s file has no samples!\n", file->path);
576 return 0; 578 return 0;
577 } 579 }
578 580