Skip to content

Commit

Permalink
perf hists browser: Honour symbol_conf.show_{nr_samples,total_period}
Browse files Browse the repository at this point in the history
We lost that when we move it outside hist_entry__snprintf, but better
leave it untangled of 'perf diff' stuff (pair_hist, etc).

Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
acmel committed Oct 19, 2011
1 parent e4419b8 commit 2cf9ceb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/perf/util/ui/browsers/hists.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,16 @@ static int hist_browser__show_entry(struct hist_browser *self,
if (!current_entry || !self->b.navkeypressed)
ui_browser__set_color(&self->b, HE_COLORSET_NORMAL);

if (symbol_conf.show_nr_samples) {
slsmg_printf(" %11u", entry->nr_events);
width -= 12;
}

if (symbol_conf.show_total_period) {
slsmg_printf(" %12" PRIu64, entry->period);
width -= 13;
}

slsmg_write_nstring(s, width);
++row;
++printed;
Expand Down

0 comments on commit 2cf9ceb

Please sign in to comment.