path: root/tools
diff options
authorArnaldo Carvalho de Melo <>2012-01-05 12:21:08 -0200
committerArnaldo Carvalho de Melo <>2012-01-06 15:46:50 -0200
commitdf25f989a4390ca0dbc9cb24516d4b10c01ceda8 (patch)
treeef735c703fcabb34982e0df5f0a81b5f73bc79c0 /tools
parent12c142781ec076fad617e7cd9f83c8618d909619 (diff)
perf top: Don't update total_period on process_sample
It will be recalculated at __hists__output_resort, to take into account filters possibly applied by the TUI, etc. Since we do the percent math only for those entries that will appear on the TUI instead of for _all_ the entries at decay time, updating it for each sample makes the entries seem to decay faster when using the navigation keys (since the screen will be refreshed), as we're not coalescing the entries that are being batched to be merged at next resort/decay time, but considering their periods. Bug introduced in 743eb86. Reported-by: Ingo Molnar <> Cc: David Ahern <> Cc: Frederic Weisbecker <> Cc: Mike Galbraith <> Cc: Paul Mackerras <> Cc: Peter Zijlstra <> Cc: Stephane Eranian <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools')
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 4f81eeb9987..d89dec90103 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -235,7 +235,6 @@ static struct hist_entry *perf_evsel__add_hist_entry(struct perf_evsel *evsel,
if (he == NULL)
return NULL;
- evsel->hists.stats.total_period += sample->period;
hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE);
return he;