diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-05-13 22:09:05 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-05-28 09:24:01 -0400 |
commit | fa5df94350510571cbe825f333996f57223b3cd2 (patch) | |
tree | 77325e41ab7f635d032b5b397cfa24889c07044d /tools/perf/ui | |
parent | 064f19815c4e99e8b22bc3c5f4d7f4e0b96d226a (diff) |
perf top: Add --percent-limit option
The --percent-limit option is for not showing small overhead entries in
the output.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1368497347-9628-8-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 9dfde61505cc..fc0bd3843d34 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -310,6 +310,8 @@ static void ui_browser__warn_lost_events(struct ui_browser *browser) | |||
310 | "Or reduce the sampling frequency."); | 310 | "Or reduce the sampling frequency."); |
311 | } | 311 | } |
312 | 312 | ||
313 | static void hist_browser__update_pcnt_entries(struct hist_browser *hb); | ||
314 | |||
313 | static int hist_browser__run(struct hist_browser *browser, const char *ev_name, | 315 | static int hist_browser__run(struct hist_browser *browser, const char *ev_name, |
314 | struct hist_browser_timer *hbt) | 316 | struct hist_browser_timer *hbt) |
315 | { | 317 | { |
@@ -333,9 +335,18 @@ static int hist_browser__run(struct hist_browser *browser, const char *ev_name, | |||
333 | key = ui_browser__run(&browser->b, delay_secs); | 335 | key = ui_browser__run(&browser->b, delay_secs); |
334 | 336 | ||
335 | switch (key) { | 337 | switch (key) { |
336 | case K_TIMER: | 338 | case K_TIMER: { |
339 | u64 nr_entries; | ||
337 | hbt->timer(hbt->arg); | 340 | hbt->timer(hbt->arg); |
338 | ui_browser__update_nr_entries(&browser->b, browser->hists->nr_entries); | 341 | |
342 | if (browser->min_pcnt) { | ||
343 | hist_browser__update_pcnt_entries(browser); | ||
344 | nr_entries = browser->nr_pcnt_entries; | ||
345 | } else { | ||
346 | nr_entries = browser->hists->nr_entries; | ||
347 | } | ||
348 | |||
349 | ui_browser__update_nr_entries(&browser->b, nr_entries); | ||
339 | 350 | ||
340 | if (browser->hists->stats.nr_lost_warned != | 351 | if (browser->hists->stats.nr_lost_warned != |
341 | browser->hists->stats.nr_events[PERF_RECORD_LOST]) { | 352 | browser->hists->stats.nr_events[PERF_RECORD_LOST]) { |
@@ -347,6 +358,7 @@ static int hist_browser__run(struct hist_browser *browser, const char *ev_name, | |||
347 | hists__browser_title(browser->hists, title, sizeof(title), ev_name); | 358 | hists__browser_title(browser->hists, title, sizeof(title), ev_name); |
348 | ui_browser__show_title(&browser->b, title); | 359 | ui_browser__show_title(&browser->b, title); |
349 | continue; | 360 | continue; |
361 | } | ||
350 | case 'D': { /* Debug */ | 362 | case 'D': { /* Debug */ |
351 | static int seq; | 363 | static int seq; |
352 | struct hist_entry *h = rb_entry(browser->b.top, | 364 | struct hist_entry *h = rb_entry(browser->b.top, |