@@ -243,7 +243,7 @@ static int call__parse(struct arch *arch, struct ins_operands *ops, struct map_s
243243 char * endptr , * tok , * name ;
244244 struct map * map = ms -> map ;
245245 struct addr_map_symbol target = {
246- .map = map ,
246+ .ms = { . map = map , } ,
247247 };
248248
249249 ops -> target .addr = strtoull (ops -> raw , & endptr , 16 );
@@ -272,8 +272,8 @@ static int call__parse(struct arch *arch, struct ins_operands *ops, struct map_s
272272 target .addr = map__objdump_2mem (map , ops -> target .addr );
273273
274274 if (map_groups__find_ams (map -> groups , & target ) == 0 &&
275- map__rip_2objdump (target .map , map -> map_ip (target .map , target .addr )) == ops -> target .addr )
276- ops -> target .sym = target .sym ;
275+ map__rip_2objdump (target .ms . map , map -> map_ip (target . ms .map , target .addr )) == ops -> target .addr )
276+ ops -> target .sym = target .ms . sym ;
277277
278278 return 0 ;
279279
@@ -332,7 +332,7 @@ static int jump__parse(struct arch *arch, struct ins_operands *ops, struct map_s
332332 struct map * map = ms -> map ;
333333 struct symbol * sym = ms -> sym ;
334334 struct addr_map_symbol target = {
335- .map = map ,
335+ .ms = { . map = map , } ,
336336 };
337337 const char * c = strchr (ops -> raw , ',' );
338338 u64 start , end ;
@@ -392,8 +392,8 @@ static int jump__parse(struct arch *arch, struct ins_operands *ops, struct map_s
392392 * the symbol searching and disassembly should be done.
393393 */
394394 if (map_groups__find_ams (map -> groups , & target ) == 0 &&
395- map__rip_2objdump (target .map , map -> map_ip (target .map , target .addr )) == ops -> target .addr )
396- ops -> target .sym = target .sym ;
395+ map__rip_2objdump (target .ms . map , map -> map_ip (target . ms .map , target .addr )) == ops -> target .addr )
396+ ops -> target .sym = target .ms . sym ;
397397
398398 if (!ops -> target .outside ) {
399399 ops -> target .offset = target .addr - start ;
@@ -865,14 +865,15 @@ static int __symbol__account_cycles(struct cyc_hist *ch,
865865 return 0 ;
866866}
867867
868- static int __symbol__inc_addr_samples (struct symbol * sym , struct map * map ,
868+ static int __symbol__inc_addr_samples (struct map_symbol * ms ,
869869 struct annotated_source * src , int evidx , u64 addr ,
870870 struct perf_sample * sample )
871871{
872+ struct symbol * sym = ms -> sym ;
872873 unsigned offset ;
873874 struct sym_hist * h ;
874875
875- pr_debug3 ("%s: addr=%#" PRIx64 "\n" , __func__ , map -> unmap_ip (map , addr ));
876+ pr_debug3 ("%s: addr=%#" PRIx64 "\n" , __func__ , ms -> map -> unmap_ip (ms -> map , addr ));
876877
877878 if ((addr < sym -> start || addr >= sym -> end ) &&
878879 (addr != sym -> end || sym -> start != sym -> end )) {
@@ -939,17 +940,17 @@ struct annotated_source *symbol__hists(struct symbol *sym, int nr_hists)
939940 return notes -> src ;
940941}
941942
942- static int symbol__inc_addr_samples (struct symbol * sym , struct map * map ,
943+ static int symbol__inc_addr_samples (struct map_symbol * ms ,
943944 struct evsel * evsel , u64 addr ,
944945 struct perf_sample * sample )
945946{
947+ struct symbol * sym = ms -> sym ;
946948 struct annotated_source * src ;
947949
948950 if (sym == NULL )
949951 return 0 ;
950952 src = symbol__hists (sym , evsel -> evlist -> core .nr_entries );
951- return (src ) ? __symbol__inc_addr_samples (sym , map , src , evsel -> idx ,
952- addr , sample ) : 0 ;
953+ return src ? __symbol__inc_addr_samples (ms , src , evsel -> idx , addr , sample ) : 0 ;
953954}
954955
955956static int symbol__account_cycles (u64 addr , u64 start ,
@@ -997,17 +998,17 @@ int addr_map_symbol__account_cycles(struct addr_map_symbol *ams,
997998 * it starts on the function start.
998999 */
9991000 if (start &&
1000- (start -> sym == ams -> sym ||
1001- (ams -> sym &&
1002- start -> addr == ams -> sym -> start + ams -> map -> start )))
1001+ (start -> ms . sym == ams -> ms . sym ||
1002+ (ams -> ms . sym &&
1003+ start -> addr == ams -> ms . sym -> start + ams -> ms . map -> start )))
10031004 saddr = start -> al_addr ;
10041005 if (saddr == 0 )
10051006 pr_debug2 ("BB with bad start: addr %" PRIx64 " start %" PRIx64 " sym %" PRIx64 " saddr %" PRIx64 "\n" ,
10061007 ams -> addr ,
10071008 start ? start -> addr : 0 ,
1008- ams -> sym ? ams -> sym -> start + ams -> map -> start : 0 ,
1009+ ams -> ms . sym ? ams -> ms . sym -> start + ams -> ms . map -> start : 0 ,
10091010 saddr );
1010- err = symbol__account_cycles (ams -> al_addr , saddr , ams -> sym , cycles );
1011+ err = symbol__account_cycles (ams -> al_addr , saddr , ams -> ms . sym , cycles );
10111012 if (err )
10121013 pr_debug2 ("account_cycles failed %d\n" , err );
10131014 return err ;
@@ -1093,13 +1094,13 @@ void annotation__compute_ipc(struct annotation *notes, size_t size)
10931094int addr_map_symbol__inc_samples (struct addr_map_symbol * ams , struct perf_sample * sample ,
10941095 struct evsel * evsel )
10951096{
1096- return symbol__inc_addr_samples (ams -> sym , ams -> map , evsel , ams -> al_addr , sample );
1097+ return symbol__inc_addr_samples (& ams -> ms , evsel , ams -> al_addr , sample );
10971098}
10981099
10991100int hist_entry__inc_addr_samples (struct hist_entry * he , struct perf_sample * sample ,
11001101 struct evsel * evsel , u64 ip )
11011102{
1102- return symbol__inc_addr_samples (he -> ms . sym , he -> ms . map , evsel , ip , sample );
1103+ return symbol__inc_addr_samples (& he -> ms , evsel , ip , sample );
11031104}
11041105
11051106static void disasm_line__init_ins (struct disasm_line * dl , struct arch * arch , struct map_symbol * ms )
@@ -1540,13 +1541,13 @@ static int symbol__parse_objdump_line(struct symbol *sym,
15401541 /* kcore has no symbols, so add the call target symbol */
15411542 if (dl -> ins .ops && ins__is_call (& dl -> ins ) && !dl -> ops .target .sym ) {
15421543 struct addr_map_symbol target = {
1543- .map = map ,
15441544 .addr = dl -> ops .target .addr ,
1545+ .ms = { .map = map , },
15451546 };
15461547
15471548 if (!map_groups__find_ams (map -> groups , & target ) &&
1548- target .sym -> start == target .al_addr )
1549- dl -> ops .target .sym = target .sym ;
1549+ target .ms . sym -> start == target .al_addr )
1550+ dl -> ops .target .sym = target .ms . sym ;
15501551 }
15511552
15521553 annotation_line__add (& dl -> al , & notes -> src -> source );
0 commit comments