linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip:perf/core] perf c2c report: Add 'symbol' and 'dso' sort keys
@ 2016-10-22  8:45 tip-bot for Jiri Olsa
  0 siblings, 0 replies; only message in thread
From: tip-bot for Jiri Olsa @ 2016-10-22  8:45 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: namhyung, jolsa, tglx, mingo, a.p.zijlstra, hpa, jmario, dsahern,
	dzickus, acme, linux-kernel, andi

Commit-ID:  51dedaa446532da821fb1160fc4865ca37a54df3
Gitweb:     http://git.kernel.org/tip/51dedaa446532da821fb1160fc4865ca37a54df3
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Tue, 24 May 2016 23:41:52 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 19 Oct 2016 13:18:31 -0300

perf c2c report: Add 'symbol' and 'dso' sort keys

They are to be displayed in the single cacheline output:

  symbol, dso

They are wrappers for global sort_sym and sort_dso sort entries with c2c
specific headers.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-6742e6g0r7n63y5wc4rrgxx5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-c2c.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 77810a3..ffd4174 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -1104,6 +1104,17 @@ static struct c2c_dimension dim_tid = {
 	.se		= &sort_thread,
 };
 
+static struct c2c_dimension dim_symbol = {
+	.name		= "symbol",
+	.se		= &sort_sym,
+};
+
+static struct c2c_dimension dim_dso = {
+	.header		= HEADER_BOTH("Shared", "Object"),
+	.name		= "dso",
+	.se		= &sort_dso,
+};
+
 static struct c2c_dimension *dimensions[] = {
 	&dim_dcacheline,
 	&dim_offset,
@@ -1135,6 +1146,8 @@ static struct c2c_dimension *dimensions[] = {
 	&dim_dram_rmt,
 	&dim_pid,
 	&dim_tid,
+	&dim_symbol,
+	&dim_dso,
 	NULL,
 };
 
@@ -1249,12 +1262,17 @@ static int c2c_hists__init_output(struct perf_hpp_list *hpp_list, char *name)
 static int c2c_hists__init_sort(struct perf_hpp_list *hpp_list, char *name)
 {
 	struct c2c_fmt *c2c_fmt = get_format(name);
+	struct c2c_dimension *dim;
 
 	if (!c2c_fmt) {
 		reset_dimensions();
 		return sort_dimension__add(hpp_list, name, NULL, 0);
 	}
 
+	dim = c2c_fmt->dim;
+	if (dim == &dim_dso)
+		hpp_list->dso = 1;
+
 	perf_hpp_list__register_sort_field(hpp_list, &c2c_fmt->fmt);
 	return 0;
 }

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-22  8:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-22  8:45 [tip:perf/core] perf c2c report: Add 'symbol' and 'dso' sort keys tip-bot for Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).