Lines Matching refs:sym
243 ops->target.sym = target.sym; in call__parse()
263 if (ops->target.sym) in call__scnprintf()
264 return scnprintf(bf, size, "%-6s %s", ins->name, ops->target.sym->name); in call__scnprintf()
300 struct symbol *sym = ms->sym; in jump__parse() local
338 start = map->unmap_ip(map, sym->start), in jump__parse()
339 end = map->unmap_ip(map, sym->end); in jump__parse()
363 ops->target.sym = target.sym; in jump__parse()
383 if (ops->target.outside && ops->target.sym != NULL) in jump__scnprintf()
384 return scnprintf(bf, size, "%-6s %s", ins->name, ops->target.sym->name); in jump__scnprintf()
759 static int symbol__alloc_hist_cycles(struct symbol *sym) in symbol__alloc_hist_cycles() argument
761 struct annotation *notes = symbol__annotation(sym); in symbol__alloc_hist_cycles()
762 const size_t size = symbol__size(sym); in symbol__alloc_hist_cycles()
770 void symbol__annotate_zero_histograms(struct symbol *sym) in symbol__annotate_zero_histograms() argument
772 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_zero_histograms()
780 symbol__size(sym) * sizeof(struct cyc_hist)); in symbol__annotate_zero_histograms()
831 static int __symbol__inc_addr_samples(struct symbol *sym, struct map *map, in __symbol__inc_addr_samples() argument
840 if ((addr < sym->start || addr >= sym->end) && in __symbol__inc_addr_samples()
841 (addr != sym->end || sym->start != sym->end)) { in __symbol__inc_addr_samples()
843 __func__, __LINE__, sym->name, sym->start, addr, sym->end); in __symbol__inc_addr_samples()
847 offset = addr - sym->start; in __symbol__inc_addr_samples()
851 __func__, __LINE__, sym->name, sym->start, addr, sym->end, sym->type == STT_FUNC); in __symbol__inc_addr_samples()
861 sym->start, sym->name, addr, addr - sym->start, evidx, in __symbol__inc_addr_samples()
866 static struct cyc_hist *symbol__cycles_hist(struct symbol *sym) in symbol__cycles_hist() argument
868 struct annotation *notes = symbol__annotation(sym); in symbol__cycles_hist()
879 symbol__alloc_hist_cycles(sym); in symbol__cycles_hist()
885 struct annotated_source *symbol__hists(struct symbol *sym, int nr_hists) in symbol__hists() argument
887 struct annotation *notes = symbol__annotation(sym); in symbol__hists()
898 annotated_source__alloc_histograms(notes->src, symbol__size(sym), in symbol__hists()
905 static int symbol__inc_addr_samples(struct symbol *sym, struct map *map, in symbol__inc_addr_samples() argument
911 if (sym == NULL) in symbol__inc_addr_samples()
913 src = symbol__hists(sym, evsel->evlist->nr_entries); in symbol__inc_addr_samples()
916 return __symbol__inc_addr_samples(sym, map, src, evsel->idx, addr, sample); in symbol__inc_addr_samples()
920 struct symbol *sym, unsigned cycles) in symbol__account_cycles() argument
925 if (sym == NULL) in symbol__account_cycles()
927 cycles_hist = symbol__cycles_hist(sym); in symbol__account_cycles()
930 if (addr < sym->start || addr >= sym->end) in symbol__account_cycles()
934 if (start < sym->start || start >= sym->end) in symbol__account_cycles()
939 offset = addr - sym->start; in symbol__account_cycles()
941 start ? start - sym->start : 0, in symbol__account_cycles()
964 (start->sym == ams->sym || in addr_map_symbol__account_cycles()
965 (ams->sym && in addr_map_symbol__account_cycles()
966 start->addr == ams->sym->start + ams->map->start))) in addr_map_symbol__account_cycles()
972 ams->sym ? ams->sym->start + ams->map->start : 0, in addr_map_symbol__account_cycles()
974 err = symbol__account_cycles(ams->al_addr, saddr, ams->sym, cycles); in addr_map_symbol__account_cycles()
1046 return symbol__inc_addr_samples(ams->sym, ams->map, evsel, ams->al_addr, sample); in addr_map_symbol__inc_samples()
1052 return symbol__inc_addr_samples(he->ms.sym, he->ms.map, evsel, ip, sample); in hist_entry__inc_addr_samples()
1325 annotation_line__print(struct annotation_line *al, struct symbol *sym, u64 start, in annotation_line__print() argument
1338 struct annotation *notes = symbol__annotation(sym); in annotation_line__print()
1363 annotation_line__print(queue, sym, start, evsel, len, in annotation_line__print()
1446 static int symbol__parse_objdump_line(struct symbol *sym, FILE *file, in symbol__parse_objdump_line() argument
1451 struct annotation *notes = symbol__annotation(sym); in symbol__parse_objdump_line()
1484 u64 start = map__rip_2objdump(map, sym->start), in symbol__parse_objdump_line()
1485 end = map__rip_2objdump(map, sym->end); in symbol__parse_objdump_line()
1497 args->ms.sym = sym; in symbol__parse_objdump_line()
1508 map__rip_2objdump(map, sym->start); in symbol__parse_objdump_line()
1513 if (dl->ins.ops && ins__is_call(&dl->ins) && !dl->ops.target.sym) { in symbol__parse_objdump_line()
1520 target.sym->start == target.al_addr) in symbol__parse_objdump_line()
1521 dl->ops.target.sym = target.sym; in symbol__parse_objdump_line()
1534 static void delete_last_nop(struct symbol *sym) in delete_last_nop() argument
1536 struct annotation *notes = symbol__annotation(sym); in delete_last_nop()
1558 int symbol__strerror_disassemble(struct symbol *sym __maybe_unused, struct map *map, in symbol__strerror_disassemble()
1648 static int symbol__disassemble(struct symbol *sym, struct annotate_args *args) in symbol__disassemble() argument
1669 symfs_filename, sym->name, map->unmap_ip(map, sym->start), in symbol__disassemble()
1670 map->unmap_ip(map, sym->end)); in symbol__disassemble()
1673 dso, dso->long_name, sym, sym->name); in symbol__disassemble()
1677 kce.addr = map__rip_2objdump(map, sym->start); in symbol__disassemble()
1678 kce.offs = sym->start; in symbol__disassemble()
1679 kce.len = sym->end - sym->start; in symbol__disassemble()
1703 map__rip_2objdump(map, sym->start), in symbol__disassemble()
1704 map__rip_2objdump(map, sym->end), in symbol__disassemble()
1757 if (symbol__parse_objdump_line(sym, file, args, &lineno) < 0) in symbol__disassemble()
1770 delete_last_nop(sym); in symbol__disassemble()
1853 void symbol__calc_percent(struct symbol *sym, struct perf_evsel *evsel) in symbol__calc_percent() argument
1855 struct annotation *notes = symbol__annotation(sym); in symbol__calc_percent()
1857 annotation__calc_percent(notes, evsel, symbol__size(sym)); in symbol__calc_percent()
1860 int symbol__annotate(struct symbol *sym, struct map *map, in symbol__annotate() argument
1894 args.ms.sym = sym; in symbol__annotate()
1896 return symbol__disassemble(sym, &args); in symbol__annotate()
2024 static void symbol__annotate_hits(struct symbol *sym, struct perf_evsel *evsel) in symbol__annotate_hits() argument
2026 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_hits()
2028 u64 len = symbol__size(sym), offset; in symbol__annotate_hits()
2033 sym->start + offset, h->addr[offset].nr_samples); in symbol__annotate_hits()
2050 int symbol__annotate_printf(struct symbol *sym, struct map *map, in symbol__annotate_printf() argument
2058 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_printf()
2061 u64 start = map__rip_2objdump(map, sym->start); in symbol__annotate_printf()
2079 len = symbol__size(sym); in symbol__annotate_printf()
2098 symbol__annotate_hits(sym, evsel); in symbol__annotate_printf()
2110 err = annotation_line__print(pos, sym, start, evsel, len, in symbol__annotate_printf()
2189 static int symbol__annotate_fprintf2(struct symbol *sym, FILE *fp, in symbol__annotate_fprintf2() argument
2192 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_fprintf2()
2224 if (asprintf(&filename, "%s.annotation", ms->sym->name) < 0) in map_symbol__annotation_dump()
2237 ms->sym->name, ms->map->dso->long_name, ev_name); in map_symbol__annotation_dump()
2238 symbol__annotate_fprintf2(ms->sym, fp, opts); in map_symbol__annotation_dump()
2247 void symbol__annotate_zero_histogram(struct symbol *sym, int evidx) in symbol__annotate_zero_histogram() argument
2249 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_zero_histogram()
2255 void symbol__annotate_decay_histogram(struct symbol *sym, int evidx) in symbol__annotate_decay_histogram() argument
2257 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_decay_histogram()
2259 int len = symbol__size(sym), offset; in symbol__annotate_decay_histogram()
2306 bool disasm_line__is_valid_local_jump(struct disasm_line *dl, struct symbol *sym) in disasm_line__is_valid_local_jump() argument
2310 dl->ops.target.offset >= (s64)symbol__size(sym)) in disasm_line__is_valid_local_jump()
2316 void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym) in annotation__mark_jump_targets() argument
2318 u64 offset, size = symbol__size(sym); in annotation__mark_jump_targets()
2321 if (strstr(sym->name, "@plt")) in annotation__mark_jump_targets()
2330 if (!disasm_line__is_valid_local_jump(dl, sym)) in annotation__mark_jump_targets()
2386 void annotation__init_column_widths(struct annotation *notes, struct symbol *sym) in annotation__init_column_widths() argument
2389 notes->widths.min_addr = hex_width(symbol__size(sym)); in annotation__init_column_widths()
2390 notes->widths.max_addr = hex_width(sym->end); in annotation__init_column_widths()
2439 static void symbol__calc_lines(struct symbol *sym, struct map *map, in symbol__calc_lines() argument
2443 struct annotation *notes = symbol__annotation(sym); in symbol__calc_lines()
2448 int symbol__tty_annotate2(struct symbol *sym, struct map *map, in symbol__tty_annotate2() argument
2457 if (symbol__annotate2(sym, map, evsel, opts, NULL) < 0) in symbol__tty_annotate2()
2462 symbol__calc_lines(sym, map, &source_line, opts); in symbol__tty_annotate2()
2468 buf, percent_type_str(opts->percent_type), sym->name, dso->long_name); in symbol__tty_annotate2()
2469 symbol__annotate_fprintf2(sym, stdout, opts); in symbol__tty_annotate2()
2471 annotated_source__purge(symbol__annotation(sym)->src); in symbol__tty_annotate2()
2476 int symbol__tty_annotate(struct symbol *sym, struct map *map, in symbol__tty_annotate() argument
2483 if (symbol__annotate(sym, map, evsel, 0, opts, NULL) < 0) in symbol__tty_annotate()
2486 symbol__calc_percent(sym, evsel); in symbol__tty_annotate()
2490 symbol__calc_lines(sym, map, &source_line, opts); in symbol__tty_annotate()
2494 symbol__annotate_printf(sym, map, evsel, opts); in symbol__tty_annotate()
2496 annotated_source__purge(symbol__annotation(sym)->src); in symbol__tty_annotate()
2503 return use_browser == 1 && perf_hpp_list.sym; in ui__has_annotation()
2727 int symbol__annotate2(struct symbol *sym, struct map *map, struct perf_evsel *evsel, in symbol__annotate2() argument
2730 struct annotation *notes = symbol__annotation(sym); in symbol__annotate2()
2731 size_t size = symbol__size(sym); in symbol__annotate2()
2741 err = symbol__annotate(sym, map, evsel, 0, options, parch); in symbol__annotate2()
2747 symbol__calc_percent(sym, evsel); in symbol__annotate2()
2749 notes->start = map__rip_2objdump(map, sym->start); in symbol__annotate2()
2752 annotation__mark_jump_targets(notes, sym); in symbol__annotate2()
2754 annotation__init_column_widths(notes, sym); in symbol__annotate2()