perf diff: Fix duplicated output column
Subsystems (2)
Namhyung Kim
maintainerPATCH 1/1 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_ctxAfter:
# 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--- tools/perf/util/sort.c | 3 +++ 1 file changed, 3 insertions(+)
tools/perf/util/sort.c +3 -0
@@ -2438,6 +2438,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)
Signature · 1 line
2.8.2
Quoted 29 lines · Namhyung Kim
The commit
b97511c5bc94("perf tools: Add overhead/overhead_children keys defaults via string") moved initialization of column headers but it missed to check thesort__mode. As 'perf diff' doesn't callperf_hpp__init(), thesetup_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_ctxAfter:
# 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
Quoted 2 lines
Cc stable <[email protected]> # 4.5Signed-off-by Namhyung Kim <[email protected]>
thanks,
jirka
Quoted 21 lines
--- tools/perf/util/sort.c | 3 +++ 1 file changed, 3 insertions(+)tools/perf/util/sort.c +3
-0@@ -2438,6 +2438,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)Signature · 1 line
2.8.2
Em Tue, May 10, 2016 at 03:17:12PM +0200, Jiri Olsa escreveu:
Quoted 5 lines · Namhyung Kim
Quoted 2 lines
Cc stable <[email protected]> # 4.5Signed-off-by Namhyung Kim <[email protected]>Acked-by Jiri Olsa <[email protected]>
Thanks, applied to perf/urgent.
- Arnaldo
tip-bot for Namhyung Kim
merge botperf diff: Fix duplicated output column
Commit-ID: ba07ebe02077751db101ed202bb690f504248575 Gitweb: http://git.kernel.org/tip/ba07ebe02077751db101ed202bb690f504248575 Author: Namhyung Kim <[email protected]> AuthorDate: Tue, 10 May 2016 21:48:19 +0900 Committer: Arnaldo Carvalho de Melo <[email protected]> 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_ctxAfter:
# 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--- tools/perf/util/sort.c | 3 +++ 1 file changed, 3 insertions(+)
tools/perf/util/sort.c +3 -0
@@ -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)