diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-05-13 22:09:04 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-05-28 09:24:01 -0400 |
commit | 064f19815c4e99e8b22bc3c5f4d7f4e0b96d226a (patch) | |
tree | 80630db03ec2432aa9a7a4975fa3a6f6fc3ac32b /tools/perf/ui/stdio/hist.c | |
parent | f3dd19817e5bbcae81e96571a3d42aa30a1581fb (diff) |
perf report: Add --percent-limit option
The --percent-limit option is for not showing small overhead entries in
the output. Maybe we want to set a certain default value like 0.1.
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-7-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/stdio/hist.c')
-rw-r--r-- | tools/perf/ui/stdio/hist.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c index ff1f60cf442e..ae7a75432249 100644 --- a/tools/perf/ui/stdio/hist.c +++ b/tools/perf/ui/stdio/hist.c | |||
@@ -334,7 +334,7 @@ static int hist_entry__fprintf(struct hist_entry *he, size_t size, | |||
334 | } | 334 | } |
335 | 335 | ||
336 | size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, | 336 | size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, |
337 | int max_cols, FILE *fp) | 337 | int max_cols, float min_pcnt, FILE *fp) |
338 | { | 338 | { |
339 | struct perf_hpp_fmt *fmt; | 339 | struct perf_hpp_fmt *fmt; |
340 | struct sort_entry *se; | 340 | struct sort_entry *se; |
@@ -440,10 +440,15 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, | |||
440 | print_entries: | 440 | print_entries: |
441 | for (nd = rb_first(&hists->entries); nd; nd = rb_next(nd)) { | 441 | for (nd = rb_first(&hists->entries); nd; nd = rb_next(nd)) { |
442 | struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); | 442 | struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); |
443 | float percent = h->stat.period * 100.0 / | ||
444 | hists->stats.total_period; | ||
443 | 445 | ||
444 | if (h->filtered) | 446 | if (h->filtered) |
445 | continue; | 447 | continue; |
446 | 448 | ||
449 | if (percent < min_pcnt) | ||
450 | continue; | ||
451 | |||
447 | ret += hist_entry__fprintf(h, max_cols, hists, fp); | 452 | ret += hist_entry__fprintf(h, max_cols, hists, fp); |
448 | 453 | ||
449 | if (max_rows && ++nr_rows >= max_rows) | 454 | if (max_rows && ++nr_rows >= max_rows) |