@@ -1583,10 +1583,9 @@ static void delete_last_nop(struct symbol *sym)
15831583 }
15841584}
15851585
1586- int symbol__strerror_disassemble (struct symbol * sym __maybe_unused , struct map * map ,
1587- int errnum , char * buf , size_t buflen )
1586+ int symbol__strerror_disassemble (struct map_symbol * ms , int errnum , char * buf , size_t buflen )
15881587{
1589- struct dso * dso = map -> dso ;
1588+ struct dso * dso = ms -> map -> dso ;
15901589
15911590 BUG_ON (buflen == 0 );
15921591
@@ -2143,11 +2142,10 @@ void symbol__calc_percent(struct symbol *sym, struct evsel *evsel)
21432142 annotation__calc_percent (notes , evsel , symbol__size (sym ));
21442143}
21452144
2146- int symbol__annotate (struct symbol * sym , struct map * map ,
2147- struct evsel * evsel , size_t privsize ,
2148- struct annotation_options * options ,
2149- struct arch * * parch )
2145+ int symbol__annotate (struct map_symbol * ms , struct evsel * evsel , size_t privsize ,
2146+ struct annotation_options * options , struct arch * * parch )
21502147{
2148+ struct symbol * sym = ms -> sym ;
21512149 struct annotation * notes = symbol__annotation (sym );
21522150 struct annotate_args args = {
21532151 .privsize = privsize ,
@@ -2177,9 +2175,8 @@ int symbol__annotate(struct symbol *sym, struct map *map,
21772175 }
21782176 }
21792177
2180- args .ms .map = map ;
2181- args .ms .sym = sym ;
2182- notes -> start = map__rip_2objdump (map , sym -> start );
2178+ args .ms = * ms ;
2179+ notes -> start = map__rip_2objdump (ms -> map , sym -> start );
21832180
21842181 return symbol__disassemble (sym , & args );
21852182}
@@ -2335,10 +2332,11 @@ static int annotated_source__addr_fmt_width(struct list_head *lines, u64 start)
23352332 return 0 ;
23362333}
23372334
2338- int symbol__annotate_printf (struct symbol * sym , struct map * map ,
2339- struct evsel * evsel ,
2335+ int symbol__annotate_printf (struct map_symbol * ms , struct evsel * evsel ,
23402336 struct annotation_options * opts )
23412337{
2338+ struct map * map = ms -> map ;
2339+ struct symbol * sym = ms -> sym ;
23422340 struct dso * dso = map -> dso ;
23432341 char * filename ;
23442342 const char * d_filename ;
@@ -2742,30 +2740,29 @@ static void annotation__calc_lines(struct annotation *notes, struct map *map,
27422740 resort_source_line (root , & tmp_root );
27432741}
27442742
2745- static void symbol__calc_lines (struct symbol * sym , struct map * map ,
2746- struct rb_root * root ,
2743+ static void symbol__calc_lines (struct map_symbol * ms , struct rb_root * root ,
27472744 struct annotation_options * opts )
27482745{
2749- struct annotation * notes = symbol__annotation (sym );
2746+ struct annotation * notes = symbol__annotation (ms -> sym );
27502747
2751- annotation__calc_lines (notes , map , root , opts );
2748+ annotation__calc_lines (notes , ms -> map , root , opts );
27522749}
27532750
2754- int symbol__tty_annotate2 (struct symbol * sym , struct map * map ,
2755- struct evsel * evsel ,
2751+ int symbol__tty_annotate2 (struct map_symbol * ms , struct evsel * evsel ,
27562752 struct annotation_options * opts )
27572753{
2758- struct dso * dso = map -> dso ;
2754+ struct dso * dso = ms -> map -> dso ;
2755+ struct symbol * sym = ms -> sym ;
27592756 struct rb_root source_line = RB_ROOT ;
27602757 struct hists * hists = evsel__hists (evsel );
27612758 char buf [1024 ];
27622759
2763- if (symbol__annotate2 (sym , map , evsel , opts , NULL ) < 0 )
2760+ if (symbol__annotate2 (ms , evsel , opts , NULL ) < 0 )
27642761 return -1 ;
27652762
27662763 if (opts -> print_lines ) {
27672764 srcline_full_filename = opts -> full_path ;
2768- symbol__calc_lines (sym , map , & source_line , opts );
2765+ symbol__calc_lines (ms , & source_line , opts );
27692766 print_summary (& source_line , dso -> long_name );
27702767 }
27712768
@@ -2779,25 +2776,25 @@ int symbol__tty_annotate2(struct symbol *sym, struct map *map,
27792776 return 0 ;
27802777}
27812778
2782- int symbol__tty_annotate (struct symbol * sym , struct map * map ,
2783- struct evsel * evsel ,
2779+ int symbol__tty_annotate (struct map_symbol * ms , struct evsel * evsel ,
27842780 struct annotation_options * opts )
27852781{
2786- struct dso * dso = map -> dso ;
2782+ struct dso * dso = ms -> map -> dso ;
2783+ struct symbol * sym = ms -> sym ;
27872784 struct rb_root source_line = RB_ROOT ;
27882785
2789- if (symbol__annotate (sym , map , evsel , 0 , opts , NULL ) < 0 )
2786+ if (symbol__annotate (ms , evsel , 0 , opts , NULL ) < 0 )
27902787 return -1 ;
27912788
27922789 symbol__calc_percent (sym , evsel );
27932790
27942791 if (opts -> print_lines ) {
27952792 srcline_full_filename = opts -> full_path ;
2796- symbol__calc_lines (sym , map , & source_line , opts );
2793+ symbol__calc_lines (ms , & source_line , opts );
27972794 print_summary (& source_line , dso -> long_name );
27982795 }
27992796
2800- symbol__annotate_printf (sym , map , evsel , opts );
2797+ symbol__annotate_printf (ms , evsel , opts );
28012798
28022799 annotated_source__purge (symbol__annotation (sym )-> src );
28032800
@@ -3051,9 +3048,10 @@ void annotation_line__write(struct annotation_line *al, struct annotation *notes
30513048 wops -> write_graph );
30523049}
30533050
3054- int symbol__annotate2 (struct symbol * sym , struct map * map , struct evsel * evsel ,
3051+ int symbol__annotate2 (struct map_symbol * ms , struct evsel * evsel ,
30553052 struct annotation_options * options , struct arch * * parch )
30563053{
3054+ struct symbol * sym = ms -> sym ;
30573055 struct annotation * notes = symbol__annotation (sym );
30583056 size_t size = symbol__size (sym );
30593057 int nr_pcnt = 1 , err ;
@@ -3065,7 +3063,7 @@ int symbol__annotate2(struct symbol *sym, struct map *map, struct evsel *evsel,
30653063 if (perf_evsel__is_group_event (evsel ))
30663064 nr_pcnt = evsel -> core .nr_members ;
30673065
3068- err = symbol__annotate (sym , map , evsel , 0 , options , parch );
3066+ err = symbol__annotate (ms , evsel , 0 , options , parch );
30693067 if (err )
30703068 goto out_free_offsets ;
30713069
0 commit comments