aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2024-04-22 19:06:43 -0700
committerArnaldo Carvalho de Melo <[email protected]>2024-04-26 22:13:10 -0300
commit2b87383c885c52f051a90574fb857ca3b76b3f5c (patch)
treed57acecd342ce6cf560aa8e46e1991c772afc82f /tools/perf/builtin-annotate.c
parent8524d71cebfa6ddcfbb89f0fe0e174c8d0477c6d (diff)
perf annotate: Fix data type profiling on stdio
The loop in hists__find_annotations() never set the 'nd' pointer to NULL and it makes stdio output repeating the last element forever. I think it doesn't set to NULL for TUI to prevent it from exiting unexpectedly. But it should just set on stdio mode. Fixes: d001c7a7f4736743 ("perf annotate-data: Add hist_entry__annotate_data_tui()") Signed-off-by: Namhyung Kim <[email protected]> Acked-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r--tools/perf/builtin-annotate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 6f7104f06c42..83812b9d5363 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -491,7 +491,7 @@ find_next:
return;
}
- if (next != NULL)
+ if (use_browser == 0 || next != NULL)
nd = next;
continue;