annotate.c (27eb2c4b3d3e13f376a359e293c212a2e9407af5) annotate.c (fc67297b16da335d610af2fac96233d51146300a)
1#include "gtk.h"
2#include "util/debug.h"
3#include "util/annotate.h"
4#include "util/evsel.h"
5#include "ui/helpline.h"
6
7
8enum {

--- 140 unchanged lines hidden (view full) ---

149 list_for_each_entry_safe(pos, n, &notes->src->source, node) {
150 list_del(&pos->node);
151 disasm_line__free(pos);
152 }
153
154 return 0;
155}
156
1#include "gtk.h"
2#include "util/debug.h"
3#include "util/annotate.h"
4#include "util/evsel.h"
5#include "ui/helpline.h"
6
7
8enum {

--- 140 unchanged lines hidden (view full) ---

149 list_for_each_entry_safe(pos, n, &notes->src->source, node) {
150 list_del(&pos->node);
151 disasm_line__free(pos);
152 }
153
154 return 0;
155}
156
157int symbol__gtk_annotate(struct symbol *sym, struct map *map,
158 struct perf_evsel *evsel,
159 struct hist_browser_timer *hbt)
157static int symbol__gtk_annotate(struct symbol *sym, struct map *map,
158 struct perf_evsel *evsel,
159 struct hist_browser_timer *hbt)
160{
161 GtkWidget *window;
162 GtkWidget *notebook;
163 GtkWidget *scrolled_window;
164 GtkWidget *tab_label;
165
166 if (map->dso->annotate_warned)
167 return -1;

--- 53 unchanged lines hidden (view full) ---

221
222 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), scrolled_window,
223 tab_label);
224
225 perf_gtk__annotate_symbol(scrolled_window, sym, map, evsel, hbt);
226 return 0;
227}
228
160{
161 GtkWidget *window;
162 GtkWidget *notebook;
163 GtkWidget *scrolled_window;
164 GtkWidget *tab_label;
165
166 if (map->dso->annotate_warned)
167 return -1;

--- 53 unchanged lines hidden (view full) ---

221
222 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), scrolled_window,
223 tab_label);
224
225 perf_gtk__annotate_symbol(scrolled_window, sym, map, evsel, hbt);
226 return 0;
227}
228
229int hist_entry__gtk_annotate(struct hist_entry *he,
230 struct perf_evsel *evsel,
231 struct hist_browser_timer *hbt)
232{
233 return symbol__gtk_annotate(he->ms.sym, he->ms.map, evsel, hbt);
234}
235
229void perf_gtk__show_annotations(void)
230{
231 GtkWidget *window;
232
233 if (!perf_gtk__is_active_context(pgctx))
234 return;
235
236 window = pgctx->main_window;
237 gtk_widget_show_all(window);
238
239 perf_gtk__resize_window(window);
240 gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
241
242 gtk_main();
243
244 perf_gtk__deactivate_context(&pgctx);
245}
236void perf_gtk__show_annotations(void)
237{
238 GtkWidget *window;
239
240 if (!perf_gtk__is_active_context(pgctx))
241 return;
242
243 window = pgctx->main_window;
244 gtk_widget_show_all(window);
245
246 perf_gtk__resize_window(window);
247 gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
248
249 gtk_main();
250
251 perf_gtk__deactivate_context(&pgctx);
252}