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


Groups > linux.kernel > #1389547 > unrolled thread

[PATCH 11/11] perf, tools, stat: Add extra output of counter values with -vv

Started byAndi Kleen <andi@firstfloor.org>
First post2016-04-27 22:10 +0200
Last post2016-05-07 07:00 +0200
Articles 2 — 2 participants

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 11/11] perf, tools, stat: Add extra output of counter values with -vv Andi Kleen <andi@firstfloor.org> - 2016-04-27 22:10 +0200
    [tip:perf/core] perf stat: Add extra output of counter values with  -vv tip-bot for Andi Kleen <tipbot@zytor.com> - 2016-05-07 07:00 +0200

#1389547 — [PATCH 11/11] perf, tools, stat: Add extra output of counter values with -vv

FromAndi Kleen <andi@firstfloor.org>
Date2016-04-27 22:10 +0200
Subject[PATCH 11/11] perf, tools, stat: Add extra output of counter values with -vv
Message-ID<rsDWy-7mg-25@gated-at.bofh.it>
From: Andi Kleen <ak@linux.intel.com>

Add debug output of raw counter values per CPU when
perf stat -v is specified, together with their cpu numbers.
This is very useful to debug problems with per core counters,
where we can normally only see aggregated values.

v2: Make it depend on -vv, not -v
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 tools/perf/builtin-stat.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 6d8ce72cd8c1..9a2b4510b1e1 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -314,6 +314,14 @@ static int read_counter(struct perf_evsel *counter)
 					return -1;
 				}
 			}
+
+			if (verbose > 1) {
+				fprintf(stat_config.output,
+					"%s: %d: %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
+						perf_evsel__name(counter),
+						cpu,
+						count->val, count->ena, count->run);
+			}
 		}
 	}
 
-- 
2.5.5

[toc] | [next] | [standalone]


#1396242 — [tip:perf/core] perf stat: Add extra output of counter values with -vv

Fromtip-bot for Andi Kleen <tipbot@zytor.com>
Date2016-05-07 07:00 +0200
Subject[tip:perf/core] perf stat: Add extra output of counter values with -vv
Message-ID<rw2vp-36E-21@gated-at.bofh.it>
In reply to#1389547
Commit-ID:  0b1abbf4a7d273a13065534d718661fc904703b9
Gitweb:     http://git.kernel.org/tip/0b1abbf4a7d273a13065534d718661fc904703b9
Author:     Andi Kleen <ak@linux.intel.com>
AuthorDate: Wed, 27 Apr 2016 13:00:51 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 6 May 2016 13:00:56 -0300

perf stat: Add extra output of counter values with -vv

Add debug output of raw counter values per CPU when perf stat -v is
specified, together with their cpu numbers.  This is very useful to
debug problems with per core counters, where we can normally only see
aggregated values.

v2: Make it depend on -vv, not -v

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1461787251-6702-12-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-stat.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 1f19f2f..5645a83 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -298,6 +298,14 @@ static int read_counter(struct perf_evsel *counter)
 					return -1;
 				}
 			}
+
+			if (verbose > 1) {
+				fprintf(stat_config.output,
+					"%s: %d: %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
+						perf_evsel__name(counter),
+						cpu,
+						count->val, count->ena, count->run);
+			}
 		}
 	}
 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web