aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/newt.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-07-20 13:42:52 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-07-23 07:55:59 -0400
commit8a6c5b261c1188379469807d84bfb1365d0f6823 (patch)
treeb18ac8d951c33a480bd7c0a743d341d0e9bf3e90 /tools/perf/util/newt.c
parent7a007ca90b7c465137de06795ef4d5faa10f459e (diff)
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,
692} 692}
693 693
694static size_t hist_entry__append_browser(struct hist_entry *self, 694static size_t hist_entry__append_browser(struct hist_entry *self,
695 newtComponent tree, u64 total) 695 newtComponent tree,
696 struct hists *hists)
696{ 697{
697 char s[256]; 698 char s[256];
698 size_t ret; 699 size_t ret;
@@ -700,8 +701,8 @@ static size_t hist_entry__append_browser(struct hist_entry *self,
700 if (symbol_conf.exclude_other && !self->parent) 701 if (symbol_conf.exclude_other && !self->parent)
701 return 0; 702 return 0;
702 703
703 ret = hist_entry__snprintf(self, s, sizeof(s), NULL, 704 ret = hist_entry__snprintf(self, s, sizeof(s), hists, NULL,
704 false, 0, false, total); 705 false, 0, false, hists->stats.total_period);
705 if (symbol_conf.use_callchain) { 706 if (symbol_conf.use_callchain) {
706 int indexes[2]; 707 int indexes[2];
707 708
@@ -842,7 +843,7 @@ static int hist_browser__populate(struct hist_browser *self, struct hists *hists
842 if (h->filtered) 843 if (h->filtered)
843 continue; 844 continue;
844 845
845 len = hist_entry__append_browser(h, self->tree, hists->stats.total_period); 846 len = hist_entry__append_browser(h, self->tree, hists);
846 if (len > max_len) 847 if (len > max_len)
847 max_len = len; 848 max_len = len;
848 if (symbol_conf.use_callchain) 849 if (symbol_conf.use_callchain)