@@ -2175,14 +2175,16 @@ struct hist_browser *hist_browser__new(struct hists *hists)
21752175static struct hist_browser *
21762176perf_evsel_browser__new (struct perf_evsel * evsel ,
21772177 struct hist_browser_timer * hbt ,
2178- struct perf_env * env )
2178+ struct perf_env * env ,
2179+ struct annotation_options * annotation_opts )
21792180{
21802181 struct hist_browser * browser = hist_browser__new (evsel__hists (evsel ));
21812182
21822183 if (browser ) {
21832184 browser -> hbt = hbt ;
21842185 browser -> env = env ;
21852186 browser -> title = hists_browser__scnprintf_title ;
2187+ browser -> annotation_opts = annotation_opts ;
21862188 }
21872189 return browser ;
21882190}
@@ -2344,7 +2346,8 @@ do_annotate(struct hist_browser *browser, struct popup_action *act)
23442346 return 0 ;
23452347
23462348 evsel = hists_to_evsel (browser -> hists );
2347- err = map_symbol__tui_annotate (& act -> ms , evsel , browser -> hbt );
2349+ err = map_symbol__tui_annotate (& act -> ms , evsel , browser -> hbt ,
2350+ browser -> annotation_opts );
23482351 he = hist_browser__selected_entry (browser );
23492352 /*
23502353 * offer option to annotate the other branch source or target
@@ -2697,10 +2700,11 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
26972700 struct hist_browser_timer * hbt ,
26982701 float min_pcnt ,
26992702 struct perf_env * env ,
2700- bool warn_lost_event )
2703+ bool warn_lost_event ,
2704+ struct annotation_options * annotation_opts )
27012705{
27022706 struct hists * hists = evsel__hists (evsel );
2703- struct hist_browser * browser = perf_evsel_browser__new (evsel , hbt , env );
2707+ struct hist_browser * browser = perf_evsel_browser__new (evsel , hbt , env , annotation_opts );
27042708 struct branch_info * bi ;
27052709#define MAX_OPTIONS 16
27062710 char * options [MAX_OPTIONS ];
@@ -3062,6 +3066,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
30623066struct perf_evsel_menu {
30633067 struct ui_browser b ;
30643068 struct perf_evsel * selection ;
3069+ struct annotation_options * annotation_opts ;
30653070 bool lost_events , lost_events_warned ;
30663071 float min_pcnt ;
30673072 struct perf_env * env ;
@@ -3163,7 +3168,8 @@ static int perf_evsel_menu__run(struct perf_evsel_menu *menu,
31633168 true, hbt ,
31643169 menu -> min_pcnt ,
31653170 menu -> env ,
3166- warn_lost_event );
3171+ warn_lost_event ,
3172+ menu -> annotation_opts );
31673173 ui_browser__show_title (& menu -> b , title );
31683174 switch (key ) {
31693175 case K_TAB :
@@ -3222,7 +3228,8 @@ static int __perf_evlist__tui_browse_hists(struct perf_evlist *evlist,
32223228 struct hist_browser_timer * hbt ,
32233229 float min_pcnt ,
32243230 struct perf_env * env ,
3225- bool warn_lost_event )
3231+ bool warn_lost_event ,
3232+ struct annotation_options * annotation_opts )
32263233{
32273234 struct perf_evsel * pos ;
32283235 struct perf_evsel_menu menu = {
@@ -3237,6 +3244,7 @@ static int __perf_evlist__tui_browse_hists(struct perf_evlist *evlist,
32373244 },
32383245 .min_pcnt = min_pcnt ,
32393246 .env = env ,
3247+ .annotation_opts = annotation_opts ,
32403248 };
32413249
32423250 ui_helpline__push ("Press ESC to exit" );
@@ -3257,7 +3265,8 @@ int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help,
32573265 struct hist_browser_timer * hbt ,
32583266 float min_pcnt ,
32593267 struct perf_env * env ,
3260- bool warn_lost_event )
3268+ bool warn_lost_event ,
3269+ struct annotation_options * annotation_opts )
32613270{
32623271 int nr_entries = evlist -> nr_entries ;
32633272
@@ -3267,7 +3276,8 @@ int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help,
32673276
32683277 return perf_evsel__hists_browse (first , nr_entries , help ,
32693278 false, hbt , min_pcnt ,
3270- env , warn_lost_event );
3279+ env , warn_lost_event ,
3280+ annotation_opts );
32713281 }
32723282
32733283 if (symbol_conf .event_group ) {
@@ -3285,5 +3295,6 @@ int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help,
32853295
32863296 return __perf_evlist__tui_browse_hists (evlist , nr_entries , help ,
32873297 hbt , min_pcnt , env ,
3288- warn_lost_event );
3298+ warn_lost_event ,
3299+ annotation_opts );
32893300}
0 commit comments