Lines Matching refs:sym
275 ops->target.sym = target.sym; in call__parse()
295 if (ops->target.sym) in call__scnprintf()
296 return scnprintf(bf, size, "%-*s %s", max_ins_name, ins->name, ops->target.sym->name); in call__scnprintf()
332 struct symbol *sym = ms->sym; in jump__parse() local
370 start = map->unmap_ip(map, sym->start), in jump__parse()
371 end = map->unmap_ip(map, sym->end); in jump__parse()
395 ops->target.sym = target.sym; in jump__parse()
415 if (ops->target.outside && ops->target.sym != NULL) in jump__scnprintf()
416 return scnprintf(bf, size, "%-*s %s", max_ins_name, ins->name, ops->target.sym->name); in jump__scnprintf()
791 static int symbol__alloc_hist_cycles(struct symbol *sym) in symbol__alloc_hist_cycles() argument
793 struct annotation *notes = symbol__annotation(sym); in symbol__alloc_hist_cycles()
794 const size_t size = symbol__size(sym); in symbol__alloc_hist_cycles()
802 void symbol__annotate_zero_histograms(struct symbol *sym) in symbol__annotate_zero_histograms() argument
804 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_zero_histograms()
812 symbol__size(sym) * sizeof(struct cyc_hist)); in symbol__annotate_zero_histograms()
863 static int __symbol__inc_addr_samples(struct symbol *sym, struct map *map, in __symbol__inc_addr_samples() argument
872 if ((addr < sym->start || addr >= sym->end) && in __symbol__inc_addr_samples()
873 (addr != sym->end || sym->start != sym->end)) { in __symbol__inc_addr_samples()
875 __func__, __LINE__, sym->name, sym->start, addr, sym->end); in __symbol__inc_addr_samples()
879 offset = addr - sym->start; in __symbol__inc_addr_samples()
883 __func__, __LINE__, sym->name, sym->start, addr, sym->end, sym->type == STT_FUNC); in __symbol__inc_addr_samples()
893 sym->start, sym->name, addr, addr - sym->start, evidx, in __symbol__inc_addr_samples()
898 static struct cyc_hist *symbol__cycles_hist(struct symbol *sym) in symbol__cycles_hist() argument
900 struct annotation *notes = symbol__annotation(sym); in symbol__cycles_hist()
911 symbol__alloc_hist_cycles(sym); in symbol__cycles_hist()
917 struct annotated_source *symbol__hists(struct symbol *sym, int nr_hists) in symbol__hists() argument
919 struct annotation *notes = symbol__annotation(sym); in symbol__hists()
930 annotated_source__alloc_histograms(notes->src, symbol__size(sym), in symbol__hists()
937 static int symbol__inc_addr_samples(struct symbol *sym, struct map *map, in symbol__inc_addr_samples() argument
943 if (sym == NULL) in symbol__inc_addr_samples()
945 src = symbol__hists(sym, evsel->evlist->core.nr_entries); in symbol__inc_addr_samples()
946 return (src) ? __symbol__inc_addr_samples(sym, map, src, evsel->idx, in symbol__inc_addr_samples()
951 struct symbol *sym, unsigned cycles) in symbol__account_cycles() argument
956 if (sym == NULL) in symbol__account_cycles()
958 cycles_hist = symbol__cycles_hist(sym); in symbol__account_cycles()
961 if (addr < sym->start || addr >= sym->end) in symbol__account_cycles()
965 if (start < sym->start || start >= sym->end) in symbol__account_cycles()
970 offset = addr - sym->start; in symbol__account_cycles()
972 start ? start - sym->start : 0, in symbol__account_cycles()
995 (start->sym == ams->sym || in addr_map_symbol__account_cycles()
996 (ams->sym && in addr_map_symbol__account_cycles()
997 start->addr == ams->sym->start + ams->map->start))) in addr_map_symbol__account_cycles()
1003 ams->sym ? ams->sym->start + ams->map->start : 0, in addr_map_symbol__account_cycles()
1005 err = symbol__account_cycles(ams->al_addr, saddr, ams->sym, cycles); in addr_map_symbol__account_cycles()
1091 return symbol__inc_addr_samples(ams->sym, ams->map, evsel, ams->al_addr, sample); in addr_map_symbol__inc_samples()
1097 return symbol__inc_addr_samples(he->ms.sym, he->ms.map, evsel, ip, sample); in hist_entry__inc_addr_samples()
1367 annotation_line__print(struct annotation_line *al, struct symbol *sym, u64 start, in annotation_line__print() argument
1380 struct annotation *notes = symbol__annotation(sym); in annotation_line__print()
1405 annotation_line__print(queue, sym, start, evsel, len, in annotation_line__print()
1488 static int symbol__parse_objdump_line(struct symbol *sym, FILE *file, in symbol__parse_objdump_line() argument
1493 struct annotation *notes = symbol__annotation(sym); in symbol__parse_objdump_line()
1526 u64 start = map__rip_2objdump(map, sym->start), in symbol__parse_objdump_line()
1527 end = map__rip_2objdump(map, sym->end); in symbol__parse_objdump_line()
1539 args->ms.sym = sym; in symbol__parse_objdump_line()
1550 map__rip_2objdump(map, sym->start); in symbol__parse_objdump_line()
1555 if (dl->ins.ops && ins__is_call(&dl->ins) && !dl->ops.target.sym) { in symbol__parse_objdump_line()
1562 target.sym->start == target.al_addr) in symbol__parse_objdump_line()
1563 dl->ops.target.sym = target.sym; in symbol__parse_objdump_line()
1576 static void delete_last_nop(struct symbol *sym) in delete_last_nop() argument
1578 struct annotation *notes = symbol__annotation(sym); in delete_last_nop()
1600 int symbol__strerror_disassemble(struct symbol *sym __maybe_unused, struct map *map, in symbol__strerror_disassemble()
1711 static int symbol__disassemble_bpf(struct symbol *sym, in symbol__disassemble_bpf() argument
1714 struct annotation *notes = symbol__annotation(sym); in symbol__disassemble_bpf()
1719 int len = sym->end - sym->start; in symbol__disassemble_bpf()
1738 sym->name, sym->start, sym->end - sym->start); in symbol__disassemble_bpf()
1825 args->ms.sym = sym; in symbol__disassemble_bpf()
1836 args->ms.sym = sym; in symbol__disassemble_bpf()
1853 static int symbol__disassemble_bpf(struct symbol *sym __maybe_unused, in symbol__disassemble_bpf()
1860 static int symbol__disassemble(struct symbol *sym, struct annotate_args *args) in symbol__disassemble() argument
1881 symfs_filename, sym->name, map->unmap_ip(map, sym->start), in symbol__disassemble()
1882 map->unmap_ip(map, sym->end)); in symbol__disassemble()
1885 dso, dso->long_name, sym, sym->name); in symbol__disassemble()
1888 return symbol__disassemble_bpf(sym, args); in symbol__disassemble()
1891 kce.addr = map__rip_2objdump(map, sym->start); in symbol__disassemble()
1892 kce.offs = sym->start; in symbol__disassemble()
1893 kce.len = sym->end - sym->start; in symbol__disassemble()
1917 map__rip_2objdump(map, sym->start), in symbol__disassemble()
1918 map__rip_2objdump(map, sym->end), in symbol__disassemble()
1971 if (symbol__parse_objdump_line(sym, file, args, &lineno) < 0) in symbol__disassemble()
1984 delete_last_nop(sym); in symbol__disassemble()
2067 void symbol__calc_percent(struct symbol *sym, struct evsel *evsel) in symbol__calc_percent() argument
2069 struct annotation *notes = symbol__annotation(sym); in symbol__calc_percent()
2071 annotation__calc_percent(notes, evsel, symbol__size(sym)); in symbol__calc_percent()
2074 int symbol__annotate(struct symbol *sym, struct map *map, in symbol__annotate() argument
2079 struct annotation *notes = symbol__annotation(sym); in symbol__annotate()
2109 args.ms.sym = sym; in symbol__annotate()
2110 notes->start = map__rip_2objdump(map, sym->start); in symbol__annotate()
2112 return symbol__disassemble(sym, &args); in symbol__annotate()
2240 static void symbol__annotate_hits(struct symbol *sym, struct evsel *evsel) in symbol__annotate_hits() argument
2242 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_hits()
2244 u64 len = symbol__size(sym), offset; in symbol__annotate_hits()
2249 sym->start + offset, h->addr[offset].nr_samples); in symbol__annotate_hits()
2266 int symbol__annotate_printf(struct symbol *sym, struct map *map, in symbol__annotate_printf() argument
2274 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_printf()
2277 u64 start = map__rip_2objdump(map, sym->start); in symbol__annotate_printf()
2295 len = symbol__size(sym); in symbol__annotate_printf()
2314 symbol__annotate_hits(sym, evsel); in symbol__annotate_printf()
2326 err = annotation_line__print(pos, sym, start, evsel, len, in symbol__annotate_printf()
2405 static int symbol__annotate_fprintf2(struct symbol *sym, FILE *fp, in symbol__annotate_fprintf2() argument
2408 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_fprintf2()
2440 if (asprintf(&filename, "%s.annotation", ms->sym->name) < 0) in map_symbol__annotation_dump()
2453 ms->sym->name, ms->map->dso->long_name, ev_name); in map_symbol__annotation_dump()
2454 symbol__annotate_fprintf2(ms->sym, fp, opts); in map_symbol__annotation_dump()
2463 void symbol__annotate_zero_histogram(struct symbol *sym, int evidx) in symbol__annotate_zero_histogram() argument
2465 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_zero_histogram()
2471 void symbol__annotate_decay_histogram(struct symbol *sym, int evidx) in symbol__annotate_decay_histogram() argument
2473 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_decay_histogram()
2475 int len = symbol__size(sym), offset; in symbol__annotate_decay_histogram()
2522 bool disasm_line__is_valid_local_jump(struct disasm_line *dl, struct symbol *sym) in disasm_line__is_valid_local_jump() argument
2526 dl->ops.target.offset >= (s64)symbol__size(sym)) in disasm_line__is_valid_local_jump()
2532 void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym) in annotation__mark_jump_targets() argument
2534 u64 offset, size = symbol__size(sym); in annotation__mark_jump_targets()
2537 if (strstr(sym->name, "@plt")) in annotation__mark_jump_targets()
2546 if (!disasm_line__is_valid_local_jump(dl, sym)) in annotation__mark_jump_targets()
2619 void annotation__init_column_widths(struct annotation *notes, struct symbol *sym) in annotation__init_column_widths() argument
2622 notes->widths.min_addr = hex_width(symbol__size(sym)); in annotation__init_column_widths()
2623 notes->widths.max_addr = hex_width(sym->end); in annotation__init_column_widths()
2673 static void symbol__calc_lines(struct symbol *sym, struct map *map, in symbol__calc_lines() argument
2677 struct annotation *notes = symbol__annotation(sym); in symbol__calc_lines()
2682 int symbol__tty_annotate2(struct symbol *sym, struct map *map, in symbol__tty_annotate2() argument
2691 if (symbol__annotate2(sym, map, evsel, opts, NULL) < 0) in symbol__tty_annotate2()
2696 symbol__calc_lines(sym, map, &source_line, opts); in symbol__tty_annotate2()
2702 buf, percent_type_str(opts->percent_type), sym->name, dso->long_name); in symbol__tty_annotate2()
2703 symbol__annotate_fprintf2(sym, stdout, opts); in symbol__tty_annotate2()
2705 annotated_source__purge(symbol__annotation(sym)->src); in symbol__tty_annotate2()
2710 int symbol__tty_annotate(struct symbol *sym, struct map *map, in symbol__tty_annotate() argument
2717 if (symbol__annotate(sym, map, evsel, 0, opts, NULL) < 0) in symbol__tty_annotate()
2720 symbol__calc_percent(sym, evsel); in symbol__tty_annotate()
2724 symbol__calc_lines(sym, map, &source_line, opts); in symbol__tty_annotate()
2728 symbol__annotate_printf(sym, map, evsel, opts); in symbol__tty_annotate()
2730 annotated_source__purge(symbol__annotation(sym)->src); in symbol__tty_annotate()
2737 return use_browser == 1 && perf_hpp_list.sym; in ui__has_annotation()
2982 int symbol__annotate2(struct symbol *sym, struct map *map, struct evsel *evsel, in symbol__annotate2() argument
2985 struct annotation *notes = symbol__annotation(sym); in symbol__annotate2()
2986 size_t size = symbol__size(sym); in symbol__annotate2()
2996 err = symbol__annotate(sym, map, evsel, 0, options, parch); in symbol__annotate2()
3002 symbol__calc_percent(sym, evsel); in symbol__annotate2()
3005 annotation__mark_jump_targets(notes, sym); in symbol__annotate2()
3007 annotation__init_column_widths(notes, sym); in symbol__annotate2()
3011 sym->annotate2 = true; in symbol__annotate2()