From 91cab2eb8a7dc79e627ed6be2bb2900f754e820f Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 20 Oct 2011 06:45:44 -0200 Subject: [PATCH] --- yaml --- r: 269121 b: refs/heads/master c: c64550cfddfdbd7a6f9d5ffb37382a05d7f0306b h: refs/heads/master i: 269119: b1bb01111fae15b563db4fd83f8411665cf7cfc2 v: v3 --- [refs] | 2 +- trunk/tools/perf/util/hist.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 413d2d4203e5..66238733cac8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2cf9cebf0878e384630f6fd5e1abd830c0cd99b3 +refs/heads/master: c64550cfddfdbd7a6f9d5ffb37382a05d7f0306b diff --git a/trunk/tools/perf/util/hist.c b/trunk/tools/perf/util/hist.c index 75526d123eb2..1f269fd48944 100644 --- a/trunk/tools/perf/util/hist.c +++ b/trunk/tools/perf/util/hist.c @@ -105,11 +105,16 @@ static void hist_entry__decay(struct hist_entry *he) static bool hists__decay_entry(struct hists *hists, struct hist_entry *he) { - if (he->period == 0) + u64 prev_period = he->period; + + if (prev_period == 0) return true; - hists->stats.total_period -= he->period; + hist_entry__decay(he); - hists->stats.total_period += he->period; + + if (!he->filtered) + hists->stats.total_period -= prev_period - he->period; + return he->period == 0; }