Lines Matching refs:sym
284 ops->target.sym = target.ms.sym; in call__parse()
304 if (ops->target.sym) in call__scnprintf()
305 return scnprintf(bf, size, "%-*s %s", max_ins_name, ins->name, ops->target.sym->name); in call__scnprintf()
347 struct symbol *sym = ms->sym; in jump__parse() local
387 start = map->unmap_ip(map, sym->start), in jump__parse()
388 end = map->unmap_ip(map, sym->end); in jump__parse()
412 ops->target.sym = target.ms.sym; in jump__parse()
432 if (ops->target.outside && ops->target.sym != NULL) in jump__scnprintf()
433 return scnprintf(bf, size, "%-*s %s", max_ins_name, ins->name, ops->target.sym->name); in jump__scnprintf()
808 static int symbol__alloc_hist_cycles(struct symbol *sym) in symbol__alloc_hist_cycles() argument
810 struct annotation *notes = symbol__annotation(sym); in symbol__alloc_hist_cycles()
811 const size_t size = symbol__size(sym); in symbol__alloc_hist_cycles()
819 void symbol__annotate_zero_histograms(struct symbol *sym) in symbol__annotate_zero_histograms() argument
821 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_zero_histograms()
829 symbol__size(sym) * sizeof(struct cyc_hist)); in symbol__annotate_zero_histograms()
888 struct symbol *sym = ms->sym; in __symbol__inc_addr_samples() local
894 if ((addr < sym->start || addr >= sym->end) && in __symbol__inc_addr_samples()
895 (addr != sym->end || sym->start != sym->end)) { in __symbol__inc_addr_samples()
897 __func__, __LINE__, sym->name, sym->start, addr, sym->end); in __symbol__inc_addr_samples()
901 offset = addr - sym->start; in __symbol__inc_addr_samples()
905 __func__, __LINE__, sym->name, sym->start, addr, sym->end, sym->type == STT_FUNC); in __symbol__inc_addr_samples()
915 sym->start, sym->name, addr, addr - sym->start, evidx, in __symbol__inc_addr_samples()
920 static struct cyc_hist *symbol__cycles_hist(struct symbol *sym) in symbol__cycles_hist() argument
922 struct annotation *notes = symbol__annotation(sym); in symbol__cycles_hist()
933 symbol__alloc_hist_cycles(sym); in symbol__cycles_hist()
939 struct annotated_source *symbol__hists(struct symbol *sym, int nr_hists) in symbol__hists() argument
941 struct annotation *notes = symbol__annotation(sym); in symbol__hists()
952 annotated_source__alloc_histograms(notes->src, symbol__size(sym), in symbol__hists()
963 struct symbol *sym = ms->sym; in symbol__inc_addr_samples() local
966 if (sym == NULL) in symbol__inc_addr_samples()
968 src = symbol__hists(sym, evsel->evlist->core.nr_entries); in symbol__inc_addr_samples()
973 struct symbol *sym, unsigned cycles) in symbol__account_cycles() argument
978 if (sym == NULL) in symbol__account_cycles()
980 cycles_hist = symbol__cycles_hist(sym); in symbol__account_cycles()
983 if (addr < sym->start || addr >= sym->end) in symbol__account_cycles()
987 if (start < sym->start || start >= sym->end) in symbol__account_cycles()
992 offset = addr - sym->start; in symbol__account_cycles()
994 start ? start - sym->start : 0, in symbol__account_cycles()
1017 (start->ms.sym == ams->ms.sym || in addr_map_symbol__account_cycles()
1018 (ams->ms.sym && in addr_map_symbol__account_cycles()
1019 start->addr == ams->ms.sym->start + ams->ms.map->start))) in addr_map_symbol__account_cycles()
1025 ams->ms.sym ? ams->ms.sym->start + ams->ms.map->start : 0, in addr_map_symbol__account_cycles()
1027 err = symbol__account_cycles(ams->al_addr, saddr, ams->ms.sym, cycles); in addr_map_symbol__account_cycles()
1380 annotation_line__print(struct annotation_line *al, struct symbol *sym, u64 start, in annotation_line__print() argument
1392 struct annotation *notes = symbol__annotation(sym); in annotation_line__print()
1417 annotation_line__print(queue, sym, start, evsel, len, in annotation_line__print()
1499 static int symbol__parse_objdump_line(struct symbol *sym, in symbol__parse_objdump_line() argument
1504 struct annotation *notes = symbol__annotation(sym); in symbol__parse_objdump_line()
1520 u64 start = map__rip_2objdump(map, sym->start), in symbol__parse_objdump_line()
1521 end = map__rip_2objdump(map, sym->end); in symbol__parse_objdump_line()
1534 args->ms.sym = sym; in symbol__parse_objdump_line()
1544 map__rip_2objdump(map, sym->start); in symbol__parse_objdump_line()
1549 if (dl->ins.ops && ins__is_call(&dl->ins) && !dl->ops.target.sym) { in symbol__parse_objdump_line()
1556 target.ms.sym->start == target.al_addr) in symbol__parse_objdump_line()
1557 dl->ops.target.sym = target.ms.sym; in symbol__parse_objdump_line()
1570 static void delete_last_nop(struct symbol *sym) in delete_last_nop() argument
1572 struct annotation *notes = symbol__annotation(sym); in delete_last_nop()
1714 static int symbol__disassemble_bpf(struct symbol *sym, in symbol__disassemble_bpf() argument
1717 struct annotation *notes = symbol__annotation(sym); in symbol__disassemble_bpf()
1721 int len = sym->end - sym->start; in symbol__disassemble_bpf()
1741 sym->name, sym->start, sym->end - sym->start); in symbol__disassemble_bpf()
1829 args->ms.sym = sym; in symbol__disassemble_bpf()
1841 args->ms.sym = sym; in symbol__disassemble_bpf()
1858 static int symbol__disassemble_bpf(struct symbol *sym __maybe_unused, in symbol__disassemble_bpf()
1866 symbol__disassemble_bpf_image(struct symbol *sym, in symbol__disassemble_bpf_image() argument
1869 struct annotation *notes = symbol__annotation(sym); in symbol__disassemble_bpf_image()
1945 static int symbol__disassemble(struct symbol *sym, struct annotate_args *args) in symbol__disassemble() argument
1976 symfs_filename, sym->name, map->unmap_ip(map, sym->start), in symbol__disassemble()
1977 map->unmap_ip(map, sym->end)); in symbol__disassemble()
1980 dso, dso->long_name, sym, sym->name); in symbol__disassemble()
1983 return symbol__disassemble_bpf(sym, args); in symbol__disassemble()
1985 return symbol__disassemble_bpf_image(sym, args); in symbol__disassemble()
1988 kce.addr = map__rip_2objdump(map, sym->start); in symbol__disassemble()
1989 kce.offs = sym->start; in symbol__disassemble()
1990 kce.len = sym->end - sym->start; in symbol__disassemble()
2014 map__rip_2objdump(map, sym->start), in symbol__disassemble()
2015 map__rip_2objdump(map, sym->end), in symbol__disassemble()
2084 if (symbol__parse_objdump_line(sym, args, expanded_line, in symbol__disassemble()
2105 delete_last_nop(sym); in symbol__disassemble()
2186 void symbol__calc_percent(struct symbol *sym, struct evsel *evsel) in symbol__calc_percent() argument
2188 struct annotation *notes = symbol__annotation(sym); in symbol__calc_percent()
2190 annotation__calc_percent(notes, evsel, symbol__size(sym)); in symbol__calc_percent()
2196 struct symbol *sym = ms->sym; in symbol__annotate() local
2197 struct annotation *notes = symbol__annotation(sym); in symbol__annotate()
2228 notes->start = map__rip_2objdump(ms->map, sym->start); in symbol__annotate()
2230 return symbol__disassemble(sym, &args); in symbol__annotate()
2358 static void symbol__annotate_hits(struct symbol *sym, struct evsel *evsel) in symbol__annotate_hits() argument
2360 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_hits()
2362 u64 len = symbol__size(sym), offset; in symbol__annotate_hits()
2367 sym->start + offset, h->addr[offset].nr_samples); in symbol__annotate_hits()
2388 struct symbol *sym = ms->sym; in symbol__annotate_printf() local
2393 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_printf()
2396 u64 start = map__rip_2objdump(map, sym->start); in symbol__annotate_printf()
2414 len = symbol__size(sym); in symbol__annotate_printf()
2433 symbol__annotate_hits(sym, evsel); in symbol__annotate_printf()
2445 err = annotation_line__print(pos, sym, start, evsel, len, in symbol__annotate_printf()
2524 static int symbol__annotate_fprintf2(struct symbol *sym, FILE *fp, in symbol__annotate_fprintf2() argument
2527 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_fprintf2()
2559 if (asprintf(&filename, "%s.annotation", ms->sym->name) < 0) in map_symbol__annotation_dump()
2572 ms->sym->name, ms->map->dso->long_name, ev_name); in map_symbol__annotation_dump()
2573 symbol__annotate_fprintf2(ms->sym, fp, opts); in map_symbol__annotation_dump()
2582 void symbol__annotate_zero_histogram(struct symbol *sym, int evidx) in symbol__annotate_zero_histogram() argument
2584 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_zero_histogram()
2590 void symbol__annotate_decay_histogram(struct symbol *sym, int evidx) in symbol__annotate_decay_histogram() argument
2592 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_decay_histogram()
2594 int len = symbol__size(sym), offset; in symbol__annotate_decay_histogram()
2641 bool disasm_line__is_valid_local_jump(struct disasm_line *dl, struct symbol *sym) in disasm_line__is_valid_local_jump() argument
2645 dl->ops.target.offset >= (s64)symbol__size(sym)) in disasm_line__is_valid_local_jump()
2651 void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym) in annotation__mark_jump_targets() argument
2653 u64 offset, size = symbol__size(sym); in annotation__mark_jump_targets()
2656 if (strstr(sym->name, "@plt")) in annotation__mark_jump_targets()
2665 if (!disasm_line__is_valid_local_jump(dl, sym)) in annotation__mark_jump_targets()
2738 void annotation__init_column_widths(struct annotation *notes, struct symbol *sym) in annotation__init_column_widths() argument
2741 notes->widths.min_addr = hex_width(symbol__size(sym)); in annotation__init_column_widths()
2742 notes->widths.max_addr = hex_width(sym->end); in annotation__init_column_widths()
2795 struct annotation *notes = symbol__annotation(ms->sym); in symbol__calc_lines()
2804 struct symbol *sym = ms->sym; in symbol__tty_annotate2() local
2816 ui__error("Couldn't annotate %s:\n%s", sym->name, msg); in symbol__tty_annotate2()
2828 buf, percent_type_str(opts->percent_type), sym->name, dso->long_name); in symbol__tty_annotate2()
2829 symbol__annotate_fprintf2(sym, stdout, opts); in symbol__tty_annotate2()
2831 annotated_source__purge(symbol__annotation(sym)->src); in symbol__tty_annotate2()
2840 struct symbol *sym = ms->sym; in symbol__tty_annotate() local
2850 ui__error("Couldn't annotate %s:\n%s", sym->name, msg); in symbol__tty_annotate()
2854 symbol__calc_percent(sym, evsel); in symbol__tty_annotate()
2864 annotated_source__purge(symbol__annotation(sym)->src); in symbol__tty_annotate()
2871 return use_browser == 1 && perf_hpp_list.sym; in ui__has_annotation()
3119 struct symbol *sym = ms->sym; in symbol__annotate2() local
3120 struct annotation *notes = symbol__annotation(sym); in symbol__annotate2()
3121 size_t size = symbol__size(sym); in symbol__annotate2()
3137 symbol__calc_percent(sym, evsel); in symbol__annotate2()
3140 annotation__mark_jump_targets(notes, sym); in symbol__annotate2()
3142 annotation__init_column_widths(notes, sym); in symbol__annotate2()
3146 sym->annotate2 = 1; in symbol__annotate2()