Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1512277

[PATCH v4 2/6] perf report: Create a symbol_conf flag for showing branch flag counting

From Jin Yao <yao.jin@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH v4 2/6] perf report: Create a symbol_conf flag for showing branch flag counting
Date 2016-10-31 02:30 +0100
Message-ID <sy9Ae-3Yg-41@gated-at.bofh.it> (permalink)
References <sy9qx-3UZ-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <yao.jin@linux.intel.com>
---
 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 @@ 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 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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/6] perf report: Show branch flags/cycles in --branch-history callgraph view Jin Yao <yao.jin@linux.intel.com> - 2016-10-31 02:20 +0100
  [PATCH v4 5/6] perf report: Show branch info in callchain entry for browser mode Jin Yao <yao.jin@linux.intel.com> - 2016-10-31 02:20 +0100
  [PATCH v4 4/6] perf report: Show branch info in callchain entry for stdio mode Jin Yao <yao.jin@linux.intel.com> - 2016-10-31 02:30 +0100
  [PATCH v4 1/6] perf report: Add branch flag to callchain cursor node Jin Yao <yao.jin@linux.intel.com> - 2016-10-31 02:30 +0100
  [PATCH v4 6/6] perf report: Display columns Predicted/Abort/Cycles in --branch-history Jin Yao <yao.jin@linux.intel.com> - 2016-10-31 02:30 +0100
  [PATCH v4 3/6] perf report: Caculate and return the branch flag counting Jin Yao <yao.jin@linux.intel.com> - 2016-10-31 02:30 +0100
  [PATCH v4 2/6] perf report: Create a symbol_conf flag for showing branch flag counting Jin Yao <yao.jin@linux.intel.com> - 2016-10-31 02:30 +0100

csiph-web