]> git.baikalelectronics.ru Git - kernel.git/commit
perf top/report: Fix infinite loop in the TUI for grouped events
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 31 Aug 2020 19:17:00 +0000 (16:17 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 1 Sep 2020 15:15:52 +0000 (12:15 -0300)
commit81813e42f36af487a1be5f522c986f31d4449a4d
treecc1704d78a97aac0ac6c21f2ff08365b02dbecae
parent30f982ace9dd5e39958fe1c922ec034b80c1ab8a
perf top/report: Fix infinite loop in the TUI for grouped events

For a while we need to have a dummy event for doing things like
receiving PERF_RECORD_COMM, PERF_RECORD_EXEC, etc for threads being
created and dying while we synthesize the pre-existing ones at tool
start.

This 'dummy' event is needed for keeping track of thread lifetime events
early in the session but are uninteresting otherwise, i.e. no need to
have it in a initial events menu for the non-grouped case, i.e. for:

 # perf top -e cycles,instructions

or even for plain:

 # perf top

When 'cycles' and that 'dummy' event are in place.

The code to remove that 'dummy' event ended up creating an endless loop
for the grouped case, i.e.:

 # perf top -e '{cycles,instructions}'

Fix it.

Fixes: 26d681693a7fb3fd ("perf report TUI: Remove needless 'dummy' event from menu")
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/hists.c