Patch "perf hists: Update the column width for the "srcline" sort key" has been added to the 4.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    perf hists: Update the column width for the "srcline" sort key

to the 4.2-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-update-the-column-width-for-the-srcline-sort-key.patch
and it can be found in the queue-4.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From e8e6d37e73e6b950c891c780745460b87f4755b6 Mon Sep 17 00:00:00 2001
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Date: Mon, 10 Aug 2015 16:53:54 -0300
Subject: perf hists: Update the column width for the "srcline" sort key

From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

commit e8e6d37e73e6b950c891c780745460b87f4755b6 upstream.

When we introduce a new sort key, we need to update the
hists__calc_col_len() function accordingly, otherwise the width
will be limited to strlen(header).

We can't update it when obtaining a line value for a column (for
instance, in sort__srcline_cmp()), because we reset it all when doing a
resort (see hists__output_recalc_col_len()), so we need to, from what is
in the hist_entry fields, set each of the column widths.

Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Andi Kleen <andi@xxxxxxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Fixes: 409a8be61560 ("perf tools: Add sort by src line/number")
Link: http://lkml.kernel.org/n/tip-jgbe0yx8v1gs89cslr93pvz2@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 tools/perf/util/hist.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -151,6 +151,9 @@ void hists__calc_col_len(struct hists *h
 	hists__new_col_len(hists, HISTC_LOCAL_WEIGHT, 12);
 	hists__new_col_len(hists, HISTC_GLOBAL_WEIGHT, 12);
 
+	if (h->srcline)
+		hists__new_col_len(hists, HISTC_SRCLINE, strlen(h->srcline));
+
 	if (h->transaction)
 		hists__new_col_len(hists, HISTC_TRANSACTION,
 				   hist_entry__transaction_len());


Patches currently in stable-queue which might be from acme@xxxxxxxxxx are

queue-4.2/perf-tools-add-empty-build-files-for-architectures-lacking-them.patch
queue-4.2/perf-stat-get-correct-cpu-id-for-print_aggr.patch
queue-4.2/perf-probe-use-existing-routine-to-look-for-a-kernel-module-by-dso-short_name.patch
queue-4.2/perf-tools-add-missing-forward-declaration-of-struct-map-to-probe-event.h.patch
queue-4.2/perf-tools-fix-copying-of-proc-kcore.patch
queue-4.2/perf-hists-update-the-column-width-for-the-srcline-sort-key.patch
queue-4.2/perf-tools-fix-parse_events_add_pmu-caller.patch
queue-4.2/perf-header-fixup-reading-of-header_nrcpus-feature.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]