From 217b7d41ea2038e52991b7a600a0b958330d8ae6 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Tue, 28 Mar 2023 16:55:40 -0700 Subject: perf annotate: Add init/exit to annotation_options remove default The annotation__default_options global variable was used to initialize annotation_options. Switch to the init/exit pattern as later changes will give ownership over strings and this will be necessary to avoid memory leaks. Committer note: Fix the GTK2=1 build, hist_entry__gtk_annotate() needs to receive a 'struct annotation_options' pointer. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Andres Freund Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Sandipan Das Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230328235543.1082207-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/ui/gtk/gtk.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/perf/ui/gtk/gtk.h') diff --git a/tools/perf/ui/gtk/gtk.h b/tools/perf/ui/gtk/gtk.h index a2b497f03fd6..1e84dceb5267 100644 --- a/tools/perf/ui/gtk/gtk.h +++ b/tools/perf/ui/gtk/gtk.h @@ -56,11 +56,13 @@ struct evsel; struct evlist; struct hist_entry; struct hist_browser_timer; +struct annotation_options; int evlist__gtk_browse_hists(struct evlist *evlist, const char *help, struct hist_browser_timer *hbt, float min_pcnt); int hist_entry__gtk_annotate(struct hist_entry *he, struct evsel *evsel, + struct annotation_options *options, struct hist_browser_timer *hbt); void perf_gtk__show_annotations(void); -- cgit v1.2.3-70-g09d2