Skip to contentSkip to conversation

Patch "perf hists: Fix column length on --hierarchy" has been added to the 4.8-stable tree

PATCH [email protected] 1 participant 1 message Nov 21, 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 hists: Fix column length on --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-hists-fix-column-length-on-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 c72ab446cac1d6c9551fd26c4cfef1b2fc5041fd Mon Sep 17 00:00:00 2001

From: Namhyung Kim <[email protected]>
Date: Tue, 8 Nov 2016 22:08:33 +0900
Subject: perf hists: Fix column length on --hierarchy

From: Namhyung Kim <[email protected]>

commit c72ab446cac1d6c9551fd26c4cfef1b2fc5041fd upstream.

Markus reported that there's a weird behavior on perf top --hierarchy regarding the column length.

Looking at the code, I found a dubious code which affects the symptoms. When --hierarchy option is used, the last column length might be inaccurate since it skips to update the length on leaf entries.

I cannot remember why it did and looks like a leftover from previous version during the development.

Anyway, updating the column length often is not harmful. So let's move the code out.

Cc Jiri Olsa <[email protected]>
Cc Peter Zijlstra <[email protected]>
Fixes 1a3906a7e6b9 ("perf hists: Resort hist entries with hierarchy")
---
 tools/perf/util/hist.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
tools/perf/util/hist.c +6 -6
@@ -1596,18 +1596,18 @@ static void hists__hierarchy_output_reso
 		if (prog)
 			ui_progress__update(prog, 1);
 
+		hists->nr_entries++;
+		if (!he->filtered) {
+			hists->nr_non_filtered_entries++;
+			hists__calc_col_len(hists, he);
+		}
+
 		if (!he->leaf) {
 			hists__hierarchy_output_resort(hists, prog,
 						       &he->hroot_in,
 						       &he->hroot_out,
 						       min_callchain_hits,
 						       use_callchain);
-			hists->nr_entries++;
-			if (!he->filtered) {
-				hists->nr_non_filtered_entries++;
-				hists__calc_col_len(hists, he);
-			}
-
 			continue;
 		}
 

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

queue-4.8/perf-hists-fix-column-length-on-hierarchy.patch