aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/gtk/annotate.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2013-03-05 00:53:21 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-03-15 12:06:04 -0400
commitdb8fd07a541fc2d5e8076f0151286e19591465b3 (patch)
tree50b9bd5d03c7f761ff6f295bdebdf0be49729662 /tools/perf/ui/gtk/annotate.c
parentacf2892270dcc4288c572b1159474c81f3819749 (diff)
perf annotate: Pass evsel instead of evidx on annotation functions
Pass evsel instead of evidx. This is a preparation for supporting event group view in annotation and no functional change is intended. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1362462812-30885-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/gtk/annotate.c')
-rw-r--r--tools/perf/ui/gtk/annotate.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui/gtk/annotate.c
index 7d8dc581a545..6e2fc7e3f093 100644
--- a/tools/perf/ui/gtk/annotate.c
+++ b/tools/perf/ui/gtk/annotate.c
@@ -1,6 +1,7 @@
1#include "gtk.h" 1#include "gtk.h"
2#include "util/debug.h" 2#include "util/debug.h"
3#include "util/annotate.h" 3#include "util/annotate.h"
4#include "util/evsel.h"
4#include "ui/helpline.h" 5#include "ui/helpline.h"
5 6
6 7
@@ -85,7 +86,7 @@ static int perf_gtk__get_line(char *buf, size_t size, struct disasm_line *dl)
85} 86}
86 87
87static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym, 88static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym,
88 struct map *map, int evidx, 89 struct map *map, struct perf_evsel *evsel,
89 struct hist_browser_timer *hbt __maybe_unused) 90 struct hist_browser_timer *hbt __maybe_unused)
90{ 91{
91 struct disasm_line *pos, *n; 92 struct disasm_line *pos, *n;
@@ -121,7 +122,7 @@ static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym,
121 122
122 gtk_list_store_append(store, &iter); 123 gtk_list_store_append(store, &iter);
123 124
124 if (perf_gtk__get_percent(s, sizeof(s), sym, pos, evidx)) 125 if (perf_gtk__get_percent(s, sizeof(s), sym, pos, evsel->idx))
125 gtk_list_store_set(store, &iter, ANN_COL__PERCENT, s, -1); 126 gtk_list_store_set(store, &iter, ANN_COL__PERCENT, s, -1);
126 if (perf_gtk__get_offset(s, sizeof(s), sym, map, pos)) 127 if (perf_gtk__get_offset(s, sizeof(s), sym, map, pos))
127 gtk_list_store_set(store, &iter, ANN_COL__OFFSET, s, -1); 128 gtk_list_store_set(store, &iter, ANN_COL__OFFSET, s, -1);
@@ -139,7 +140,8 @@ static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym,
139 return 0; 140 return 0;
140} 141}
141 142
142int symbol__gtk_annotate(struct symbol *sym, struct map *map, int evidx, 143int symbol__gtk_annotate(struct symbol *sym, struct map *map,
144 struct perf_evsel *evsel,
143 struct hist_browser_timer *hbt) 145 struct hist_browser_timer *hbt)
144{ 146{
145 GtkWidget *window; 147 GtkWidget *window;
@@ -206,7 +208,7 @@ int symbol__gtk_annotate(struct symbol *sym, struct map *map, int evidx,
206 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), scrolled_window, 208 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), scrolled_window,
207 tab_label); 209 tab_label);
208 210
209 perf_gtk__annotate_symbol(scrolled_window, sym, map, evidx, hbt); 211 perf_gtk__annotate_symbol(scrolled_window, sym, map, evsel, hbt);
210 return 0; 212 return 0;
211} 213}
212 214