perf top: Fix refreshing hierarchy entries on TUI
authorNamhyung Kim <namhyung@kernel.org>
Fri, 7 Oct 2016 05:04:12 +0000 (14:04 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 13 Oct 2016 14:10:14 +0000 (11:10 -0300)
commitc611152373e84a7677cd7d496e849de4debdab66
treeeb4b66a9adf097b6486f1cf663b8b90adf255ded
parentc68306ce20ad03ce655a367fc33ad06e12bb87a6
perf top: Fix refreshing hierarchy entries on TUI

Markus reported that 'perf top --hierarchy' cannot scroll down after
refresh.  This was because the number of entries are not updated when
hierarchy is enabled.

Unlike normal report view, hierarchy mode needs to keep its own entry
count since it can have non-leaf entries which can expand/collapse.

Reported-and-Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Fixes: f5b763feebe9 ("perf hists browser: Count number of hierarchy entries")
Link: http://lkml.kernel.org/r/20161007050412.3000-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/hists.c