Commit df25f989a4390ca0dbc9cb24516d4b10c01ceda8

Authored by Arnaldo Carvalho de Melo
1 parent 12c142781e

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 <mingo@elte.hu>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-k0d0rq9a8nqtkqohov8cir72@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Showing 1 changed file with 0 additions and 1 deletions Side-by-side Diff

tools/perf/builtin-top.c
... ... @@ -235,7 +235,6 @@
235 235 if (he == NULL)
236 236 return NULL;
237 237  
238   - evsel->hists.stats.total_period += sample->period;
239 238 hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE);
240 239 return he;
241 240 }