/tools/perf/util/ |
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() 19 size_t __symbol__fprintf_symname_offs(const struct symbol *sym, in __symbol__fprintf_symname_offs() argument 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() [all …]
|
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 …]
|
D | demangle-rust.c | 50 static bool looks_like_rust(const char *sym, size_t len); 77 rust_is_mangled(const char *sym) in rust_is_mangled() argument 81 if (!sym) in rust_is_mangled() 84 len = strlen(sym); in rust_is_mangled() 90 if (!is_prefixed_hash(sym + len_without_hash)) in rust_is_mangled() 93 return looks_like_rust(sym, len_without_hash); in rust_is_mangled() 182 rust_demangle_sym(char *sym) in rust_demangle_sym() argument 188 if (!sym) in rust_demangle_sym() 191 in = sym; in rust_demangle_sym() 192 out = sym; in rust_demangle_sym() [all …]
|
D | symbol.h | 62 void symbol__delete(struct symbol *sym); 76 static inline size_t symbol__size(const struct symbol *sym) in symbol__size() argument 78 return sym->end - sym->start; in symbol__size() 86 struct symbol sym; member 99 static inline void *symbol__priv(struct symbol *sym) in symbol__priv() argument 101 return ((void *)sym) - symbol_conf.priv_size; in symbol__priv() 114 struct symbol *sym; member 133 struct symbol *sym); 135 struct symbol *sym); 140 struct symbol *symbol__next_by_name(struct symbol *sym); [all …]
|
D | evsel_fprintf.c | 127 struct symbol *sym; in sample__fprintf_callchain() local 135 sym = node->ms.sym; in sample__fprintf_callchain() 138 if (sym && sym->ignore && print_skip_ignored) in sample__fprintf_callchain() 158 printed += __symbol__fprintf_symname_offs(sym, &node_al, in sample__fprintf_callchain() 162 printed += __symbol__fprintf_symname(sym, &node_al, in sample__fprintf_callchain() 167 if (print_dso && (!sym || !sym->inlined)) { in sample__fprintf_callchain() 176 if (sym && sym->inlined) in sample__fprintf_callchain() 183 if (bt_stop_list && sym && in sample__fprintf_callchain() 184 strlist__has_entry(bt_stop_list, sym->name)) { in sample__fprintf_callchain() 221 printed += __symbol__fprintf_symname_offs(al->sym, al, in sample__fprintf_sym() [all …]
|
D | annotate.c | 275 ops->target.sym = target.ms.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() 338 struct symbol *sym = ms->sym; in jump__parse() local 378 start = map->unmap_ip(map, sym->start), in jump__parse() 379 end = map->unmap_ip(map, sym->end); in jump__parse() 403 ops->target.sym = target.ms.sym; in jump__parse() 423 if (ops->target.outside && ops->target.sym != NULL) in jump__scnprintf() 424 return scnprintf(bf, size, "%-*s %s", max_ins_name, ins->name, ops->target.sym->name); in jump__scnprintf() 799 static int symbol__alloc_hist_cycles(struct symbol *sym) in symbol__alloc_hist_cycles() argument [all …]
|
D | parse-events.l | 157 static int sym(yyscan_t scanner, int type, int config) in sym() function 328 cpu-cycles|cycles { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CPU_CYCLES); } 329 stalled-cycles-frontend|idle-cycles-frontend { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT… 330 stalled-cycles-backend|idle-cycles-backend { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_H… 331 instructions { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_INSTRUCTIONS); } 332 cache-references { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_REFERENCES); } 333 cache-misses { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_MISSES); } 334 branch-instructions|branches { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BRANCH_INS… 335 branch-misses { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BRANCH_MISSES); } 336 bus-cycles { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BUS_CYCLES); } [all …]
|
D | block-info.c | 74 if (!bi_l->sym || !bi_r->sym) { in __block_info__cmp() 75 if (!bi_l->sym && !bi_r->sym) in __block_info__cmp() 77 else if (!bi_l->sym) in __block_info__cmp() 83 cmp = strcmp(bi_l->sym->name, bi_r->sym->name); in __block_info__cmp() 99 static void init_block_info(struct block_info *bi, struct symbol *sym, in init_block_info() argument 103 bi->sym = sym; in init_block_info() 124 if (!he->ms.map || !he->ms.sym) in block_info__process_sym() 129 al.sym = he->ms.sym; in block_info__process_sym() 131 notes = symbol__annotation(he->ms.sym); in block_info__process_sym() 135 for (unsigned int i = 0; i < symbol__size(he->ms.sym); i++) { in block_info__process_sym() [all …]
|
D | srcline.c | 280 struct symbol *sym) in inline_list__append_dso_a2l() argument 283 struct symbol *inline_sym = new_inline_sym(dso, sym, a2l->funcname); in inline_list__append_dso_a2l() 295 struct symbol *sym) in addr2line() argument 322 if (node && inline_list__append_dso_a2l(dso, node, sym)) in addr2line() 333 if (inline_list__append_dso_a2l(dso, node, sym)) in addr2line() 365 struct dso *dso, struct symbol *sym) in addr2inlines() argument 378 addr2line(dso_name, addr, NULL, NULL, dso, true, node, sym); in addr2inlines() 410 struct symbol *sym __maybe_unused) in addr2line() 451 struct symbol *sym) in addr2inlines() argument 493 inline_sym = new_inline_sym(dso, sym, funcname); in addr2inlines() [all …]
|
D | symbol-elf.c | 111 #define elf_symtab__for_each_symbol(syms, nr_syms, idx, sym) \ argument 112 for (idx = 0, gelf_getsym(syms, idx, &sym);\ 114 idx++, gelf_getsym(syms, idx, &sym)) 116 static inline uint8_t elf_sym__type(const GElf_Sym *sym) in elf_sym__type() argument 118 return GELF_ST_TYPE(sym->st_info); in elf_sym__type() 121 static inline uint8_t elf_sym__visibility(const GElf_Sym *sym) in elf_sym__visibility() argument 123 return GELF_ST_VISIBILITY(sym->st_other); in elf_sym__visibility() 130 static inline int elf_sym__is_function(const GElf_Sym *sym) in elf_sym__is_function() argument 132 return (elf_sym__type(sym) == STT_FUNC || in elf_sym__is_function() 133 elf_sym__type(sym) == STT_GNU_IFUNC) && in elf_sym__is_function() [all …]
|
D | symbol.c | 286 struct symbol *sym = calloc(1, (symbol_conf.priv_size + in symbol__new() local 287 sizeof(*sym) + namelen)); in symbol__new() 288 if (sym == NULL) in symbol__new() 293 struct annotation *notes = (void *)sym; in symbol__new() 296 sym = ((void *)sym) + symbol_conf.priv_size; in symbol__new() 299 sym->start = start; in symbol__new() 300 sym->end = len ? start + len : start; in symbol__new() 301 sym->type = type; in symbol__new() 302 sym->binding = binding; in symbol__new() 303 sym->namelen = namelen - 1; in symbol__new() [all …]
|
D | annotate.h | 39 struct symbol *sym; member 198 bool disasm_line__is_valid_local_jump(struct disasm_line *dl, struct symbol *sym); 226 void symbol__calc_percent(struct symbol *sym, struct evsel *evsel); 320 void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym); 322 void annotation__init_column_widths(struct annotation *notes, struct symbol *sym); 334 static inline struct annotation *symbol__annotation(struct symbol *sym) in symbol__annotation() argument 336 return (void *)sym - symbol_conf.priv_size; in symbol__annotation() 349 struct annotated_source *symbol__hists(struct symbol *sym, int nr_hists); 350 void symbol__annotate_zero_histograms(struct symbol *sym); 387 void symbol__annotate_zero_histogram(struct symbol *sym, int evidx); [all …]
|
/tools/objtool/ |
D | elf.c | 155 struct symbol *sym; in find_symbol_by_index() local 157 elf_hash_for_each_possible(elf->symbol_hash, sym, hash, idx) in find_symbol_by_index() 158 if (sym->idx == idx) in find_symbol_by_index() 159 return sym; in find_symbol_by_index() 222 struct symbol *sym; in find_symbol_by_name() local 224 elf_hash_for_each_possible(elf->symbol_name_hash, sym, name_hash, str_hash(name)) in find_symbol_by_name() 225 if (!strcmp(sym->name, name)) in find_symbol_by_name() 226 return sym; in find_symbol_by_name() 344 static void elf_add_symbol(struct elf *elf, struct symbol *sym) in elf_add_symbol() argument 349 sym->alias = sym; in elf_add_symbol() [all …]
|
D | check.c | 96 #define sym_for_each_insn(file, sym, insn) \ argument 97 for (insn = find_insn(file, sym->sec, sym->offset); \ 99 insn->sec == sym->sec && \ 100 insn->offset < sym->offset + sym->len; \ 103 #define sym_for_each_insn_continue_reverse(file, sym, insn) \ argument 106 insn->sec == sym->sec && insn->offset >= sym->offset; \ 464 if (reloc->sym->type != STT_SECTION) { in add_dead_ends() 468 insn = find_insn(file, reloc->sym->sec, reloc->addend); in add_dead_ends() 471 else if (reloc->addend == reloc->sym->sec->len) { in add_dead_ends() 472 insn = find_last_insn(file, reloc->sym->sec); in add_dead_ends() [all …]
|
/tools/perf/scripts/python/ |
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 …]
|
D | net_dropmonitor.py | 57 (sym, off) = get_sym(i) 58 if sym == None: 59 sym = i 60 print("%25s %25s %25s" % (sym, off, drop_log[i]))
|
/tools/perf/arch/powerpc/util/ |
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() 70 void arch__sym_update(struct symbol *s, GElf_Sym *sym) in arch__sym_update() argument 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() 105 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/testing/selftests/net/mptcp/ |
D | mptcp_lib.sh | 51 local sym="${1}" 55 grep -q " ${sym}" /proc/kallsyms 60 local sym="${1}" 62 if __mptcp_lib_kallsyms_has "${sym}"; then 66 mptcp_lib_fail_if_expected_feature "${sym} symbol not found" 71 local sym="${1}" 73 if ! __mptcp_lib_kallsyms_has "${sym}"; then 77 mptcp_lib_fail_if_expected_feature "${sym} symbol has been found"
|
/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 | 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 …]
|
D | annotate.c | 43 return symbol__annotation(ms->sym); in browser__annotation() 154 struct symbol *sym = ms->sym; in annotate_browser__draw_current_jump() local 155 struct annotation *notes = symbol__annotation(sym); in annotate_browser__draw_current_jump() 160 if (strstr(sym->name, "@plt")) in annotate_browser__draw_current_jump() 163 if (!disasm_line__is_valid_local_jump(cursor, sym)) in annotate_browser__draw_current_jump() 306 struct symbol *sym = ms->sym; in annotate_browser__calc_percent() local 307 struct annotation *notes = symbol__annotation(sym); in annotate_browser__calc_percent() 314 symbol__calc_percent(sym, evsel); in annotate_browser__calc_percent() 393 static int sym_title(struct symbol *sym, struct map *map, char *title, in sym_title() argument 396 return snprintf(title, sz, "%s %s [Percent: %s]", sym->name, map->dso->long_name, in sym_title() [all …]
|
/tools/perf/tests/ |
D | vmlinux-kallsyms.c | 21 struct symbol *sym; in test__vmlinux_matches_kallsyms() local 112 map__for_each_symbol(vmlinux_map, sym, nd) { in test__vmlinux_matches_kallsyms() 115 sym = rb_entry(nd, struct symbol, rb_node); in test__vmlinux_matches_kallsyms() 117 if (sym->start == sym->end) in test__vmlinux_matches_kallsyms() 120 mem_start = vmlinux_map->unmap_ip(vmlinux_map, sym->start); in test__vmlinux_matches_kallsyms() 121 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, sym->name, NULL); in test__vmlinux_matches_kallsyms() 158 mem_start, sym->name, pair->name); in test__vmlinux_matches_kallsyms() [all …]
|
/tools/bpf/bpftool/ |
D | xlated_dumper.c | 25 struct kernel_sym *sym; in kernel_syms_load() local 45 sym = &dd->sym_mapping[dd->sym_count]; in kernel_syms_load() 46 if (sscanf(buff, "%p %*c %s", &address, sym->name) != 2) in kernel_syms_load() 48 sym->address = (unsigned long)address; in kernel_syms_load() 49 if (!strcmp(sym->name, "__bpf_call_base")) { in kernel_syms_load() 50 dd->address_call_base = sym->address; in kernel_syms_load() 52 if (!sym->address) in kernel_syms_load() 55 if (sym->address) in kernel_syms_load() 73 struct kernel_sym sym = { in kernel_syms_search() local 78 bsearch(&sym, dd->sym_mapping, dd->sym_count, in kernel_syms_search() [all …]
|
/tools/perf/ui/gtk/ |
D | annotate.c | 28 static int perf_gtk__get_percent(char *buf, size_t size, struct symbol *sym, in perf_gtk__get_percent() argument 41 symhist = annotation__histogram(symbol__annotation(sym), evidx); in perf_gtk__get_percent() 60 u64 start = map__rip_2objdump(ms->map, ms->sym->start); in perf_gtk__get_offset() 98 struct symbol *sym = ms->sym; in perf_gtk__annotate_symbol() local 108 notes = symbol__annotation(sym); in perf_gtk__annotate_symbol() 137 sym, pos, in perf_gtk__annotate_symbol() 142 ret = perf_gtk__get_percent(s, sizeof(s), sym, pos, in perf_gtk__annotate_symbol() 167 struct symbol *sym = ms->sym; in symbol__gtk_annotate() local 181 ui__error("Couldn't annotate %s: %s\n", sym->name, msg); in symbol__gtk_annotate() 185 symbol__calc_percent(sym, evsel); in symbol__gtk_annotate() [all …]
|