perf hists browser: Fix percentage update on key press
authorNamhyung Kim <[email protected]>
Tue, 16 Feb 2016 14:08:19 +0000 (23:08 +0900)
committerArnaldo Carvalho de Melo <[email protected]>
Fri, 19 Feb 2016 22:12:51 +0000 (19:12 -0300)
commit467ef10c68b90b940412390dcd14bbfe8cc40e73
tree247dc0541876d4b11c6d0a56bb21d90313d9df0e
parent43d0b97817a41b274aaec0476e912dae3ae1f93d
perf hists browser: Fix percentage update on key press

Currently 'perf top --tui' decrements percentage of all entries on any
key press.  This is because it adds total period as new samples are
added to hists.  As perf-top does it currently but added samples are not
passed to the display thread, the percentages are decresing
continuously.

So separate total period stat into a different variable so that it
cannot affect the output total period.  This new total period stats are
used only for calcualating callchain percent limit.

Signed-off-by: Namhyung Kim <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Wang Nan <[email protected]>
Fixes: 0f58474ec835 ("perf hists: Update hists' total period when adding entries")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/hist.c
tools/perf/util/hist.h