From 9bf2c58bb0bdbad8c183a9c801319238de0320ff Mon Sep 17 00:00:00 2001 From: David Ahern Date: Mon, 11 Jun 2012 13:48:41 -0600 Subject: [PATCH] --- yaml --- r: 312289 b: refs/heads/master c: 300aa941650e98966ad85847527537df5b11a87e h: refs/heads/master i: 312287: 65c74399538d12d57e2e070099630c1831749ef0 v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-report.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 1b70db780b89..49d94942995c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 08942f6d5d992e9486b07653fd87ea8182a22fa0 +refs/heads/master: 300aa941650e98966ad85847527537df5b11a87e diff --git a/trunk/tools/perf/builtin-report.c b/trunk/tools/perf/builtin-report.c index 40b0ffc3ad3b..69b1c1185159 100644 --- a/trunk/tools/perf/builtin-report.c +++ b/trunk/tools/perf/builtin-report.c @@ -245,11 +245,12 @@ static int process_read_event(struct perf_tool *tool, return 0; } +/* For pipe mode, sample_type is not currently set */ static int perf_report__setup_sample_type(struct perf_report *rep) { struct perf_session *self = rep->session; - if (!(self->sample_type & PERF_SAMPLE_CALLCHAIN)) { + if (!self->fd_pipe && !(self->sample_type & PERF_SAMPLE_CALLCHAIN)) { if (sort__has_parent) { ui__error("Selected --sort parent, but no " "callchain data. Did you call " @@ -272,7 +273,8 @@ static int perf_report__setup_sample_type(struct perf_report *rep) } if (sort__branch_mode == 1) { - if (!(self->sample_type & PERF_SAMPLE_BRANCH_STACK)) { + if (!self->fd_pipe && + !(self->sample_type & PERF_SAMPLE_BRANCH_STACK)) { ui__error("Selected -b but no branch data. " "Did you call perf record without -b?\n"); return -1;