summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/newt.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-07-20 19:42:52 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-07-23 13:55:59 +0200
commit8a6c5b261c1188379469807d84bfb1365d0f6823 (patch)
treeb18ac8d951c33a480bd7c0a743d341d0e9bf3e90 /tools/perf/util/newt.c
parentperf hists: Mark entries filtered by parent (diff)
downloadlinux-8a6c5b261c1188379469807d84bfb1365d0f6823.tar.xz
linux-8a6c5b261c1188379469807d84bfb1365d0f6823.zip
perf sort: Make column width code per hists instance
They were globals, and since we support multiple hists and sessions at the same time, it doesn't make sense to calculate those values considereing all symbols in all sessions. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/newt.c')
-rw-r--r--tools/perf/util/newt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 7979003adeaf..ab6eb368cbf5 100644
--- a/tools/perf/util/newt.c
+++ b/tools/perf/util/newt.c
@@ -692,7 +692,8 @@ static void hist_entry__append_callchain_browser(struct hist_entry *self,
}
static size_t hist_entry__append_browser(struct hist_entry *self,
- newtComponent tree, u64 total)
+ newtComponent tree,
+ struct hists *hists)
{
char s[256];
size_t ret;
@@ -700,8 +701,8 @@ static size_t hist_entry__append_browser(struct hist_entry *self,
if (symbol_conf.exclude_other && !self->parent)
return 0;
- ret = hist_entry__snprintf(self, s, sizeof(s), NULL,
- false, 0, false, total);
+ ret = hist_entry__snprintf(self, s, sizeof(s), hists, NULL,
+ false, 0, false, hists->stats.total_period);
if (symbol_conf.use_callchain) {
int indexes[2];
@@ -842,7 +843,7 @@ static int hist_browser__populate(struct hist_browser *self, struct hists *hists
if (h->filtered)
continue;
- len = hist_entry__append_browser(h, self->tree, hists->stats.total_period);
+ len = hist_entry__append_browser(h, self->tree, hists);
if (len > max_len)
max_len = len;
if (symbol_conf.use_callchain)