linux/tools/perf/ui
Namhyung Kim f6b8436bed perf hists browser: Fix the number of entries for 'e' key
The 'e' key is to toggle expand/collapse the selected entry only.  But
the current code has a bug that it only increases the number of entries
by 1 in the hierarchy mode so users cannot move under the current entry
after the key stroke.  This is due to a wrong assumption in the
hist_entry__set_folding().

The commit b33f922651 ("perf hists browser: Put hist_entry folding
logic into single function") factored out the code, but actually it
should be handled separately.  The hist_browser__set_folding() is to
update fold state for each entry so it needs to traverse all (child)
entries regardless of the current fold state.  So it increases the
number of entries by 1.

But the hist_entry__set_folding() only cares the currently selected
entry and its all children.  So it should count all unfolded child
entries.  This code is implemented in hist_browser__toggle_fold()
already so we can just call it.

Fixes: b33f922651 ("perf hists browser: Put hist_entry folding logic into single function")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230731094934.1616495-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-08-03 17:01:28 -03:00
..
browsers perf hists browser: Fix the number of entries for 'e' key 2023-08-03 17:01:28 -03:00
gtk tools: Rename __fallthrough to fallthrough 2023-04-06 21:41:00 -03:00
stdio perf thread: Add accessor functions for thread 2023-06-12 15:57:53 -03:00
tui perf ui: Move window resize signal functions 2023-04-10 19:20:38 -03:00
browser.c perf ui: Update use of pthread mutex 2022-10-04 08:55:20 -03:00
browser.h perf annotate: Fix fused instr logic for assembly functions 2021-09-18 17:43:05 -03:00
Build perf tools: Rename build libperf to perf 2019-02-14 15:18:08 -03:00
helpline.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
helpline.h perf tools: Remove needless evlist.h include directives 2019-08-31 22:24:10 -03:00
hist.c perf thread: Add reference count checking 2023-06-12 15:57:53 -03:00
keysyms.h perf report: Support a new key to reload the browser 2020-03-24 09:37:27 -03:00
libslang.h perf build: Handle slang being in /usr/include and in /usr/include/slang/ 2019-06-18 17:48:12 -03:00
progress.c perf tools: Remove needless evlist.h include directives 2019-08-31 22:24:10 -03:00
progress.h Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
setup.c perf ui: Move window resize signal functions 2023-04-10 19:20:38 -03:00
ui.h perf ui: Move window resize signal functions 2023-04-10 19:20:38 -03:00
util.c perf tools: Fix "kernel lock contention analysis" test by not printing warnings in quiet mode 2022-10-27 16:37:26 -03:00
util.h tools ui popup: Allow returning hotkeys 2020-01-06 11:46:10 -03:00