aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 58c6b63ff049..c2fe16d5e473 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -697,7 +697,8 @@ static int __symbol__account_cycles(struct annotation *notes,
697} 697}
698 698
699static int __symbol__inc_addr_samples(struct symbol *sym, struct map *map, 699static int __symbol__inc_addr_samples(struct symbol *sym, struct map *map,
700 struct annotation *notes, int evidx, u64 addr) 700 struct annotation *notes, int evidx, u64 addr,
701 struct perf_sample *sample __maybe_unused)
701{ 702{
702 unsigned offset; 703 unsigned offset;
703 struct sym_hist *h; 704 struct sym_hist *h;
@@ -738,7 +739,8 @@ static struct annotation *symbol__get_annotation(struct symbol *sym, bool cycles
738} 739}
739 740
740static int symbol__inc_addr_samples(struct symbol *sym, struct map *map, 741static int symbol__inc_addr_samples(struct symbol *sym, struct map *map,
741 int evidx, u64 addr) 742 int evidx, u64 addr,
743 struct perf_sample *sample)
742{ 744{
743 struct annotation *notes; 745 struct annotation *notes;
744 746
@@ -747,7 +749,7 @@ static int symbol__inc_addr_samples(struct symbol *sym, struct map *map,
747 notes = symbol__get_annotation(sym, false); 749 notes = symbol__get_annotation(sym, false);
748 if (notes == NULL) 750 if (notes == NULL)
749 return -ENOMEM; 751 return -ENOMEM;
750 return __symbol__inc_addr_samples(sym, map, notes, evidx, addr); 752 return __symbol__inc_addr_samples(sym, map, notes, evidx, addr, sample);
751} 753}
752 754
753static int symbol__account_cycles(u64 addr, u64 start, 755static int symbol__account_cycles(u64 addr, u64 start,
@@ -811,14 +813,16 @@ int addr_map_symbol__account_cycles(struct addr_map_symbol *ams,
811 return err; 813 return err;
812} 814}
813 815
814int addr_map_symbol__inc_samples(struct addr_map_symbol *ams, int evidx) 816int addr_map_symbol__inc_samples(struct addr_map_symbol *ams, struct perf_sample *sample,
817 int evidx)
815{ 818{
816 return symbol__inc_addr_samples(ams->sym, ams->map, evidx, ams->al_addr); 819 return symbol__inc_addr_samples(ams->sym, ams->map, evidx, ams->al_addr, sample);
817} 820}
818 821
819int hist_entry__inc_addr_samples(struct hist_entry *he, int evidx, u64 ip) 822int hist_entry__inc_addr_samples(struct hist_entry *he, struct perf_sample *sample,
823 int evidx, u64 ip)
820{ 824{
821 return symbol__inc_addr_samples(he->ms.sym, he->ms.map, evidx, ip); 825 return symbol__inc_addr_samples(he->ms.sym, he->ms.map, evidx, ip, sample);
822} 826}
823 827
824static void disasm_line__init_ins(struct disasm_line *dl, struct arch *arch, struct map *map) 828static void disasm_line__init_ins(struct disasm_line *dl, struct arch *arch, struct map *map)