Lines Matching refs:sym
146 void symbol__annotate_zero_histograms(struct symbol *sym) in symbol__annotate_zero_histograms() argument
148 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_zero_histograms()
158 symbol__size(sym) * sizeof(struct cyc_hist)); in symbol__annotate_zero_histograms()
217 struct symbol *sym = ms->sym; in __symbol__inc_addr_samples() local
225 if ((addr < sym->start || addr >= sym->end) && in __symbol__inc_addr_samples()
226 (addr != sym->end || sym->start != sym->end)) { in __symbol__inc_addr_samples()
228 __func__, __LINE__, sym->name, sym->start, addr, sym->end); in __symbol__inc_addr_samples()
232 offset = addr - sym->start; in __symbol__inc_addr_samples()
236 __func__, __LINE__, sym->name, sym->start, addr, sym->end, sym->type == STT_FUNC); in __symbol__inc_addr_samples()
257 sym->start, sym->name, addr, addr - sym->start, evsel->core.idx, in __symbol__inc_addr_samples()
273 static struct annotated_branch *symbol__find_branch_hist(struct symbol *sym, in symbol__find_branch_hist() argument
276 struct annotation *notes = symbol__annotation(sym); in symbol__find_branch_hist()
278 const size_t size = symbol__size(sym); in symbol__find_branch_hist()
299 struct annotated_source *symbol__hists(struct symbol *sym, int nr_hists) in symbol__hists() argument
301 struct annotation *notes = symbol__annotation(sym); in symbol__hists()
322 struct symbol *sym = ms->sym; in symbol__inc_addr_samples() local
325 if (sym == NULL) in symbol__inc_addr_samples()
327 src = symbol__hists(sym, evsel->evlist->core.nr_entries); in symbol__inc_addr_samples()
358 static int symbol__account_cycles(u64 addr, u64 start, struct symbol *sym, in symbol__account_cycles() argument
366 if (sym == NULL) in symbol__account_cycles()
368 branch = symbol__find_branch_hist(sym, evsel->evlist->nr_br_cntr); in symbol__account_cycles()
371 if (addr < sym->start || addr >= sym->end) in symbol__account_cycles()
375 if (start < sym->start || start >= sym->end) in symbol__account_cycles()
380 offset = addr - sym->start; in symbol__account_cycles()
382 start ? start - sym->start : 0, in symbol__account_cycles()
412 (start->ms.sym == ams->ms.sym || in addr_map_symbol__account_cycles()
413 (ams->ms.sym && in addr_map_symbol__account_cycles()
414 start->addr == ams->ms.sym->start + map__start(ams->ms.map)))) in addr_map_symbol__account_cycles()
420 ams->ms.sym ? ams->ms.sym->start + map__start(ams->ms.map) : 0, in addr_map_symbol__account_cycles()
422 err = symbol__account_cycles(ams->al_addr, saddr, ams->ms.sym, cycles, evsel, br_cntr); in addr_map_symbol__account_cycles()
782 struct symbol *sym = apd->he->ms.sym; in annotation_line__print() local
784 struct annotation *notes = symbol__annotation(sym); in annotation_line__print()
974 void symbol__calc_percent(struct symbol *sym, struct evsel *evsel) in symbol__calc_percent() argument
976 struct annotation *notes = symbol__annotation(sym); in symbol__calc_percent()
978 annotation__calc_percent(notes, evsel, symbol__size(sym)); in symbol__calc_percent()
1013 struct symbol *sym = ms->sym; in symbol__annotate() local
1014 struct annotation *notes = symbol__annotation(sym); in symbol__annotate()
1055 notes->src->start = map__objdump_2mem(ms->map, ms->sym->start); in symbol__annotate()
1057 notes->src->start = map__rip_2objdump(ms->map, ms->sym->start); in symbol__annotate()
1059 return symbol__disassemble(sym, &args); in symbol__annotate()
1187 static void symbol__annotate_hits(struct symbol *sym, struct evsel *evsel) in symbol__annotate_hits() argument
1189 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_hits()
1191 u64 len = symbol__size(sym), offset; in symbol__annotate_hits()
1199 sym->start + offset, entry->nr_samples); in symbol__annotate_hits()
1221 struct symbol *sym = ms->sym; in hist_entry__annotate_printf() local
1226 struct annotation *notes = symbol__annotation(sym); in hist_entry__annotate_printf()
1233 .start = map__rip_2objdump(map, sym->start), in hist_entry__annotate_printf()
1267 symbol__annotate_hits(sym, evsel); in hist_entry__annotate_printf()
1360 static int symbol__annotate_fprintf2(struct symbol *sym, FILE *fp) in symbol__annotate_fprintf2() argument
1362 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_fprintf2()
1393 if (asprintf(&filename, "%s.annotation", ms->sym->name) < 0) in map_symbol__annotation_dump()
1406 ms->sym->name, dso__long_name(map__dso(ms->map)), ev_name); in map_symbol__annotation_dump()
1407 symbol__annotate_fprintf2(ms->sym, fp); in map_symbol__annotation_dump()
1416 void symbol__annotate_zero_histogram(struct symbol *sym, struct evsel *evsel) in symbol__annotate_zero_histogram() argument
1418 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_zero_histogram()
1424 void symbol__annotate_decay_histogram(struct symbol *sym, struct evsel *evsel) in symbol__annotate_decay_histogram() argument
1426 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_decay_histogram()
1485 bool disasm_line__is_valid_local_jump(struct disasm_line *dl, struct symbol *sym) in disasm_line__is_valid_local_jump() argument
1489 dl->ops.target.offset >= (s64)symbol__size(sym)) in disasm_line__is_valid_local_jump()
1496 annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym) in annotation__mark_jump_targets() argument
1501 if (strstr(sym->name, "@plt")) in annotation__mark_jump_targets()
1510 if (!disasm_line__is_valid_local_jump(dl, sym)) in annotation__mark_jump_targets()
1576 annotation__init_column_widths(struct annotation *notes, struct symbol *sym) in annotation__init_column_widths() argument
1579 notes->src->widths.min_addr = hex_width(symbol__size(sym)); in annotation__init_column_widths()
1580 notes->src->widths.max_addr = hex_width(sym->end); in annotation__init_column_widths()
1605 notes->src->start = map__objdump_2mem(ms->map, ms->sym->start); in annotation__toggle_full_addr()
1607 notes->src->start = map__rip_2objdump(ms->map, ms->sym->start); in annotation__toggle_full_addr()
1636 addr = map__rip_2objdump(ms->map, ms->sym->start); in annotation__calc_lines()
1638 false, true, ms->sym->start + al->offset); in annotation__calc_lines()
1647 struct annotation *notes = symbol__annotation(ms->sym); in symbol__calc_lines()
1656 struct symbol *sym = ms->sym; in hist_entry__tty_annotate2() local
1668 ui__error("Couldn't annotate %s:\n%s", sym->name, msg); in hist_entry__tty_annotate2()
1680 buf, percent_type_str(annotate_opts.percent_type), sym->name, dso__long_name(dso)); in hist_entry__tty_annotate2()
1681 symbol__annotate_fprintf2(sym, stdout); in hist_entry__tty_annotate2()
1683 annotated_source__purge(symbol__annotation(sym)->src); in hist_entry__tty_annotate2()
1692 struct symbol *sym = ms->sym; in hist_entry__tty_annotate() local
1702 ui__error("Couldn't annotate %s:\n%s", sym->name, msg); in hist_entry__tty_annotate()
1706 symbol__calc_percent(sym, evsel); in hist_entry__tty_annotate()
1716 annotated_source__purge(symbol__annotation(sym)->src); in hist_entry__tty_annotate()
1723 return use_browser == 1 && perf_hpp_list.sym; in ui__has_annotation()
2132 struct symbol *sym = ms->sym; in symbol__annotate2() local
2133 struct annotation *notes = symbol__annotation(sym); in symbol__annotate2()
2134 size_t size = symbol__size(sym); in symbol__annotate2()
2141 symbol__calc_percent(sym, evsel); in symbol__annotate2()
2144 annotation__mark_jump_targets(notes, sym); in symbol__annotate2()
2150 annotation__init_column_widths(notes, sym); in symbol__annotate2()
2152 sym->annotate2 = 1; in symbol__annotate2()
2547 static struct disasm_line *find_disasm_line(struct symbol *sym, u64 ip, in find_disasm_line() argument
2553 notes = symbol__annotation(sym); in find_disasm_line()
2559 if (sym->start + dl->al.offset == ip) { in find_disasm_line()
2671 notes = symbol__annotation(ms->sym); in annotate_calc_pcrel()
2681 addr = ms->sym->end + offset; in annotate_calc_pcrel()
2737 .ip = ms->sym->start + dl->al.offset, in __hist_entry__get_data_type()
2809 if (ms->map == NULL || ms->sym == NULL) { in hist_entry__get_data_type()
2850 dl = find_disasm_line(ms->sym, ip, /*allow_update=*/true); in hist_entry__get_data_type()
2870 notes = symbol__annotation(ms->sym); in hist_entry__get_data_type()
2967 struct symbol *sym, u64 target) in process_basic_block() argument
2970 struct annotation *notes = symbol__annotation(sym); in process_basic_block()
2991 if (sym->start + dl->al.offset == target) { in process_basic_block()
3008 next_dl = find_disasm_line(sym, sym->start + dl->ops.target.offset, in process_basic_block()
3077 int annotate_get_basic_blocks(struct symbol *sym, s64 src, s64 dst, in annotate_get_basic_blocks() argument
3088 dl = find_disasm_line(sym, src, /*allow_update=*/false); in annotate_get_basic_blocks()
3099 if (process_basic_block(&bb_data, link, sym, dst)) { in annotate_get_basic_blocks()