From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753987AbcAXNzA (ORCPT ); Sun, 24 Jan 2016 08:55:00 -0500 Received: from mail-pa0-f65.google.com ([209.85.220.65]:34912 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057AbcAXNyv (ORCPT ); Sun, 24 Jan 2016 08:54:51 -0500 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , Andi Kleen , David Ahern , Frederic Weisbecker , Wang Nan Subject: [PATCH 04/12] perf report: Fix percent calculation on --stdio Date: Sun, 24 Jan 2016 22:53:27 +0900 Message-Id: <1453643615-1616-5-git-send-email-namhyung@kernel.org> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1453643615-1616-1-git-send-email-namhyung@kernel.org> References: <1453643615-1616-1-git-send-email-namhyung@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The hists' total period should be calculated by hists__total_period() function in order to take account into filterings. Signed-off-by: Namhyung Kim --- 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