From: tip-bot for Namhyung Kim <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, peterz@infradead.org,
linux-kernel@vger.kernel.org, jolsa@kernel.org,
namhyung@kernel.org, hpa@zytor.com, acme@redhat.com,
tglx@linutronix.de
Subject: [tip:perf/core] perf diff: Fix duplicated output column
Date: Tue, 10 May 2016 13:33:24 -0700 [thread overview]
Message-ID: <tip-ba07ebe02077751db101ed202bb690f504248575@git.kernel.org> (raw)
In-Reply-To: <1462884499-6612-1-git-send-email-namhyung@kernel.org>
Commit-ID: ba07ebe02077751db101ed202bb690f504248575
Gitweb: http://git.kernel.org/tip/ba07ebe02077751db101ed202bb690f504248575
Author: Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 10 May 2016 21:48:19 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 10 May 2016 10:37:05 -0300
perf diff: Fix duplicated output column
The commit b97511c5bc94 ("perf tools: Add overhead/overhead_children
keys defaults via string") moved initialization of column headers but it
missed to check the sort__mode. As 'perf diff' doesn't call
perf_hpp__init(), the setup_overhead() also should not be called.
Before:
# Baseline Delta Children Overhead Shared Object Symbol
# ........ ....... ........ ........ ................... .......................
#
28.48% -28.47% 28.48% 28.48% [kernel.vmlinux ] [k] intel_idle
11.51% -11.47% 11.51% 11.51% libxul.so [.] 0x0000000001a360f7
3.49% -3.49% 3.49% 3.49% [kernel.vmlinux] [k] generic_exec_single
2.91% -2.89% 2.91% 2.91% libdbus-1.so.3.8.11 [.] 0x000000000000cdc2
2.86% -2.85% 2.86% 2.86% libxcb.so.1.1.0 [.] 0x000000000000c890
2.44% -2.39% 2.44% 2.44% [kernel.vmlinux] [k] perf_event_aux_ctx
After:
# Baseline Delta Shared Object Symbol
# ........ ....... ................... .......................
#
28.48% -28.47% [kernel.vmlinux] [k] intel_idle
11.51% -11.47% libxul.so [.] 0x0000000001a360f7
3.49% -3.49% [kernel.vmlinux] [k] generic_exec_single
2.91% -2.89% libdbus-1.so.3.8.11 [.] 0x000000000000cdc2
2.86% -2.85% libxcb.so.1.1.0 [.] 0x000000000000c890
2.44% -2.39% [kernel.vmlinux] [k] perf_event_aux_ctx
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org # 4.5+
Fixes: b97511c5bc94 ("perf tools: Add overhead/overhead_children keys defaults via string")
Link: http://lkml.kernel.org/r/1462884499-6612-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/sort.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 47966a1..f5ba111 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -2445,6 +2445,9 @@ static char *prefix_if_not_in(const char *pre, char *str)
static char *setup_overhead(char *keys)
{
+ if (sort__mode == SORT_MODE__DIFF)
+ return keys;
+
keys = prefix_if_not_in("overhead", keys);
if (symbol_conf.cumulate_callchain)
next prev parent reply other threads:[~2016-05-10 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-10 12:48 [PATCH] perf diff: Fix duplicated output column Namhyung Kim
2016-05-10 13:17 ` Jiri Olsa
2016-05-10 13:38 ` Arnaldo Carvalho de Melo
2016-05-10 20:33 ` tip-bot for Namhyung Kim [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-05-10 14:26 [PATCH 1/1] " Arnaldo Carvalho de Melo
2016-05-11 12:21 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-05-11 15:00 ` tip-bot for Namhyung Kim
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=tip-ba07ebe02077751db101ed202bb690f504248575@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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