acrn-kernel/tools/perf
Namhyung Kim c29bfda64b perf hists browser: Fix the number of entries for 'e' key
commit f6b8436bed upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-19 12:28:07 +02:00
..
Documentation
arch perf tool x86: Fix perf_env memory leak 2023-07-19 16:21:38 +02:00
bench
dlfilters
examples/bpf
include
jvmti
pmu-events perf vendor events: Drop STORES_PER_INST metric event for power10 platform 2023-09-19 12:28:00 +02:00
python
scripts perf scripts intel-pt-events.py: Fix IPC output for Python 2 2023-05-17 11:53:39 +02:00
tests perf test shell stat_bpf_counters: Fix test on Intel 2023-09-19 12:28:07 +02:00
trace
ui perf hists browser: Fix the number of entries for 'e' key 2023-09-19 12:28:07 +02:00
util perf tools: Handle old data in PERF_RECORD_ATTR 2023-09-19 12:28:07 +02:00
.gitignore
Build
CREDITS
MANIFEST
Makefile
Makefile.config perf build: Fix library not found error when using CSLIBS 2023-07-27 08:50:39 +02:00
Makefile.perf
builtin-annotate.c
builtin-bench.c perf bench: Add missing setlocale() call to allow usage of %'d style formatting 2023-07-19 16:21:36 +02:00
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-c2c.c
builtin-config.c
builtin-daemon.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c perf ftrace latency: Remove unnecessary "--" from --use-nsec option 2023-06-09 10:34:02 +02:00
builtin-help.c
builtin-inject.c
builtin-kallsyms.c
builtin-kmem.c
builtin-kvm.c
builtin-kwork.c
builtin-list.c
builtin-lock.c
builtin-mem.c
builtin-probe.c
builtin-record.c perf record: Fix "read LOST count failed" msg with sample read 2023-05-17 11:53:39 +02:00
builtin-report.c
builtin-sched.c
builtin-script.c perf script: Fix allocation of evsel->priv related to per-event dump files 2023-07-19 16:21:37 +02:00
builtin-stat.c perf stat: Separate bperf from bpf_profiler 2023-05-17 11:53:41 +02:00
builtin-timechart.c
builtin-top.c perf top: Don't pass an ERR_PTR() directly to perf_session__delete() 2023-09-19 12:28:00 +02:00
builtin-trace.c perf trace: Really free the evsel->priv area 2023-09-19 12:27:59 +02:00
builtin-version.c
builtin.h
check-headers.sh
command-list.txt
design.txt
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c
perf.h