/tools/objtool/ |
D | elf.c | 62 struct symbol *sym; in find_symbol_by_index() local 65 hash_for_each_possible(sec->symbol_hash, sym, hash, idx) in find_symbol_by_index() 66 if (sym->idx == idx) in find_symbol_by_index() 67 return sym; in find_symbol_by_index() 74 struct symbol *sym; in find_symbol_by_offset() local 76 list_for_each_entry(sym, &sec->symbol_list, list) in find_symbol_by_offset() 77 if (sym->type != STT_SECTION && in find_symbol_by_offset() 78 sym->offset == offset) in find_symbol_by_offset() 79 return sym; in find_symbol_by_offset() 87 struct symbol *sym; in find_symbol_by_name() local [all …]
|
/tools/perf/util/ |
D | symbol_fprintf.c | 8 size_t symbol__fprintf(struct symbol *sym, FILE *fp) in symbol__fprintf() argument 11 sym->start, sym->end, in symbol__fprintf() 12 sym->binding == STB_GLOBAL ? 'g' : in symbol__fprintf() 13 sym->binding == STB_LOCAL ? 'l' : 'w', in symbol__fprintf() 14 sym->name); in symbol__fprintf() 17 size_t __symbol__fprintf_symname_offs(const struct symbol *sym, in __symbol__fprintf_symname_offs() argument 25 if (sym) { in __symbol__fprintf_symname_offs() 26 length = fprintf(fp, "%s", sym->name); in __symbol__fprintf_symname_offs() 28 if (al->addr < sym->end) in __symbol__fprintf_symname_offs() 29 offset = al->addr - sym->start; in __symbol__fprintf_symname_offs() [all …]
|
D | call-path.c | 23 struct symbol *sym, u64 ip, bool in_kernel) in call_path__init() argument 26 cp->sym = sym; in call_path__init() 27 cp->ip = sym ? 0 : ip; in call_path__init() 59 struct symbol *sym, u64 ip, in call_path__new() argument 80 call_path__init(cp, parent, sym, ip, in_kernel); in call_path__new() 87 struct symbol *sym, u64 ip, u64 ks) in call_path__findnew() argument 94 if (sym) in call_path__findnew() 98 return call_path__new(cpr, parent, sym, ip, in_kernel); in call_path__findnew() 105 if (cp->sym == sym && cp->ip == ip) in call_path__findnew() 108 if (sym < cp->sym || (sym == cp->sym && ip < cp->ip)) in call_path__findnew() [all …]
|
D | demangle-rust.c | 51 static bool looks_like_rust(const char *sym, size_t len); 78 rust_is_mangled(const char *sym) in rust_is_mangled() argument 82 if (!sym) in rust_is_mangled() 85 len = strlen(sym); in rust_is_mangled() 91 if (!is_prefixed_hash(sym + len_without_hash)) in rust_is_mangled() 94 return looks_like_rust(sym, len_without_hash); in rust_is_mangled() 183 rust_demangle_sym(char *sym) in rust_demangle_sym() argument 189 if (!sym) in rust_demangle_sym() 192 in = sym; in rust_demangle_sym() 193 out = sym; in rust_demangle_sym() [all …]
|
D | annotate.c | 218 struct symbol *sym = map__find_symbol(map, map->map_ip(map, ops->target.addr)); in call__parse() local 219 if (sym != NULL) in call__parse() 220 ops->target.name = strdup(sym->name); in call__parse() 608 int symbol__alloc_hist(struct symbol *sym) in symbol__alloc_hist() argument 610 struct annotation *notes = symbol__annotation(sym); in symbol__alloc_hist() 611 size_t size = symbol__size(sym); in symbol__alloc_hist() 645 static int symbol__alloc_hist_cycles(struct symbol *sym) in symbol__alloc_hist_cycles() argument 647 struct annotation *notes = symbol__annotation(sym); in symbol__alloc_hist_cycles() 648 const size_t size = symbol__size(sym); in symbol__alloc_hist_cycles() 656 void symbol__annotate_zero_histograms(struct symbol *sym) in symbol__annotate_zero_histograms() argument [all …]
|
D | symbol.h | 67 void symbol__delete(struct symbol *sym); 81 static inline size_t symbol__size(const struct symbol *sym) in symbol__size() argument 83 return sym->end - sym->start; in symbol__size() 156 struct symbol sym; member 169 static inline void *symbol__priv(struct symbol *sym) in symbol__priv() argument 171 return ((void *)sym) - symbol_conf.priv_size; in symbol__priv() 182 struct symbol *sym; member 187 struct symbol *sym; member 211 struct symbol *sym; member 260 struct symbol *sym); [all …]
|
D | annotate.h | 154 static inline struct annotation *symbol__annotation(struct symbol *sym) in symbol__annotation() argument 156 return (void *)sym - symbol_conf.priv_size; in symbol__annotation() 169 int symbol__alloc_hist(struct symbol *sym); 170 void symbol__annotate_zero_histograms(struct symbol *sym); 172 int symbol__disassemble(struct symbol *sym, struct map *map, 193 int symbol__strerror_disassemble(struct symbol *sym, struct map *map, 196 int symbol__annotate_printf(struct symbol *sym, struct map *map, 199 void symbol__annotate_zero_histogram(struct symbol *sym, int evidx); 200 void symbol__annotate_decay_histogram(struct symbol *sym, int evidx); 205 int symbol__tty_annotate(struct symbol *sym, struct map *map, [all …]
|
D | parse-events.l | 135 static int sym(yyscan_t scanner, int type, int config) in sym() function 289 cpu-cycles|cycles { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CPU_CYCLES); } 290 stalled-cycles-frontend|idle-cycles-frontend { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT… 291 stalled-cycles-backend|idle-cycles-backend { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_H… 292 instructions { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_INSTRUCTIONS); } 293 cache-references { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_REFERENCES); } 294 cache-misses { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_MISSES); } 295 branch-instructions|branches { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BRANCH_INS… 296 branch-misses { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BRANCH_MISSES); } 297 bus-cycles { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BUS_CYCLES); } [all …]
|
D | db-export.c | 220 int db_export__symbol(struct db_export *dbe, struct symbol *sym, in db_export__symbol() argument 223 u64 *sym_db_id = symbol__priv(sym); in db_export__symbol() 231 return dbe->export_symbol(dbe, sym, dso); in db_export__symbol() 249 if (!al->sym) { in db_ids_from_al() 250 al->sym = symbol__new(al->addr, 0, 0, "unknown"); in db_ids_from_al() 251 if (al->sym) in db_ids_from_al() 252 dso__insert_symbol(dso, al->map->type, al->sym); in db_ids_from_al() 255 if (al->sym) { in db_ids_from_al() 256 u64 *db_id = symbol__priv(al->sym); in db_ids_from_al() 258 err = db_export__symbol(dbe, al->sym, dso); in db_ids_from_al() [all …]
|
D | symbol-elf.c | 80 #define elf_symtab__for_each_symbol(syms, nr_syms, idx, sym) \ argument 81 for (idx = 0, gelf_getsym(syms, idx, &sym);\ 83 idx++, gelf_getsym(syms, idx, &sym)) 85 static inline uint8_t elf_sym__type(const GElf_Sym *sym) in elf_sym__type() argument 87 return GELF_ST_TYPE(sym->st_info); in elf_sym__type() 90 static inline uint8_t elf_sym__visibility(const GElf_Sym *sym) in elf_sym__visibility() argument 92 return GELF_ST_VISIBILITY(sym->st_other); in elf_sym__visibility() 99 static inline int elf_sym__is_function(const GElf_Sym *sym) in elf_sym__is_function() argument 101 return (elf_sym__type(sym) == STT_FUNC || in elf_sym__is_function() 102 elf_sym__type(sym) == STT_GNU_IFUNC) && in elf_sym__is_function() [all …]
|
D | symbol.c | 266 struct symbol *sym = calloc(1, (symbol_conf.priv_size + in symbol__new() local 267 sizeof(*sym) + namelen)); in symbol__new() 268 if (sym == NULL) in symbol__new() 273 struct annotation *notes = (void *)sym; in symbol__new() 276 sym = ((void *)sym) + symbol_conf.priv_size; in symbol__new() 279 sym->start = start; in symbol__new() 280 sym->end = len ? start + len : start; in symbol__new() 281 sym->binding = binding; in symbol__new() 282 sym->namelen = namelen - 1; in symbol__new() 285 __func__, name, start, sym->end); in symbol__new() [all …]
|
D | evsel_fprintf.c | 132 if (node->sym && node->sym->ignore && print_skip_ignored) in sample__fprintf_callchain() 152 printed += __symbol__fprintf_symname_offs(node->sym, &node_al, in sample__fprintf_callchain() 156 printed += __symbol__fprintf_symname(node->sym, &node_al, in sample__fprintf_callchain() 206 node->sym && in sample__fprintf_callchain() 208 node->sym->name)) { in sample__fprintf_callchain() 245 printed += __symbol__fprintf_symname_offs(al->sym, al, in sample__fprintf_sym() 249 printed += __symbol__fprintf_symname(al->sym, al, in sample__fprintf_sym()
|
/tools/perf/scripts/python/ |
D | stackcollapse.py | 70 def tidy_function_name(sym, dso): argument 71 if sym is None: 72 sym = '[unknown]' 74 sym = sym.replace(';', ':') 81 sym = sym.replace('<', '') 82 sym = sym.replace('>', '') 83 if sym[0] == 'L' and sym.find('/'): 84 sym = sym[1:] 86 sym = sym[:sym.index('(')] 91 return sym + '_[k]' [all …]
|
D | net_dropmonitor.py | 55 (sym, off) = get_sym(i) 56 if sym == None: 57 sym = i 58 print "%25s %25s %25s" % (sym, off, drop_log[i])
|
/tools/perf/arch/powerpc/util/ |
D | sym-handling.c | 28 char *sym = syma->name; in arch__choose_best_symbol() local 32 if (*sym == '.') in arch__choose_best_symbol() 33 sym++; in arch__choose_best_symbol() 37 if (strlen(sym) >= 3 && !strncmp(sym, "SyS", 3)) in arch__choose_best_symbol() 39 if (strlen(sym) >= 10 && !strncmp(sym, "compat_SyS", 10)) in arch__choose_best_symbol() 82 void arch__sym_update(struct symbol *s, GElf_Sym *sym) in arch__sym_update() argument 84 s->arch_sym = sym->st_other; in arch__sym_update() 92 struct symbol *sym) in arch__fix_tev_from_maps() argument 106 if (pev->point.offset || !map || !sym) in arch__fix_tev_from_maps() 117 lep_offset = PPC64_LOCAL_ENTRY_OFFSET(sym->arch_sym); in arch__fix_tev_from_maps() [all …]
|
/tools/virtio/linux/ |
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/include/linux/ |
D | export.h | 4 #define EXPORT_SYMBOL(sym) argument 5 #define EXPORT_SYMBOL_GPL(sym) argument 6 #define EXPORT_SYMBOL_GPL_FUTURE(sym) argument 7 #define EXPORT_UNUSED_SYMBOL(sym) argument 8 #define EXPORT_UNUSED_SYMBOL_GPL(sym) argument
|
/tools/perf/ui/browsers/ |
D | map.c | 25 struct symbol *sym = rb_entry(nd, struct symbol, rb_node); in map_browser__write() local 32 mb->addrlen, sym->start, mb->addrlen, sym->end, in map_browser__write() 33 sym->binding == STB_GLOBAL ? 'g' : in map_browser__write() 34 sym->binding == STB_LOCAL ? 'l' : 'w'); in map_browser__write() 37 ui_browser__write_nstring(browser, sym->name, width); in map_browser__write() 49 struct symbol *sym; in map_browser__search() local 58 sym = map__find_symbol(browser->map, addr); in map_browser__search() 60 sym = map__find_symbol_by_name(browser->map, target); in map_browser__search() 62 if (sym != NULL) { in map_browser__search() 63 u32 *idx = symbol__browser_index(sym); in map_browser__search() [all …]
|
D | annotate.c | 276 static bool disasm_line__is_valid_jump(struct disasm_line *dl, struct symbol *sym) in disasm_line__is_valid_jump() argument 281 || dl->ops.target.offset >= (s64)symbol__size(sym)) in disasm_line__is_valid_jump() 313 struct symbol *sym = ms->sym; in annotate_browser__draw_current_jump() local 318 if (strstr(sym->name, "@plt")) in annotate_browser__draw_current_jump() 321 if (!disasm_line__is_valid_jump(cursor, sym)) in annotate_browser__draw_current_jump() 445 struct symbol *sym = ms->sym; in annotate_browser__calc_percent() local 446 struct annotation *notes = symbol__annotation(sym); in annotate_browser__calc_percent() 448 s64 len = symbol__size(sym); in annotate_browser__calc_percent() 540 static int sym_title(struct symbol *sym, struct map *map, char *title, in sym_title() argument 543 return snprintf(title, sz, "%s %s", sym->name, map->dso->long_name); in sym_title() [all …]
|
/tools/perf/tests/ |
D | vmlinux-kallsyms.c | 19 struct symbol *sym; in test__vmlinux_matches_kallsyms() local 114 sym = rb_entry(nd, struct symbol, rb_node); in test__vmlinux_matches_kallsyms() 116 if (sym->start == sym->end) in test__vmlinux_matches_kallsyms() 119 mem_start = vmlinux_map->unmap_ip(vmlinux_map, sym->start); in test__vmlinux_matches_kallsyms() 120 mem_end = vmlinux_map->unmap_ip(vmlinux_map, sym->end); in test__vmlinux_matches_kallsyms() 128 if (arch__compare_symbol_names(sym->name, pair->name) == 0) { in test__vmlinux_matches_kallsyms() 141 mem_start, sym->name, mem_end, in test__vmlinux_matches_kallsyms() 152 pair = machine__find_kernel_symbol_by_name(&kallsyms, type, sym->name, NULL); in test__vmlinux_matches_kallsyms() 158 mem_start, sym->name, pair->name); in test__vmlinux_matches_kallsyms() 161 mem_start, sym->name, first_pair->name); in test__vmlinux_matches_kallsyms() [all …]
|
D | hists_link.c | 21 struct symbol *sym; member 99 fake_common_samples[k].sym = al.sym; in add_hist_entries() 118 fake_samples[i][k].sym = al.sym; in add_hist_entries() 135 samples->sym == s) in find_sample() 165 he->thread, he->ms.map, he->ms.sym)) { in __validate_match() 217 he->thread, he->ms.map, he->ms.sym) && in __validate_link() 220 he->thread, he->ms.map, he->ms.sym)) { in __validate_link()
|
/tools/perf/ui/gtk/ |
D | annotate.c | 24 static int perf_gtk__get_percent(char *buf, size_t size, struct symbol *sym, in perf_gtk__get_percent() argument 37 symhist = annotation__histogram(symbol__annotation(sym), evidx); in perf_gtk__get_percent() 53 static int perf_gtk__get_offset(char *buf, size_t size, struct symbol *sym, in perf_gtk__get_offset() argument 56 u64 start = map__rip_2objdump(map, sym->start); in perf_gtk__get_offset() 90 static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym, in perf_gtk__annotate_symbol() argument 103 notes = symbol__annotation(sym); in perf_gtk__annotate_symbol() 132 sym, pos, in perf_gtk__annotate_symbol() 137 ret = perf_gtk__get_percent(s, sizeof(s), sym, pos, in perf_gtk__annotate_symbol() 143 if (perf_gtk__get_offset(s, sizeof(s), sym, map, pos)) in perf_gtk__annotate_symbol() 159 static int symbol__gtk_annotate(struct symbol *sym, struct map *map, in symbol__gtk_annotate() argument [all …]
|
/tools/perf/ |
D | builtin-top.c | 103 struct symbol *sym; in perf_top__parse_source() local 108 if (!he || !he->ms.sym) in perf_top__parse_source() 111 sym = he->ms.sym; in perf_top__parse_source() 120 "path\n", sym->name); in perf_top__parse_source() 125 notes = symbol__annotation(sym); in perf_top__parse_source() 133 if (symbol__alloc_hist(sym) < 0) { in perf_top__parse_source() 136 sym->name); in perf_top__parse_source() 141 err = symbol__disassemble(sym, map, NULL, 0, NULL, NULL); in perf_top__parse_source() 147 symbol__strerror_disassemble(sym, map, err, msg, sizeof(msg)); in perf_top__parse_source() 148 pr_err("Couldn't annotate %s: %s\n", sym->name, msg); in perf_top__parse_source() [all …]
|
D | builtin-annotate.c | 80 struct symbol *sym = start->sym; in process_basic_block() local 81 struct annotation *notes = sym ? symbol__annotation(sym) : NULL; in process_basic_block() 106 entry->sym = sym; in process_basic_block() 159 (al->sym == NULL || in perf_evsel__add_sample() 160 strcmp(ann->sym_hist_filter, al->sym->name) != 0)) { in perf_evsel__add_sample() 166 if (al->sym != NULL) { in perf_evsel__add_sample() 167 rb_erase(&al->sym->rb_node, in perf_evsel__add_sample() 169 symbol__delete(al->sym); in perf_evsel__add_sample() 223 return symbol__tty_annotate(he->ms.sym, he->ms.map, evsel, in hist_entry__tty_annotate() 238 if (he->ms.sym == NULL || he->ms.map->dso->annotate_warned) in hists__find_annotations() [all …]
|
/tools/testing/selftests/vDSO/ |
D | parse_vdso.c | 232 ELF(Sym) *sym = &vdso_info.symtab[chain]; in vdso_sym() 235 if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC) in vdso_sym() 237 if (ELF64_ST_BIND(sym->st_info) != STB_GLOBAL && in vdso_sym() 238 ELF64_ST_BIND(sym->st_info) != STB_WEAK) in vdso_sym() 240 if (sym->st_shndx == SHN_UNDEF) in vdso_sym() 242 if (strcmp(name, vdso_info.symstrings + sym->st_name)) in vdso_sym() 251 return (void *)(vdso_info.load_offset + sym->st_value); in vdso_sym()
|