diff options
Diffstat (limited to 'tools/perf/ui/gtk')
-rw-r--r-- | tools/perf/ui/gtk/Build | 7 | ||||
-rw-r--r-- | tools/perf/ui/gtk/annotate.c | 32 | ||||
-rw-r--r-- | tools/perf/ui/gtk/browser.c | 2 | ||||
-rw-r--r-- | tools/perf/ui/gtk/gtk.h | 8 | ||||
-rw-r--r-- | tools/perf/ui/gtk/helpline.c | 2 | ||||
-rw-r--r-- | tools/perf/ui/gtk/hists.c | 8 | ||||
-rw-r--r-- | tools/perf/ui/gtk/progress.c | 1 | ||||
-rw-r--r-- | tools/perf/ui/gtk/setup.c | 4 | ||||
-rw-r--r-- | tools/perf/ui/gtk/util.c | 2 |
9 files changed, 35 insertions, 31 deletions
diff --git a/tools/perf/ui/gtk/Build b/tools/perf/ui/gtk/Build index ec22e899a224..eef708c502f4 100644 --- a/tools/perf/ui/gtk/Build +++ b/tools/perf/ui/gtk/Build @@ -1,4 +1,4 @@ -CFLAGS_gtk += -fPIC $(GTK_CFLAGS) +CFLAGS_gtk += -fPIC $(GTK_CFLAGS) -Wno-deprecated-declarations gtk-y += browser.o gtk-y += hists.o @@ -7,3 +7,8 @@ gtk-y += util.o gtk-y += helpline.o gtk-y += progress.o gtk-y += annotate.o +gtk-y += zalloc.o + +$(OUTPUT)ui/gtk/zalloc.o: ../lib/zalloc.c FORCE + $(call rule_mkdir) + $(call if_changed_dep,cc_o_c) diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui/gtk/annotate.c index 3af87c18a914..22cc240f7371 100644 --- a/tools/perf/ui/gtk/annotate.c +++ b/tools/perf/ui/gtk/annotate.c @@ -5,6 +5,7 @@ #include "util/annotate.h" #include "util/evsel.h" #include "util/map.h" +#include "util/dso.h" #include "util/symbol.h" #include "ui/helpline.h" #include <inttypes.h> @@ -53,10 +54,10 @@ static int perf_gtk__get_percent(char *buf, size_t size, struct symbol *sym, return ret; } -static int perf_gtk__get_offset(char *buf, size_t size, struct symbol *sym, - struct map *map, struct disasm_line *dl) +static int perf_gtk__get_offset(char *buf, size_t size, struct map_symbol *ms, + struct disasm_line *dl) { - u64 start = map__rip_2objdump(map, sym->start); + u64 start = map__rip_2objdump(ms->map, ms->sym->start); strcpy(buf, ""); @@ -90,10 +91,11 @@ static int perf_gtk__get_line(char *buf, size_t size, struct disasm_line *dl) return ret; } -static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym, - struct map *map, struct perf_evsel *evsel, +static int perf_gtk__annotate_symbol(GtkWidget *window, struct map_symbol *ms, + struct evsel *evsel, struct hist_browser_timer *hbt __maybe_unused) { + struct symbol *sym = ms->sym; struct disasm_line *pos, *n; struct annotation *notes; GType col_types[MAX_ANN_COLS]; @@ -129,7 +131,7 @@ static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym, gtk_list_store_append(store, &iter); if (perf_evsel__is_group_event(evsel)) { - for (i = 0; i < evsel->nr_members; i++) { + for (i = 0; i < evsel->core.nr_members; i++) { ret += perf_gtk__get_percent(s + ret, sizeof(s) - ret, sym, pos, @@ -143,7 +145,7 @@ static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym, if (ret) gtk_list_store_set(store, &iter, ANN_COL__PERCENT, s, -1); - if (perf_gtk__get_offset(s, sizeof(s), sym, map, pos)) + if (perf_gtk__get_offset(s, sizeof(s), ms, pos)) gtk_list_store_set(store, &iter, ANN_COL__OFFSET, s, -1); if (perf_gtk__get_line(s, sizeof(s), pos)) gtk_list_store_set(store, &iter, ANN_COL__LINE, s, -1); @@ -159,23 +161,23 @@ static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym, return 0; } -static int symbol__gtk_annotate(struct symbol *sym, struct map *map, - struct perf_evsel *evsel, +static int symbol__gtk_annotate(struct map_symbol *ms, struct evsel *evsel, struct hist_browser_timer *hbt) { + struct symbol *sym = ms->sym; GtkWidget *window; GtkWidget *notebook; GtkWidget *scrolled_window; GtkWidget *tab_label; int err; - if (map->dso->annotate_warned) + if (ms->map->dso->annotate_warned) return -1; - err = symbol__annotate(sym, map, evsel, 0, &annotation__default_options, NULL); + err = symbol__annotate(ms, evsel, 0, &annotation__default_options, NULL); if (err) { char msg[BUFSIZ]; - symbol__strerror_disassemble(sym, map, err, msg, sizeof(msg)); + symbol__strerror_disassemble(ms, err, msg, sizeof(msg)); ui__error("Couldn't annotate %s: %s\n", sym->name, msg); return -1; } @@ -233,15 +235,15 @@ static int symbol__gtk_annotate(struct symbol *sym, struct map *map, gtk_notebook_append_page(GTK_NOTEBOOK(notebook), scrolled_window, tab_label); - perf_gtk__annotate_symbol(scrolled_window, sym, map, evsel, hbt); + perf_gtk__annotate_symbol(scrolled_window, ms, evsel, hbt); return 0; } int hist_entry__gtk_annotate(struct hist_entry *he, - struct perf_evsel *evsel, + struct evsel *evsel, struct hist_browser_timer *hbt) { - return symbol__gtk_annotate(he->ms.sym, he->ms.map, evsel, hbt); + return symbol__gtk_annotate(&he->ms, evsel, hbt); } void perf_gtk__show_annotations(void) diff --git a/tools/perf/ui/gtk/browser.c b/tools/perf/ui/gtk/browser.c index 4820e25ac68d..8f3e43d148a8 100644 --- a/tools/perf/ui/gtk/browser.c +++ b/tools/perf/ui/gtk/browser.c @@ -1,6 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#include "../evlist.h" -#include "../cache.h" #include "../evsel.h" #include "../sort.h" #include "../hist.h" diff --git a/tools/perf/ui/gtk/gtk.h b/tools/perf/ui/gtk/gtk.h index 9846ea5c831b..a9563932fa04 100644 --- a/tools/perf/ui/gtk/gtk.h +++ b/tools/perf/ui/gtk/gtk.h @@ -52,16 +52,16 @@ static inline GtkWidget *perf_gtk__setup_info_bar(void) } #endif -struct perf_evsel; -struct perf_evlist; +struct evsel; +struct evlist; struct hist_entry; struct hist_browser_timer; -int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help, +int perf_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 perf_evsel *evsel, + struct evsel *evsel, struct hist_browser_timer *hbt); void perf_gtk__show_annotations(void); diff --git a/tools/perf/ui/gtk/helpline.c b/tools/perf/ui/gtk/helpline.c index fbf1ea9ce9a2..e40a006aead8 100644 --- a/tools/perf/ui/gtk/helpline.c +++ b/tools/perf/ui/gtk/helpline.c @@ -1,11 +1,11 @@ // SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <string.h> +#include <linux/kernel.h> #include "gtk.h" #include "../ui.h" #include "../helpline.h" -#include "../../util/debug.h" static void gtk_helpline_pop(void) { diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c index 3955ed1d1bd9..ed1a97b2c4b0 100644 --- a/tools/perf/ui/gtk/hists.c +++ b/tools/perf/ui/gtk/hists.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 #include "../evlist.h" -#include "../cache.h" #include "../callchain.h" #include "../evsel.h" #include "../sort.h" @@ -9,6 +8,7 @@ #include "../string2.h" #include "gtk.h" #include <signal.h> +#include <stdlib.h> #include <linux/string.h> #define MAX_COLUMNS 32 @@ -590,12 +590,12 @@ static void perf_gtk__show_hierarchy(GtkWidget *window, struct hists *hists, gtk_container_add(GTK_CONTAINER(window), view); } -int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, +int perf_evlist__gtk_browse_hists(struct evlist *evlist, const char *help, struct hist_browser_timer *hbt __maybe_unused, float min_pcnt) { - struct perf_evsel *pos; + struct evsel *pos; GtkWidget *vbox; GtkWidget *notebook; GtkWidget *info_bar; @@ -645,7 +645,7 @@ int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, if (!perf_evsel__is_group_leader(pos)) continue; - if (pos->nr_members > 1) { + if (pos->core.nr_members > 1) { perf_evsel__group_desc(pos, buf, size); evname = buf; } diff --git a/tools/perf/ui/gtk/progress.c b/tools/perf/ui/gtk/progress.c index b6ad8857da78..eea6fcde518a 100644 --- a/tools/perf/ui/gtk/progress.c +++ b/tools/perf/ui/gtk/progress.c @@ -3,7 +3,6 @@ #include "gtk.h" #include "../progress.h" -#include "util.h" static GtkWidget *dialog; static GtkWidget *progress; diff --git a/tools/perf/ui/gtk/setup.c b/tools/perf/ui/gtk/setup.c index 506e73b3834c..f5eee4d66873 100644 --- a/tools/perf/ui/gtk/setup.c +++ b/tools/perf/ui/gtk/setup.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "gtk.h" -#include "../../util/cache.h" -#include "../../util/debug.h" +#include <linux/compiler.h> +#include "../util.h" extern struct perf_error_ops perf_gtk_eops; diff --git a/tools/perf/ui/gtk/util.c b/tools/perf/ui/gtk/util.c index c28bdb7517ac..c47f5c387838 100644 --- a/tools/perf/ui/gtk/util.c +++ b/tools/perf/ui/gtk/util.c @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 #include "../util.h" -#include "../../util/debug.h" #include "gtk.h" +#include <stdlib.h> #include <string.h> #include <linux/zalloc.h> |