From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Jiri Olsa <jolsa@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Andi Kleen <andi@firstfloor.org>, David Ahern <dsahern@gmail.com>,
Mark Rutland <mark.rutland@arm.com>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 09/18] perf report: Group stat values on global event id
Date: Tue, 29 Aug 2017 16:42:45 -0300 [thread overview]
Message-ID: <20170829194254.1338-10-acme@kernel.org> (raw)
In-Reply-To: <20170829194254.1338-1-acme@kernel.org>
From: Jiri Olsa <jolsa@kernel.org>
There's no big value on displaying counts for every event ID, which is
one per every CPU. Rather than that, displaying the whole sum for the
event.
$ perf record -c 100000 -e cycles:u -s test
$ perf report -T
Before:
# PID TID cycles:u cycles:u cycles:u cycles:u ... [20 more columns of 'cycles:u']
3339 3339 0 0 0 0
3340 3340 0 0 0 0
3341 3341 0 0 0 0
3342 3342 0 0 0 0
Now:
# PID TID cycles:u
3339 3339 19678
3340 3340 18744
3341 3341 17335
3342 3342 26414
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20170824162737.7813-10-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-report.c | 2 +-
tools/perf/util/values.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 9e4004b08f55..f9dff652dcbd 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -241,7 +241,7 @@ static int process_read_event(struct perf_tool *tool,
const char *name = evsel ? perf_evsel__name(evsel) : "unknown";
int err = perf_read_values_add_value(&rep->show_threads_values,
event->read.pid, event->read.tid,
- event->read.id,
+ evsel->idx,
name,
event->read.value);
diff --git a/tools/perf/util/values.c b/tools/perf/util/values.c
index 3b56aeaa8cbb..8a32bb0095e5 100644
--- a/tools/perf/util/values.c
+++ b/tools/perf/util/values.c
@@ -192,7 +192,7 @@ int perf_read_values_add_value(struct perf_read_values *values,
if (cindex < 0)
return cindex;
- values->value[tindex][cindex] = value;
+ values->value[tindex][cindex] += value;
return 0;
}
--
2.13.5
next prev parent reply other threads:[~2017-08-29 19:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-29 19:42 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 01/18] perf stat: Fix path to PMU formats in documentation Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 02/18] perf tools: Fix static build with newer toolchains Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 03/18] perf c2c: Fix remote HITM detection for Skylake Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 04/18] perf record: Set read_format for inherit_stat Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 05/18] perf report: Add dump_read function Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 06/18] perf values: Fix thread index bug Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 07/18] perf values: Fix allocation check Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 08/18] perf values: Zero value buffers Arnaldo Carvalho de Melo
2017-08-29 19:42 ` Arnaldo Carvalho de Melo [this message]
2017-08-29 19:42 ` [PATCH 10/18] tools build tests: Don't hardcode gcc name Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 11/18] perf tools: Allow external definition of flex and bison binary names Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 12/18] tools lib: Allow external definition of CC, AR and LD Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 13/18] perf tools: Robustify detection of clang binary Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 14/18] perf tools: Pass full path of FEATURES_DUMP Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 15/18] tools headers: Sync cpu features kernel ABI headers with tooling headers Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 16/18] perf trace beauty: Beautify pkey_{alloc,free,mprotect} arguments Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 17/18] perf probe: Fix kprobe blacklist checking condition Arnaldo Carvalho de Melo
2017-08-29 19:42 ` [PATCH 18/18] perf symbols: Fix plt entry calculation for ARM and AARCH64 Arnaldo Carvalho de Melo
2017-08-29 21:15 ` [GIT PULL 00/18] perf/core improvements and fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170829194254.1338-10-acme@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).