diff options
author | Namhyung Kim <namhyung@kernel.org> | 2013-10-31 05:17:39 +0400 |
---|---|---|
committer | Jiri Olsa <jolsa@kernel.org> | 2014-06-01 16:35:02 +0400 |
commit | 14135663f1d770bb057f8bf345e5436c985eb29c (patch) | |
tree | 390e9bb413cf8b6fb65375d339ce26b0ea2b5315 /tools/perf/ui/gtk | |
parent | b09955b2a3d5fd02ed31d279f8c0ac29b32abe83 (diff) | |
download | linux-14135663f1d770bb057f8bf345e5436c985eb29c.tar.xz |
perf tools: Apply percent-limit to cumulative percentage
If -g cumulative option is given, it needs to show entries which don't
have self overhead. So apply percent-limit to accumulated overhead
percentage in this case.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arun Sharma <asharma@fb.com>
Tested-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1401335910-16832-14-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf/ui/gtk')
-rw-r--r-- | tools/perf/ui/gtk/hists.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c index 7e5da4af98d8..03d6812d25dd 100644 --- a/tools/perf/ui/gtk/hists.c +++ b/tools/perf/ui/gtk/hists.c @@ -226,14 +226,12 @@ static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists, struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); GtkTreeIter iter; u64 total = hists__total_period(h->hists); - float percent = 0.0; + float percent; if (h->filtered) continue; - if (total) - percent = h->stat.period * 100.0 / total; - + percent = hist_entry__get_percent_limit(h); if (percent < min_pcnt) continue; |