[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-6c0345b73b970078c3e71ecc614a007207a1428a@git.kernel.org>
Date: Sun, 7 Dec 2014 22:52:53 -0800
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: fweisbec@...il.com, a.p.zijlstra@...llo.nl, acme@...hat.com,
linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...nel.org,
namhyung@...nel.org, jolsa@...nel.org, hpa@...or.com,
paulus@...ba.org, matt.fleming@...el.com, dsahern@...il.com,
eranian@...gle.com, cjashfor@...ux.vnet.ibm.com, ak@...ux.intel.com
Subject: [tip:perf/core] perf stat: Add support for snapshot counters
Commit-ID: 6c0345b73b970078c3e71ecc614a007207a1428a
Gitweb: http://git.kernel.org/tip/6c0345b73b970078c3e71ecc614a007207a1428a
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Fri, 21 Nov 2014 10:31:15 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 1 Dec 2014 20:00:31 -0300
perf stat: Add support for snapshot counters
The .snapshot file indicates that the provided event value is a snapshot
value. Bypassing the delta computation logic for such event.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Matt Fleming <matt.fleming@...el.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/r/1416562275-12404-12-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-stat.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 860e8ad..8910863 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -443,7 +443,8 @@ static int read_cb(struct perf_evsel *evsel, int cpu, int thread __maybe_unused,
case AGGR_CORE:
case AGGR_SOCKET:
case AGGR_NONE:
- perf_evsel__compute_deltas(evsel, cpu, count);
+ if (!evsel->snapshot)
+ perf_evsel__compute_deltas(evsel, cpu, count);
perf_counts_values__scale(count, scale, NULL);
evsel->counts->cpu[cpu] = *count;
update_shadow_stats(evsel, count->values);
@@ -479,7 +480,8 @@ static int read_counter_aggr(struct perf_evsel *counter)
if (read_counter(counter))
return -1;
- perf_evsel__compute_deltas(counter, -1, aggr);
+ if (!counter->snapshot)
+ perf_evsel__compute_deltas(counter, -1, aggr);
perf_counts_values__scale(aggr, scale, &counter->counts->scaled);
for (i = 0; i < 3; i++)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists