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


Groups > linux.kernel > #1504998 > unrolled thread

[PATCH 08/52] perf c2c report: Fallback to standard dimensions

Started byArnaldo Carvalho de Melo <acme@kernel.org>
First post2016-10-20 17:20 +0200
Last post2016-10-20 17:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 08/52] perf c2c report: Fallback to standard dimensions Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-20 17:20 +0200

#1504998 — [PATCH 08/52] perf c2c report: Fallback to standard dimensions

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-10-20 17:20 +0200
Subject[PATCH 08/52] perf c2c report: Fallback to standard dimensions
Message-ID<suniq-T1-19@gated-at.bofh.it>
From: Jiri Olsa <jolsa@kernel.org>

Fallback to standard dimensions in case we don't find the dimension
within c2c ones.

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/r/1474558645-19956-16-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-c2c.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 6b58b537bc9d..a3481f86e2ae 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -213,8 +213,10 @@ static int c2c_hists__init_output(struct perf_hpp_list *hpp_list, char *name)
 {
 	struct c2c_fmt *c2c_fmt = get_format(name);
 
-	if (!c2c_fmt)
-		return -1;
+	if (!c2c_fmt) {
+		reset_dimensions();
+		return output_field_add(hpp_list, name);
+	}
 
 	perf_hpp_list__column_register(hpp_list, &c2c_fmt->fmt);
 	return 0;
@@ -224,8 +226,10 @@ static int c2c_hists__init_sort(struct perf_hpp_list *hpp_list, char *name)
 {
 	struct c2c_fmt *c2c_fmt = get_format(name);
 
-	if (!c2c_fmt)
-		return -1;
+	if (!c2c_fmt) {
+		reset_dimensions();
+		return sort_dimension__add(hpp_list, name, NULL, 0);
+	}
 
 	perf_hpp_list__register_sort_field(hpp_list, &c2c_fmt->fmt);
 	return 0;
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web