[PATCH 04/12] perf report: Fix percent calculation on --stdio

From: Namhyung Kim
Date: Sun Jan 24 2016 - 08:56:48 EST


The hists' total period should be calculated by hists__total_period()
function in order to take account into filterings.

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/ui/stdio/hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
index 51f26f03de9e..7bf05e82766f 100644
--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -418,7 +418,7 @@ static int hist_entry__fprintf(struct hist_entry *he, size_t size,
.buf = bf,
.size = size,
};
- u64 total_period = hists->stats.total_period;
+ u64 total_period = hists__total_period(hists);

if (size == 0 || size > bfsz)
size = hpp.size = bfsz;
--
2.6.4