lkml.org 
[lkml]   [2013]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/8] perf hists: Move column length setting code
Date
From: Namhyung Kim <namhyung.kim@lge.com>

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

Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Namhyung Kim <namhyung@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


\
 
 \ /
  Last update: 2013-04-05 03:41    [W:0.052 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site