Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941372AbcKOBkC (ORCPT ); Mon, 14 Nov 2016 20:40:02 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:60788 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938986AbcKOBj6 (ORCPT ); Mon, 14 Nov 2016 20:39:58 -0500 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Jin Yao , Jiri Olsa , Kan Liang , Linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 12/15] perf report: Create a symbol_conf flag for showing branch flag counting Date: Mon, 14 Nov 2016 22:38:44 -0300 Message-Id: <1479173927-24613-13-git-send-email-acme@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479173927-24613-1-git-send-email-acme@kernel.org> References: <1479173927-24613-1-git-send-email-acme@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1703 Lines: 48 From: Jin Yao Create a new flag show_branchflag_count in symbol_conf. The flag is used to control if showing the branch flag counting information. The flag depends on if the perf.data has branch data and if user chooses the "branch-history" option in perf report command line. Signed-off-by: Yao Jin Acked-by: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Linux-kernel@vger.kernel.org Cc: Yao Jin Link: http://lkml.kernel.org/r/1477876794-30749-3-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-report.c | 3 +++ tools/perf/util/symbol.h | 1 + 2 files changed, 4 insertions(+) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 8064de8ceedc..3dfbfffe2ecd 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -911,6 +911,9 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused) if (itrace_synth_opts.last_branch) has_br_stack = true; + if (has_br_stack && branch_call_mode) + symbol_conf.show_branchflag_count = true; + /* * Branch mode is a tristate: * -1 means default, so decide based on the file having branch data. diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index d964844eb314..2d0a905c879a 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -100,6 +100,7 @@ struct symbol_conf { show_total_period, use_callchain, cumulate_callchain, + show_branchflag_count, exclude_other, show_cpu_utilization, initialized, -- 2.7.4