aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/builtin-report.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 40b0ffc3ad3b..69b1c1185159 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -245,11 +245,12 @@ static int process_read_event(struct perf_tool *tool,
245 return 0; 245 return 0;
246} 246}
247 247
248/* For pipe mode, sample_type is not currently set */
248static int perf_report__setup_sample_type(struct perf_report *rep) 249static int perf_report__setup_sample_type(struct perf_report *rep)
249{ 250{
250 struct perf_session *self = rep->session; 251 struct perf_session *self = rep->session;
251 252
252 if (!(self->sample_type & PERF_SAMPLE_CALLCHAIN)) { 253 if (!self->fd_pipe && !(self->sample_type & PERF_SAMPLE_CALLCHAIN)) {
253 if (sort__has_parent) { 254 if (sort__has_parent) {
254 ui__error("Selected --sort parent, but no " 255 ui__error("Selected --sort parent, but no "
255 "callchain data. Did you call " 256 "callchain data. Did you call "
@@ -272,7 +273,8 @@ static int perf_report__setup_sample_type(struct perf_report *rep)
272 } 273 }
273 274
274 if (sort__branch_mode == 1) { 275 if (sort__branch_mode == 1) {
275 if (!(self->sample_type & PERF_SAMPLE_BRANCH_STACK)) { 276 if (!self->fd_pipe &&
277 !(self->sample_type & PERF_SAMPLE_BRANCH_STACK)) {
276 ui__error("Selected -b but no branch data. " 278 ui__error("Selected -b but no branch data. "
277 "Did you call perf record without -b?\n"); 279 "Did you call perf record without -b?\n");
278 return -1; 280 return -1;