From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935259AbcKOKr1 (ORCPT ); Tue, 15 Nov 2016 05:47:27 -0500 Received: from terminus.zytor.com ([198.137.202.10]:51086 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753274AbcKOKrW (ORCPT ); Tue, 15 Nov 2016 05:47:22 -0500 Date: Tue, 15 Nov 2016 02:47:13 -0800 From: tip-bot for Jin Yao Message-ID: Cc: kan.liang@intel.com, ak@linux.intel.com, hpa@zytor.com, acme@redhat.com, mingo@kernel.org, tglx@linutronix.de, jolsa@kernel.org, linux-kernel@vger.kernel.org, yao.jin@linux.intel.com Reply-To: yao.jin@linux.intel.com, linux-kernel@vger.kernel.org, jolsa@kernel.org, tglx@linutronix.de, mingo@kernel.org, acme@redhat.com, hpa@zytor.com, kan.liang@intel.com, ak@linux.intel.com In-Reply-To: <1477876794-30749-3-git-send-email-yao.jin@linux.intel.com> References: <1477876794-30749-3-git-send-email-yao.jin@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf report: Create a symbol_conf flag for showing branch flag counting Git-Commit-ID: f9a7be7c024319423623f58f5233234cad714e6b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: f9a7be7c024319423623f58f5233234cad714e6b Gitweb: http://git.kernel.org/tip/f9a7be7c024319423623f58f5233234cad714e6b Author: Jin Yao AuthorDate: Mon, 31 Oct 2016 09:19:50 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 14 Nov 2016 13:23:42 -0300 perf report: Create a symbol_conf flag for showing branch flag counting 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 8064de8..3dfbfff 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -911,6 +911,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,