From: Namhyung Kim <namhyung....@lge.com>

They are set to constant length so no need to update every time.

Cc: Stephane Eranian <eran...@google.com>
Signed-off-by: Namhyung Kim <namhy...@kernel.org>
---
 tools/perf/util/hist.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 1fb1535940f8..e144aefc76e6 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -56,6 +56,12 @@ void hists__reset_col_len(struct hists *hists)
        hists__set_col_len(hists, HISTC_ADDR, BITS_PER_LONG / 4 + 2);
        hists__set_col_len(hists, HISTC_ADDR_FROM, BITS_PER_LONG / 4 + 2);
        hists__set_col_len(hists, HISTC_ADDR_TO, BITS_PER_LONG / 4 + 2);
+       hists__set_col_len(hists, HISTC_LOCAL_WEIGHT, 12);
+       hists__set_col_len(hists, HISTC_GLOBAL_WEIGHT, 12);
+       hists__set_col_len(hists, HISTC_MEM_LOCKED, 6);
+       hists__set_col_len(hists, HISTC_MEM_TLB, 22);
+       hists__set_col_len(hists, HISTC_MEM_SNOOP, 12);
+       hists__set_col_len(hists, HISTC_MEM_LVL, 21 + 3);
 }
 
 static void hists__set_unres_dso_col_len(struct hists *hists, int dso)
@@ -156,13 +162,6 @@ void hists__calc_col_len(struct hists *hists, struct 
hist_entry *h)
                hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL, symlen);
                hists__set_unres_dso_col_len(hists, HISTC_MEM_DADDR_DSO);
        }
-
-       hists__new_col_len(hists, HISTC_MEM_LOCKED, 6);
-       hists__new_col_len(hists, HISTC_MEM_TLB, 22);
-       hists__new_col_len(hists, HISTC_MEM_SNOOP, 12);
-       hists__new_col_len(hists, HISTC_MEM_LVL, 21 + 3);
-       hists__new_col_len(hists, HISTC_LOCAL_WEIGHT, 12);
-       hists__new_col_len(hists, HISTC_GLOBAL_WEIGHT, 12);
 }
 
 void hists__output_recalc_col_len(struct hists *hists, int max_rows)
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to