| /tools/objtool/ |
| A D | elf.c | 403 sym->alias = sym; in elf_add_symbol() 405 sym->type = GELF_ST_TYPE(sym->sym.st_info); in elf_add_symbol() 406 sym->bind = GELF_ST_BIND(sym->sym.st_info); in elf_add_symbol() 411 sym->offset = sym->sym.st_value; in elf_add_symbol() 412 sym->len = sym->sym.st_size; in elf_add_symbol() 503 sym->sec->sym = sym; in read_symbols() 525 sym->pfunc = sym; in read_symbols() 528 sym->cfunc = sym; in read_symbols() 871 sym->sym.st_info = orig->sym.st_info; in elf_create_prefix_symbol() 872 sym->sym.st_value = orig->sym.st_value - size; in elf_create_prefix_symbol() [all …]
|
| /tools/perf/util/ |
| A D | demangle-ocaml.c | 15 ocaml_is_mangled(const char *sym) in ocaml_is_mangled() argument 17 return 0 == strncmp(sym, caml_prefix, caml_prefix_len) in ocaml_is_mangled() 18 && isupper(sym[caml_prefix_len]); in ocaml_is_mangled() 29 ocaml_demangle_sym(const char *sym) in ocaml_demangle_sym() argument 36 if (!ocaml_is_mangled(sym)) { in ocaml_demangle_sym() 40 len = strlen(sym); in ocaml_demangle_sym() 51 if (sym[i] == '_' && sym[i + 1] == '_') { in ocaml_demangle_sym() 56 else if (sym[i] == '$' && isxdigit(sym[i + 1]) && isxdigit(sym[i + 2])) { in ocaml_demangle_sym() 58 result[j++] = (hex(sym[i + 1]) << 4) | hex(sym[i + 2]); in ocaml_demangle_sym() 62 result[j++] = sym[i++]; in ocaml_demangle_sym()
|
| A D | symbol_fprintf.c | 10 size_t symbol__fprintf(struct symbol *sym, FILE *fp) in symbol__fprintf() argument 13 sym->start, sym->end, in symbol__fprintf() 14 sym->binding == STB_GLOBAL ? 'g' : in symbol__fprintf() 15 sym->binding == STB_LOCAL ? 'l' : 'w', in symbol__fprintf() 16 sym->name); in symbol__fprintf() 27 if (sym) { in __symbol__fprintf_symname_offs() 28 length = fprintf(fp, "%s", sym->name); in __symbol__fprintf_symname_offs() 30 if (al->addr < sym->end) in __symbol__fprintf_symname_offs() 31 offset = al->addr - sym->start; in __symbol__fprintf_symname_offs() 33 offset = al->addr - map__start(al->map) - sym->start; in __symbol__fprintf_symname_offs() [all …]
|
| A D | call-path.c | 15 struct symbol *sym, u64 ip, bool in_kernel) in call_path__init() argument 18 cp->sym = sym; in call_path__init() 19 cp->ip = sym ? 0 : ip; in call_path__init() 51 struct symbol *sym, u64 ip, in call_path__new() argument 72 call_path__init(cp, parent, sym, ip, in_kernel); in call_path__new() 79 struct symbol *sym, u64 ip, u64 ks) in call_path__findnew() argument 86 if (sym) in call_path__findnew() 90 return call_path__new(cpr, parent, sym, ip, in_kernel); in call_path__findnew() 97 if (cp->sym == sym && cp->ip == ip) in call_path__findnew() 100 if (sym < cp->sym || (sym == cp->sym && ip < cp->ip)) in call_path__findnew() [all …]
|
| A D | trace-event-parse.c | 134 for (; sym; sym = sym->next) { in convert_sym() 144 save_states[i] = sym->str[0]; in convert_sym() 194 if (sym) in search_op() 195 return sym; in search_op() 198 if (sym) in search_op() 199 return sym; in search_op() 204 return sym; in search_op() 209 struct tep_print_flag_sym *sym; in parse_task_states() local 225 sym = search_op(state_field, arg); in parse_task_states() 226 if (sym) in parse_task_states() [all …]
|
| A D | disasm_bpf.c | 28 int symbol__disassemble_bpf(struct symbol *sym, struct annotate_args *args) in symbol__disassemble_bpf() argument 30 struct annotation *notes = symbol__annotation(sym); in symbol__disassemble_bpf() 33 int len = sym->end - sym->start; in symbol__disassemble_bpf() 53 sym->name, sym->start, sym->end - sym->start); in symbol__disassemble_bpf() 145 args->ms.sym = sym; in symbol__disassemble_bpf() 157 args->ms.sym = sym; in symbol__disassemble_bpf() 174 int symbol__disassemble_bpf(struct symbol *sym __maybe_unused, struct annotate_args *args __maybe_u… in symbol__disassemble_bpf() 180 int symbol__disassemble_bpf_image(struct symbol *sym, struct annotate_args *args) in symbol__disassemble_bpf_image() argument 182 struct annotation *notes = symbol__annotation(sym); in symbol__disassemble_bpf_image()
|
| A D | symbol.h | 75 void symbol__delete(struct symbol *sym); 89 static inline size_t symbol__size(const struct symbol *sym) in symbol__size() argument 91 return sym->end - sym->start; in symbol__size() 107 static inline void *symbol__priv(struct symbol *sym) in symbol__priv() argument 109 return ((void *)sym) - symbol_conf.priv_size; in symbol__priv() 127 struct symbol *sym); 129 struct symbol *sym); 139 struct symbol *dso__next_symbol(struct symbol *sym); 165 size_t __symbol__fprintf_symname(const struct symbol *sym, 169 size_t symbol__fprintf(struct symbol *sym, FILE *fp); [all …]
|
| A D | evsel_fprintf.c | 138 struct symbol *sym; in sample__fprintf_callchain() local 146 sym = node->ms.sym; in sample__fprintf_callchain() 149 if (sym && sym->ignore && print_skip_ignored) in sample__fprintf_callchain() 172 printed += __symbol__fprintf_symname_offs(sym, &node_al, in sample__fprintf_callchain() 176 printed += __symbol__fprintf_symname(sym, &node_al, in sample__fprintf_callchain() 182 if (print_dso && (!sym || !sym->inlined)) in sample__fprintf_callchain() 188 if (sym && sym->inlined) in sample__fprintf_callchain() 195 if (bt_stop_list && sym && in sample__fprintf_callchain() 196 strlist__has_entry(bt_stop_list, sym->name)) { in sample__fprintf_callchain() 234 printed += __symbol__fprintf_symname_offs(al->sym, al, in sample__fprintf_sym() [all …]
|
| A D | disasm.c | 302 ops->target.sym = target.ms.sym; in call__parse() 366 struct symbol *sym = ms->sym; in jump__parse() local 431 ops->target.sym = target.ms.sym; in jump__parse() 1150 args->ms.sym = sym; in symbol__parse_objdump_line() 1173 dl->ops.target.sym = target.ms.sym; in symbol__parse_objdump_line() 1565 args->ms.sym = sym; in symbol__disassemble_capstone_powerpc() 1656 args->ms.sym = sym; in symbol__disassemble_capstone() 1788 args->ms.sym = sym; in symbol__disassemble_raw() 1935 args->ms.sym = sym; in symbol__disassemble_llvm() 1989 args->ms.sym = sym; in symbol__disassemble_llvm() [all …]
|
| A D | annotate.c | 217 struct symbol *sym = ms->sym; in __symbol__inc_addr_samples() local 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() 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() 322 struct symbol *sym = ms->sym; in symbol__inc_addr_samples() local 1013 struct symbol *sym = ms->sym; in symbol__annotate() local 1221 struct symbol *sym = ms->sym; in hist_entry__annotate_printf() local 1656 struct symbol *sym = ms->sym; in hist_entry__tty_annotate2() local 1692 struct symbol *sym = ms->sym; in hist_entry__tty_annotate() local [all …]
|
| /tools/perf/scripts/python/ |
| A D | stackcollapse.py | 72 def tidy_function_name(sym, dso): argument 73 if sym is None: 74 sym = '[unknown]' 76 sym = sym.replace(';', ':') 83 sym = sym.replace('<', '') 84 sym = sym.replace('>', '') 85 if sym[0] == 'L' and sym.find('/'): 86 sym = sym[1:] 88 sym = sym[:sym.index('(')] 93 return sym + '_[k]' [all …]
|
| /tools/perf/arch/powerpc/util/ |
| A D | sym-handling.c | 16 char *sym = syma->name; in arch__choose_best_symbol() local 20 if (*sym == '.') in arch__choose_best_symbol() 21 sym++; in arch__choose_best_symbol() 25 if (strlen(sym) >= 3 && !strncmp(sym, "SyS", 3)) in arch__choose_best_symbol() 27 if (strlen(sym) >= 10 && !strncmp(sym, "compat_SyS", 10)) in arch__choose_best_symbol() 72 s->arch_sym = sym->st_other; in arch__sym_update() 80 struct symbol *sym) in arch__fix_tev_from_maps() argument 94 if (pev->point.offset || !map || !sym) in arch__fix_tev_from_maps() 123 struct symbol *sym = NULL; in arch__post_process_probe_trace_events() local 133 map__for_each_symbol(map, sym, tmp) { in arch__post_process_probe_trace_events() [all …]
|
| /tools/virtio/linux/ |
| A D | export.h | 1 #define EXPORT_SYMBOL_GPL(sym) extern typeof(sym) sym argument 2 #define EXPORT_SYMBOL(sym) extern typeof(sym) sym argument
|
| /tools/lib/bpf/ |
| A D | elf.c | 78 GElf_Sym sym; member 93 struct elf_sym sym; member 159 GElf_Sym *sym = &ret->sym; in elf_sym_iter_next() local 238 if (sym->name[name_len] != '\0' && sym->name[name_len] != '@') in symbol_match() 269 return sym->sym.st_value - sym->sh.sh_addr + sym->sh.sh_offset; in elf_sym_offset() 314 struct elf_sym *sym; in elf_find_func_offset() local 328 cur_bind = GELF_ST_BIND(sym->sym.st_info); in elf_find_func_offset() 439 struct elf_sym *sym; in elf_resolve_syms_offsets() local 449 int bind = GELF_ST_BIND(sym->sym.st_info); in elf_resolve_syms_offsets() 451 .name = sym->name, in elf_resolve_syms_offsets() [all …]
|
| /tools/perf/ui/browsers/ |
| A D | map.c | 27 struct symbol *sym = rb_entry(nd, struct symbol, rb_node); in map_browser__write() local 34 mb->addrlen, sym->start, mb->addrlen, sym->end, in map_browser__write() 35 sym->binding == STB_GLOBAL ? 'g' : in map_browser__write() 36 sym->binding == STB_LOCAL ? 'l' : 'w'); in map_browser__write() 39 ui_browser__write_nstring(browser, sym->name, width); in map_browser__write() 51 struct symbol *sym; in map_browser__search() local 60 sym = map__find_symbol(browser->map, addr); in map_browser__search() 62 sym = map__find_symbol_by_name(browser->map, target); in map_browser__search() 64 if (sym != NULL) { in map_browser__search() 65 u32 *idx = symbol__browser_index(sym); in map_browser__search() [all …]
|
| /tools/objtool/include/objtool/ |
| A D | warn.h | 23 struct symbol *sym = NULL; in offstr() local 28 sym = find_func_containing(sec, offset); in offstr() 29 if (!sym) in offstr() 30 sym = find_symbol_containing(sec, offset); in offstr() 32 if (sym) { in offstr() 33 str = malloc(strlen(sym->name) + strlen(sec->name) + 40); in offstr() 34 len = sprintf(str, "%s+0x%lx", sym->name, offset - sym->offset); in offstr() 80 if (!_insn->sym || !_insn->sym->warned) \ 83 if (_insn->sym) \ 84 _insn->sym->warned = 1; \
|
| A D | check.h | 81 struct symbol *sym; member 88 struct symbol *sym = insn->sym; in insn_func() local 90 if (sym && sym->type != STT_FUNC) in insn_func() 91 sym = NULL; in insn_func() 93 return sym; in insn_func()
|
| /tools/perf/tests/ |
| A D | vmlinux-kallsyms.c | 194 struct symbol *sym; in test__vmlinux_matches_kallsyms() local 289 map__for_each_symbol(args.vmlinux_map, sym, nd) { in test__vmlinux_matches_kallsyms() 292 sym = rb_entry(nd, struct symbol, rb_node); in test__vmlinux_matches_kallsyms() 294 if (sym->start == sym->end) in test__vmlinux_matches_kallsyms() 298 mem_end = map__unmap_ip(args.vmlinux_map, sym->end); in test__vmlinux_matches_kallsyms() 318 mem_start, sym->name, mem_end, in test__vmlinux_matches_kallsyms() 330 sym->name, NULL); in test__vmlinux_matches_kallsyms() 336 mem_start, sym->name, pair->name); in test__vmlinux_matches_kallsyms() 339 mem_start, sym->name, first_pair->name); in test__vmlinux_matches_kallsyms() 350 } else if (is_ignored_symbol(sym->name, sym->type)) { in test__vmlinux_matches_kallsyms() [all …]
|
| A D | symbols.c | 126 struct symbol *sym = rb_entry(nd, struct symbol, rb_node); in test_dso() local 128 if (sym->type != STT_FUNC && sym->type != STT_GNU_IFUNC) in test_dso() 132 if (last_sym && sym->start < last_sym->end) { in test_dso() 135 symbol__fprintf(sym, stderr); in test_dso() 139 if (sym->start == sym->end) { in test_dso() 141 symbol__fprintf(sym, stderr); in test_dso() 144 last_sym = sym; in test_dso()
|
| /tools/objtool/arch/loongarch/ |
| A D | special.c | 39 if (reloc->sym->sec->rodata) in get_rodata_table_size_by_table_annotate() 42 if (strcmp(insn->sec->name, reloc->sym->sec->name)) in get_rodata_table_size_by_table_annotate() 51 orig_table->insn_offset = reloc->sym->offset + reloc_addend(reloc); in get_rodata_table_size_by_table_annotate() 53 orig_table->rodata_offset = reloc->sym->offset + reloc_addend(reloc); in get_rodata_table_size_by_table_annotate() 60 if (strcmp(insn->sec->name, (reloc + 1)->sym->sec->name)) { in get_rodata_table_size_by_table_annotate() 125 if (reloc->sym->sec->rodata) in find_reloc_by_table_annotate() 128 if (strcmp(insn->sec->name, reloc->sym->sec->name)) in find_reloc_by_table_annotate() 131 offset = reloc->sym->offset + reloc_addend(reloc); in find_reloc_by_table_annotate() 157 if (!strcmp(reloc->sym->sec->name, C_JUMP_TABLE_SECTION)) { in find_reloc_of_rodata_c_jump_table() 183 table_sec = annotate_reloc->sym->sec; in arch_find_switch_table() [all …]
|
| /tools/bpf/bpftool/ |
| A D | xlated_dumper.c | 28 struct kernel_sym *sym; in kernel_syms_load() local 51 sym->module[0] = '\0'; in kernel_syms_load() 53 if (sscanf(buff, "%p %*c %s [%[^]]s", &address, sym->name, sym->module) < 2) in kernel_syms_load() 59 if (!sym->address) in kernel_syms_load() 62 if (sym->address) in kernel_syms_load() 80 struct kernel_sym sym = { in kernel_syms_search() local 146 struct kernel_sym *sym, in print_call_pcrel() argument 154 else if (sym) in print_call_pcrel() 167 if (sym) in print_call_helper() 169 "%s", sym->name); in print_call_helper() [all …]
|
| /tools/perf/tests/shell/ |
| A D | pipe_test.sh | 9 sym="noploop" 11 skip_test_missing_symbol ${sym} 73 … record -e task-clock:u -o - ${prog} | perf inject ${inject_opt}| perf report -i - | grep -q ${sym} 80 …ord -g -e task-clock:u -o - ${prog} | perf inject ${inject_opt} | perf report -i - | grep -q ${sym} 88 if ! perf report -i ${data} | grep -q ${sym}; then 95 if ! perf inject ${inject_opt} -i ${data} | perf report -i - | grep -q ${sym}; then 102 if ! perf inject ${inject_opt} -i ${data} | perf report -i - | grep -q ${sym}; then 110 if ! perf report -i ${data2} | grep -q ${sym}; then
|
| /tools/testing/selftests/bpf/progs/ |
| A D | pyperf.h | 171 Symbol *sym; member 185 Symbol *sym = ctx->sym; in process_frame_callback() local 187 if (frame_ptr && get_frame_data(frame_ptr, pidData, frame, sym)) { in process_frame_callback() 189 int32_t *symbol_id = bpf_map_lookup_elem(&symbolmap, sym); in process_frame_callback() 192 bpf_map_update_elem(&symbolmap, sym, &zero, 0); in process_frame_callback() 193 symbol_id = bpf_map_lookup_elem(&symbolmap, sym); in process_frame_callback() 273 Symbol sym = {}; local 291 .sym = &sym, 317 int32_t *symbol_id = bpf_map_lookup_elem(&symbolmap, &sym); 319 bpf_map_update_elem(&symbolmap, &sym, &zero, 0); [all …]
|
| /tools/perf/ui/gtk/ |
| A D | annotate.c | 29 static int perf_gtk__get_percent(char *buf, size_t size, struct symbol *sym, in perf_gtk__get_percent() argument 45 notes = symbol__annotation(sym); in perf_gtk__get_percent() 69 u64 start = map__rip_2objdump(ms->map, ms->sym->start); in perf_gtk__get_offset() 107 struct symbol *sym = ms->sym; in perf_gtk__annotate_symbol() local 117 notes = symbol__annotation(sym); in perf_gtk__annotate_symbol() 148 sym, pos, in perf_gtk__annotate_symbol() 153 ret = perf_gtk__get_percent(s, sizeof(s), sym, pos, evsel); in perf_gtk__annotate_symbol() 178 struct symbol *sym = ms->sym; in symbol__gtk_annotate() local 194 ui__error("Couldn't annotate %s: %s\n", sym->name, msg); in symbol__gtk_annotate() 198 symbol__calc_percent(sym, evsel); in symbol__gtk_annotate() [all …]
|
| /tools/testing/selftests/vDSO/ |
| A D | parse_vdso.c | 244 if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC) in check_sym() 246 if (ELF64_ST_BIND(sym->st_info) != STB_GLOBAL && in check_sym() 247 ELF64_ST_BIND(sym->st_info) != STB_WEAK) in check_sym() 249 if (strcmp(name, vdso_info.symstrings + sym->st_name)) in check_sym() 279 ELF(Sym) *sym = &vdso_info.symtab[i]; in vdso_sym() 282 check_sym(sym, i, name, version, ver_hash)) in vdso_sym() 284 sym->st_value); in vdso_sym() 291 ELF(Sym) *sym = &vdso_info.symtab[i]; in vdso_sym() 292 if (sym->st_shndx != SHN_UNDEF && in vdso_sym() 293 check_sym(sym, i, name, version, ver_hash)) in vdso_sym() [all …]
|