/linux-6.1.9/tools/perf/util/ |
D | dso.c | 42 char dso__symtab_origin(const struct dso *dso) in dso__symtab_origin() argument 65 if (dso == NULL || dso->symtab_type == DSO_BINARY_TYPE__NOT_FOUND) in dso__symtab_origin() 67 return origin[dso->symtab_type]; in dso__symtab_origin() 70 int dso__read_binary_type_filename(const struct dso *dso, in dso__read_binary_type_filename() argument 86 len = __symbol__join_symfs(filename, size, dso->long_name); in dso__read_binary_type_filename() 117 if (dso__build_id_filename(dso, filename, size, false) == NULL) in dso__read_binary_type_filename() 122 if (dso__build_id_filename(dso, filename, size, true) == NULL) in dso__read_binary_type_filename() 128 snprintf(filename + len, size - len, "%s.debug", dso->long_name); in dso__read_binary_type_filename() 133 snprintf(filename + len, size - len, "%s", dso->long_name); in dso__read_binary_type_filename() 142 if (strlen(dso->long_name) < 9 || in dso__read_binary_type_filename() [all …]
|
D | dso.h | 103 #define DSO__SWAP(dso, type, val) \ argument 106 BUG_ON(dso->needs_swap == DSO_SWAP__UNSET); \ 107 if (dso->needs_swap == DSO_SWAP__YES) { \ 147 struct dso { struct 227 #define dso__for_each_symbol(dso, pos, n) \ argument 228 symbols__for_each_entry(&(dso)->symbols, pos, n) 236 static inline void dso__set_loaded(struct dso *dso) in dso__set_loaded() argument 238 dso->loaded = true; in dso__set_loaded() 241 struct dso *dso__new_id(const char *name, struct dso_id *id); 242 struct dso *dso__new(const char *name); [all …]
|
D | dsos.c | 51 static void dso__inject_id(struct dso *dso, struct dso_id *id) in dso__inject_id() argument 53 dso->id.maj = id->maj; in dso__inject_id() 54 dso->id.min = id->min; in dso__inject_id() 55 dso->id.ino = id->ino; in dso__inject_id() 56 dso->id.ino_generation = id->ino_generation; in dso__inject_id() 71 int dso__cmp_id(struct dso *a, struct dso *b) in dso__cmp_id() 79 struct dso *pos; in __dsos__read_build_ids() 110 static int __dso__cmp_long_name(const char *long_name, struct dso_id *id, struct dso *b) in __dso__cmp_long_name() 116 static int __dso__cmp_short_name(const char *short_name, struct dso_id *id, struct dso *b) in __dso__cmp_short_name() 122 static int dso__cmp_short_name(struct dso *a, struct dso *b) in dso__cmp_short_name() [all …]
|
D | vdso.c | 127 static struct dso *__machine__addnew_vdso(struct machine *machine, const char *short_name, in __machine__addnew_vdso() 130 struct dso *dso; in __machine__addnew_vdso() local 132 dso = dso__new(short_name); in __machine__addnew_vdso() 133 if (dso != NULL) { in __machine__addnew_vdso() 134 __dsos__add(&machine->dsos, dso); in __machine__addnew_vdso() 135 dso__set_long_name(dso, long_name, false); in __machine__addnew_vdso() 137 dso__put(dso); in __machine__addnew_vdso() 140 return dso; in __machine__addnew_vdso() 150 struct dso *dso = map->dso; in machine__thread_dso_type() local 151 if (!dso || dso->long_name[0] != '/') in machine__thread_dso_type() [all …]
|
D | map.c | 105 void map__init(struct map *map, u64 start, u64 end, u64 pgoff, struct dso *dso) in map__init() argument 111 map->dso = dso__get(dso); in map__init() 130 struct dso *dso, *header_bid_dso; in map__new() local 164 dso = machine__findnew_vdso(machine, thread); in map__new() 166 dso = machine__findnew_dso_id(machine, filename, id); in map__new() 168 if (dso == NULL) in map__new() 171 map__init(map, start, start + len, pgoff, dso); in map__new() 182 dso__set_loaded(dso); in map__new() 184 mutex_lock(&dso->lock); in map__new() 185 nsinfo__put(dso->nsinfo); in map__new() [all …]
|
D | symbol.c | 44 static int dso__load_kernel_sym(struct dso *dso, struct map *map); 45 static int dso__load_guest_kernel_sym(struct dso *dso, struct map *map); 524 void dso__reset_find_symbol_cache(struct dso *dso) in dso__reset_find_symbol_cache() argument 526 dso->last_find_result.addr = 0; in dso__reset_find_symbol_cache() 527 dso->last_find_result.symbol = NULL; in dso__reset_find_symbol_cache() 530 void dso__insert_symbol(struct dso *dso, struct symbol *sym) in dso__insert_symbol() argument 532 __symbols__insert(&dso->symbols, sym, dso->kernel); in dso__insert_symbol() 535 if (dso->last_find_result.addr >= sym->start && in dso__insert_symbol() 536 (dso->last_find_result.addr < sym->end || in dso__insert_symbol() 538 dso->last_find_result.symbol = sym; in dso__insert_symbol() [all …]
|
D | srcline.c | 24 static const char *dso__name(struct dso *dso) in dso__name() argument 28 if (dso->symsrc_filename) in dso__name() 29 dso_name = dso->symsrc_filename; in dso__name() 31 dso_name = dso->long_name; in dso__name() 86 static struct symbol *new_inline_sym(struct dso *dso, in new_inline_sym() argument 96 if (dso) { in new_inline_sym() 97 demangled = dso__demangle_sym(dso, 0, funcname); in new_inline_sym() 281 static int inline_list__append_dso_a2l(struct dso *dso, in inline_list__append_dso_a2l() argument 285 struct a2l_data *a2l = dso->a2l; in inline_list__append_dso_a2l() 286 struct symbol *inline_sym = new_inline_sym(dso, sym, a2l->funcname); in inline_list__append_dso_a2l() [all …]
|
D | dsos.h | 11 struct dso; 24 void __dsos__add(struct dsos *dsos, struct dso *dso); 25 void dsos__add(struct dsos *dsos, struct dso *dso); 26 struct dso *__dsos__addnew(struct dsos *dsos, const char *name); 27 struct dso *__dsos__find(struct dsos *dsos, const char *name, bool cmp_short); 29 struct dso *dsos__findnew_id(struct dsos *dsos, const char *name, struct dso_id *id); 31 struct dso *__dsos__findnew_link_by_longname_id(struct rb_root *root, struct dso *dso, 37 bool (skip)(struct dso *dso, int parm), int parm);
|
D | symbol.h | 22 struct dso; 135 int dso__load(struct dso *dso, struct map *map); 136 int dso__load_vmlinux(struct dso *dso, struct map *map, 138 int dso__load_vmlinux_path(struct dso *dso, struct map *map); 139 int __dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map, 141 int dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map); 143 void dso__insert_symbol(struct dso *dso, 145 void dso__delete_symbol(struct dso *dso, 148 struct symbol *dso__find_symbol(struct dso *dso, u64 addr); 149 struct symbol *dso__find_symbol_by_name(struct dso *dso, const char *name); [all …]
|
D | unwind-libunwind-local.c | 284 static int unwind_spec_ehframe(struct dso *dso, struct machine *machine, in unwind_spec_ehframe() argument 292 r = dso__data_read_offset(dso, machine, offset, in unwind_spec_ehframe() 305 static int read_unwind_spec_eh_frame(struct dso *dso, struct unwind_info *ui, in read_unwind_spec_eh_frame() argument 313 if (dso->data.eh_frame_hdr_offset == 0) { in read_unwind_spec_eh_frame() 314 fd = dso__data_get_fd(dso, ui->machine); in read_unwind_spec_eh_frame() 320 &dso->data.eh_frame_hdr_addr, in read_unwind_spec_eh_frame() 321 &dso->data.eh_frame_hdr_offset); in read_unwind_spec_eh_frame() 322 dso->data.elf_base_addr = elf_base_address(fd); in read_unwind_spec_eh_frame() 323 dso__data_put_fd(dso); in read_unwind_spec_eh_frame() 324 if (ret || dso->data.eh_frame_hdr_offset == 0) in read_unwind_spec_eh_frame() [all …]
|
D | srcline.h | 9 struct dso; 13 char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym, 15 char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym, 19 char *get_srcline_split(struct dso *dso, u64 addr, unsigned *line); 43 struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr,
|
D | unwind-libdw.c | 28 const struct dso *dso = *userdata; in __find_debuginfo() local 30 assert(dso); in __find_debuginfo() 31 if (dso->symsrc_filename && strcmp (file_name, dso->symsrc_filename)) in __find_debuginfo() 32 *debuginfo_file_name = strdup(dso->symsrc_filename); in __find_debuginfo() 47 struct dso *dso = NULL; in __report_module() local 55 dso = al->map->dso; in __report_module() 57 if (!dso) in __report_module() 70 mod = dwfl_report_elf(ui->dwfl, dso->short_name, dso->long_name, -1, in __report_module() 75 if (dso__build_id_filename(dso, filename, sizeof(filename), false)) in __report_module() 76 mod = dwfl_report_elf(ui->dwfl, dso->short_name, filename, -1, in __report_module() [all …]
|
D | build-id.c | 62 al.map->dso->hit = 1; in build_id__mark_dso_hit() 264 char *__dso__build_id_filename(const struct dso *dso, char *bf, size_t size, in __dso__build_id_filename() argument 267 bool is_vdso = dso__is_vdso((struct dso *)dso); in __dso__build_id_filename() 273 if (!dso->has_build_id) in __dso__build_id_filename() 276 build_id__sprintf(&dso->bid, sbuild_id); in __dso__build_id_filename() 295 char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size, in dso__build_id_filename() argument 298 bool is_kallsyms = dso__is_kallsyms((struct dso *)dso); in dso__build_id_filename() 300 return __dso__build_id_filename(dso, bf, size, is_debug, is_kallsyms); in dso__build_id_filename() 332 struct dso *pos; in machine__write_buildid_table() 393 struct dso *pos; in __dsos__hit_all() [all …]
|
D | db-export.h | 17 struct dso; 50 int (*export_dso)(struct db_export *dbe, struct dso *dso, 53 struct dso *dso); 92 int db_export__dso(struct db_export *dbe, struct dso *dso, 95 struct dso *dso);
|
D | symbol-elf.c | 268 static char *demangle_sym(struct dso *dso, int kmodule, const char *elf_name) in demangle_sym() argument 278 if (!want_demangle(dso->kernel || kmodule)) in demangle_sym() 315 int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss) in dso__synthesize_plt_symbols() argument 425 demangled = demangle_sym(dso, 0, elf_name); in dso__synthesize_plt_symbols() 438 symbols__insert(&dso->symbols, f); in dso__synthesize_plt_symbols() 451 demangled = demangle_sym(dso, 0, elf_name); in dso__synthesize_plt_symbols() 464 symbols__insert(&dso->symbols, f); in dso__synthesize_plt_symbols() 474 __func__, dso->long_name); in dso__synthesize_plt_symbols() 478 char *dso__demangle_sym(struct dso *dso, int kmodule, const char *elf_name) in dso__demangle_sym() argument 480 return demangle_sym(dso, kmodule, elf_name); in dso__demangle_sym() [all …]
|
/linux-6.1.9/tools/perf/ |
D | builtin-buildid-list.c | 27 const struct dso *dso = map->dso; in buildid__map_cb() local 31 if (dso->has_build_id) in buildid__map_cb() 32 build_id__sprintf(&dso->bid, bid_buf); in buildid__map_cb() 34 if (dso->long_name != NULL) { in buildid__map_cb() 35 printf(" %s", dso->long_name); in buildid__map_cb() 36 } else if (dso->short_name != NULL) { in buildid__map_cb() 37 printf(" %s", dso->short_name); in buildid__map_cb() 77 static bool dso__skip_buildid(struct dso *dso, int with_hits) in dso__skip_buildid() argument 79 return with_hits && !dso->hit; in dso__skip_buildid()
|
D | builtin-inject.c | 137 static int dso__inject_build_id(struct dso *dso, struct perf_tool *tool, 404 static struct dso *findnew_dso(int pid, int tid, const char *filename, in findnew_dso() 410 struct dso *dso; in findnew_dso() local 433 dso = machine__findnew_vdso(machine, thread); in findnew_dso() 435 dso = machine__findnew_dso_id(machine, filename, id); in findnew_dso() 438 if (dso) { in findnew_dso() 439 mutex_lock(&dso->lock); in findnew_dso() 440 nsinfo__put(dso->nsinfo); in findnew_dso() 441 dso->nsinfo = nsi; in findnew_dso() 442 mutex_unlock(&dso->lock); in findnew_dso() [all …]
|
/linux-6.1.9/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/ |
D | EventClass.py | 26 def create_event(name, comm, dso, symbol, raw_buf): argument 28 event = PebsEvent(name, comm, dso, symbol, raw_buf) 30 event = PebsNHM(name, comm, dso, symbol, raw_buf) 32 event = PerfEvent(name, comm, dso, symbol, raw_buf) 38 def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_GENERIC): argument 41 self.dso = dso 49 (self.name, self.symbol, self.comm, self.dso)) 58 def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_PEBS): argument 72 PerfEvent.__init__(self, name, comm, dso, symbol, raw_buf, ev_type) 87 def __init__(self, name, comm, dso, symbol, raw_buf, ev_type=EVTYPE_PEBS_LL): argument [all …]
|
/linux-6.1.9/tools/perf/tests/ |
D | dso-data.c | 106 static int dso__data_fd(struct dso *dso, struct machine *machine) in dso__data_fd() argument 108 int fd = dso__data_get_fd(dso, machine); in dso__data_fd() 111 dso__data_put_fd(dso); in dso__data_fd() 119 struct dso *dso; in test__dso_data() local 127 dso = dso__new((const char *)file); in test__dso_data() 130 dso__data_fd(dso, &machine) >= 0); in test__dso_data() 139 size = dso__data_read_offset(dso, &machine, data->offset, in test__dso_data() 158 size = dso__data_read_offset(dso, &machine, 10, in test__dso_data() 172 dso__put(dso); in test__dso_data() 202 static struct dso **dsos; [all …]
|
D | pe-file-parsing.c | 34 struct dso *dso; in run_dir() local 57 dso = dso__new(filename); in run_dir() 58 TEST_ASSERT_VAL("Failed to get dso", dso); in run_dir() 60 ret = dso__load_bfd_symbols(dso, debugfile); in run_dir() 63 dso__sort_by_name(dso); in run_dir() 64 sym = dso__find_symbol_by_name(dso, "main"); in run_dir() 66 dso__delete(dso); in run_dir()
|
D | hists_common.c | 129 struct dso *dso; in setup_fake_machine() local 131 dso = machine__findnew_dso(machine, fake_symbols[i].dso_name); in setup_fake_machine() 132 if (dso == NULL) in setup_fake_machine() 136 dso__set_loaded(dso); in setup_fake_machine() 145 dso__put(dso); in setup_fake_machine() 149 symbols__insert(&dso->symbols, sym); in setup_fake_machine() 152 dso__put(dso); in setup_fake_machine() 184 he->ms.map->dso->short_name, in print_hists_in() 211 he->ms.map->dso->short_name, in print_hists_out()
|
/linux-6.1.9/tools/perf/arch/powerpc/util/ |
D | skip-callchain-idx.c | 152 static int check_return_addr(struct dso *dso, u64 map_start, Dwarf_Addr pc) in check_return_addr() argument 162 const char *exec_file = dso->long_name; in check_return_addr() 164 dwfl = dso->dwfl; in check_return_addr() 186 dso->dwfl = dwfl; in check_return_addr() 245 struct dso *dso = NULL; in arch_skip_callchain_idx() local 258 dso = al.map->dso; in arch_skip_callchain_idx() 260 if (!dso) { in arch_skip_callchain_idx() 265 rc = check_return_addr(dso, al.map->start, ip); in arch_skip_callchain_idx() 268 dso->long_name, al.sym->name, ip, rc); in arch_skip_callchain_idx()
|
/linux-6.1.9/tools/perf/scripts/python/ |
D | intel-pt-events.py | 230 def print_common_ip(param_dict, sample, symbol, dso): argument 251 print("%s%s (%s)" % (symbol, offs, dso), end=' ') 253 print("%16x %s%s (%s)" % (ip, symbol, offs, dso), end=' ') 256 dso = get_optional(sample, "addr_dso") 259 print("=> %x %s%s (%s)%s" % (addr, symbol, offs, dso, ipc_str)) 263 def print_srccode(comm, param_dict, sample, symbol, dso, with_insn): argument 295 elif dso == glb_dso: 298 src_str = dso 299 glb_dso = dso 318 dso = get_optional(param_dict, "dso") [all …]
|
D | arm-cs-trace-disasm.py | 140 def print_srccode(comm, param_dict, sample, symbol, dso): argument 167 elif dso == glb_dso: 170 src_str = dso 171 glb_dso = dso 186 dso = get_optional(param_dict, "dso") 197 if (dso == '[unknown]'): 202 print("Failed to find valid dso map for dso %s" % dso) 206 print_srccode(comm, param_dict, sample, symbol, dso) 253 …x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (start_addr, int(dso_start), int(dso_end), dso)) 257 …0x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (stop_addr, int(dso_start), int(dso_end), dso)) [all …]
|
/linux-6.1.9/tools/perf/bench/ |
D | inject-buildid.c | 81 struct bench_dso *dso = &dsos[nr_dsos]; in add_dso() local 90 dso->name = realpath(fpath, NULL); in add_dso() 91 if (dso->name == NULL) in add_dso() 94 dso->ino = nr_dsos++; in add_dso() 123 struct bench_dso *dso = &dsos[i]; in release_dso() local 125 free(dso->name); in release_dso() 131 static u64 dso_map_addr(struct bench_dso *dso) in dso_map_addr() argument 133 return 0x400000ULL + dso->ino * 8192ULL; in dso_map_addr() 172 static ssize_t synthesize_mmap(struct bench_data *data, struct bench_dso *dso, u64 timestamp) in synthesize_mmap() argument 179 len += roundup(strlen(dso->name) + 1, 8) + bench_id_hdr_size; in synthesize_mmap() [all …]
|