Skip to content

Commit d4ccbac

Browse files
committed
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: bee9ca1 ("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>
1 parent 33321a0 commit d4ccbac

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/perf/ui/browsers/hists.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3629,15 +3629,16 @@ int perf_evlist__tui_browse_hists(struct evlist *evlist, const char *help,
36293629
{
36303630
int nr_entries = evlist->core.nr_entries;
36313631

3632-
single_entry:
36333632
if (perf_evlist__single_entry(evlist)) {
3633+
single_entry: {
36343634
struct evsel *first = evlist__first(evlist);
36353635

36363636
return perf_evsel__hists_browse(first, nr_entries, help,
36373637
false, hbt, min_pcnt,
36383638
env, warn_lost_event,
36393639
annotation_opts);
36403640
}
3641+
}
36413642

36423643
if (symbol_conf.event_group) {
36433644
struct evsel *pos;

0 commit comments

Comments
 (0)