Skip to contentSkip to conversation

Patch "perf ui/tui: Reset output width for hierarchy" has been added to the 4.8-stable tree

PATCH [email protected] 1 participant 1 message Oct 29, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

perf ui/tui: Reset output width for hierarchy

to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
perf-ui-tui-reset-output-width-for-hierarchy.patch
and it can be found in the queue-4.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 5ff3e7a224d40f9dd73625b91377787034a8b35e Mon Sep 17 00:00:00 2001

From: Namhyung Kim <[email protected]>
Date: Tue, 20 Sep 2016 14:30:23 +0900
Subject: perf ui/tui: Reset output width for hierarchy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Namhyung Kim <[email protected]>

commit 5ff3e7a224d40f9dd73625b91377787034a8b35e upstream.

When --hierarchy option is used, each entry has its own hpp_list to show the result. But it missed to update width of each column.

Before:

- 46.29% 48.12% netctl-auto
+ 31.44% 29.25% [kernel.vmlinux]
+ 8.52% 11.55% libc-2.22.so
+ 5.19% 6.91% bash
+ 10.75% 11.83% wpa_cli

  + 8.25% 2.23%        swapper
  + 6.45% 5.40%        tr
  + 4.81% 8.09%        awk
  + 4.15% 2.85%        firefox
  + 3.86% 2.53%        sh

After:

- 46.29% 48.12% netctl-auto

      +  31.44%  29.25%        [kernel.vmlinux]
      +   8.52%  11.55%        libc-2.22.so
      +   5.19%   6.91%        bash
  +  10.75%  11.83%        wpa_cli
  +   8.25%   2.23%        swapper
  +   6.45%   5.40%        tr
  +   4.81%   8.09%        awk
  +   4.15%   2.85%        firefox
  +   3.86%   2.53%        sh

Committer note:

Full testing instructions:

1) Record with an event group:

  $ perf record -e '{cycles,instructions}' make -j4

2) Use report in hierarchy mode, to get a few expanded trees on the same screen, use --percent-limit:

  $ perf report --hierarchy --percent-limit 0.5

Samples: 103K of event 'anon group { cycles:u, instructions:u }', Event count (approx.): 57317631725

         Overhead        Command / Shared Object / Symbol        ◆
-  58.89%  55.12%        cc1                                     ▒
   -  50.26%  48.10%        cc1                                  ▒
          3.61%   5.13%        [.] _cpp_lex_token                ▒
          2.58%   0.78%        [.] ht_lookup_with_hash           ▒
          1.31%   1.30%        [.] ggc_internal_alloc            ▒
          1.08%   2.25%        [.] get_combined_adhoc_loc        ▒
          1.01%   1.95%        [.] ira_init                      ▒
          0.96%   1.78%        [.] linemap_position_for_column   ▒
          0.65%   1.01%        [.] cpp_get_token_with_location   ▒
   -   7.52%   6.58%        libc-2.23.so                         ▒
          1.70%   1.78%        [.] _int_malloc                   ▒
          0.69%   0.75%        [.] _int_free                     ▒
          0.67%   0.42%        [.] malloc_consolidate            ▒
   -   0.58%   0.42%        ld-2.23.so                           ▒
                               no entry >= 0.50%                 ▒
   -   0.52%   0.03%        [kernel.vmlinux]                     ▒
                               no entry >= 0.50%                 ▒
Cc Andi Kleen <[email protected]>
Cc Peter Zijlstra <[email protected]>
Fixes 1b2dbbf41a0f ("perf hists: Use own hpp_list for hierarchy mode")
---
 tools/perf/ui/browsers/hists.c |    6 ++++++
 1 file changed, 6 insertions(+)
tools/perf/ui/browsers/hists.c +6 -0
@@ -2045,6 +2045,7 @@ void hist_browser__init(struct hist_brow
 			struct hists *hists)
 {
 	struct perf_hpp_fmt *fmt;
+	struct perf_hpp_list_node *node;
 
 	browser->hists			= hists;
 	browser->b.refresh		= hist_browser__refresh;
@@ -2057,6 +2058,11 @@ void hist_browser__init(struct hist_brow
 		perf_hpp__reset_width(fmt, hists);
 		++browser->b.columns;
 	}
+	/* hierarchy entries have their own hpp list */
+	list_for_each_entry(node, &hists->hpp_formats, list) {
+		perf_hpp_list__for_each_format(&node->hpp, fmt)
+			perf_hpp__reset_width(fmt, hists);
+	}
 }
 
 struct hist_browser *hist_browser__new(struct hists *hists)

Patches currently in stable-queue which might be from [email protected] are

queue-4.8/perf-ui-stdio-always-reset-output-width-for-hierarchy.patch queue-4.8/perf-ui-tui-reset-output-width-for-hierarchy.patch queue-4.8/perf-hists-browser-fix-event-group-display.patch queue-4.8/perf-symbols-check-symbol_conf.allow_aliases-for-kallsyms-loading-too.patch queue-4.8/perf-symbols-fixup-symbol-sizes-before-picking-best-ones.patch