Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S944011AbcJSQX6 (ORCPT ); Wed, 19 Oct 2016 12:23:58 -0400 Received: from mga03.intel.com ([134.134.136.65]:28902 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938893AbcJSOOz (ORCPT ); Wed, 19 Oct 2016 10:14:55 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,514,1473145200"; d="scan'208";a="21673813" From: Jin Yao To: acme@kernel.org, jolsa@kernel.org Cc: Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@linux.intel.com Subject: [PATCH v2 3/6] perf report: Create a symbol_conf flag for showing branch flag counting Date: Thu, 20 Oct 2016 06:01:14 +0800 Message-Id: <1476914477-25420-4-git-send-email-yao.jin@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476914477-25420-1-git-send-email-yao.jin@linux.intel.com> References: <1476914477-25420-1-git-send-email-yao.jin@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1242 Lines: 39 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: Jin Yao --- 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 6e88460..c406393 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -905,6 +905,9 @@ repeat: 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 d964844..2d0a905 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