/tools/perf/util/ |
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 223 #define dso__for_each_symbol(dso, pos, n) \ argument 224 symbols__for_each_entry(&(dso)->symbols, pos, n) 226 static inline void dso__set_loaded(struct dso *dso) in dso__set_loaded() argument 228 dso->loaded = true; in dso__set_loaded() 231 struct dso *dso__new_id(const char *name, struct dso_id *id); 232 struct dso *dso__new(const char *name); [all …]
|
D | dso.c | 39 char dso__symtab_origin(const struct dso *dso) in dso__symtab_origin() argument 62 if (dso == NULL || dso->symtab_type == DSO_BINARY_TYPE__NOT_FOUND) in dso__symtab_origin() 64 return origin[dso->symtab_type]; in dso__symtab_origin() 67 int dso__read_binary_type_filename(const struct dso *dso, in dso__read_binary_type_filename() argument 83 len = __symbol__join_symfs(filename, size, dso->long_name); in dso__read_binary_type_filename() 114 if (dso__build_id_filename(dso, filename, size, false) == NULL) in dso__read_binary_type_filename() 119 if (dso__build_id_filename(dso, filename, size, true) == NULL) in dso__read_binary_type_filename() 125 snprintf(filename + len, size - len, "%s.debug", dso->long_name); in dso__read_binary_type_filename() 130 snprintf(filename + len, size - len, "%s", dso->long_name); in dso__read_binary_type_filename() 139 if (strlen(dso->long_name) < 9 || in dso__read_binary_type_filename() [all …]
|
D | dsos.c | 48 static void dso__inject_id(struct dso *dso, struct dso_id *id) in dso__inject_id() argument 50 dso->id.maj = id->maj; in dso__inject_id() 51 dso->id.min = id->min; in dso__inject_id() 52 dso->id.ino = id->ino; in dso__inject_id() 53 dso->id.ino_generation = id->ino_generation; in dso__inject_id() 68 int dso__cmp_id(struct dso *a, struct dso *b) in dso__cmp_id() 76 struct dso *pos; in __dsos__read_build_ids() 97 static int __dso__cmp_long_name(const char *long_name, struct dso_id *id, struct dso *b) in __dso__cmp_long_name() 103 static int __dso__cmp_short_name(const char *short_name, struct dso_id *id, struct dso *b) in __dso__cmp_short_name() 109 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 | 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; 124 int dso__load(struct dso *dso, struct map *map); 125 int dso__load_vmlinux(struct dso *dso, struct map *map, 127 int dso__load_vmlinux_path(struct dso *dso, struct map *map); 128 int __dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map, 130 int dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map); 132 void dso__insert_symbol(struct dso *dso, 134 void dso__delete_symbol(struct dso *dso, 137 struct symbol *dso__find_symbol(struct dso *dso, u64 addr); 138 struct symbol *dso__find_symbol_by_name(struct dso *dso, const char *name); [all …]
|
D | srcline.c | 21 static const char *dso__name(struct dso *dso) in dso__name() argument 25 if (dso->symsrc_filename) in dso__name() 26 dso_name = dso->symsrc_filename; in dso__name() 28 dso_name = dso->long_name; in dso__name() 83 static struct symbol *new_inline_sym(struct dso *dso, in new_inline_sym() argument 93 if (dso) { in new_inline_sym() 94 demangled = dso__demangle_sym(dso, 0, funcname); in new_inline_sym() 278 static int inline_list__append_dso_a2l(struct dso *dso, in inline_list__append_dso_a2l() argument 282 struct a2l_data *a2l = dso->a2l; in inline_list__append_dso_a2l() 283 struct symbol *inline_sym = new_inline_sym(dso, sym, a2l->funcname); in inline_list__append_dso_a2l() [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); 517 void dso__reset_find_symbol_cache(struct dso *dso) in dso__reset_find_symbol_cache() argument 519 dso->last_find_result.addr = 0; in dso__reset_find_symbol_cache() 520 dso->last_find_result.symbol = NULL; in dso__reset_find_symbol_cache() 523 void dso__insert_symbol(struct dso *dso, struct symbol *sym) in dso__insert_symbol() argument 525 __symbols__insert(&dso->symbols, sym, dso->kernel); in dso__insert_symbol() 528 if (dso->last_find_result.addr >= sym->start && in dso__insert_symbol() 529 (dso->last_find_result.addr < sym->end || in dso__insert_symbol() 531 dso->last_find_result.symbol = sym; in dso__insert_symbol() [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 | map.c | 116 void map__init(struct map *map, u64 start, u64 end, u64 pgoff, struct dso *dso) in map__init() argument 122 map->dso = dso__get(dso); in map__init() 141 struct dso *dso; in map__new() local 175 dso = machine__findnew_vdso(machine, thread); in map__new() 177 dso = machine__findnew_dso_id(machine, filename, id); in map__new() 179 if (dso == NULL) in map__new() 182 map__init(map, start, start + len, pgoff, dso); in map__new() 193 dso__set_loaded(dso); in map__new() 195 dso->nsinfo = nsi; in map__new() 196 dso__put(dso); in map__new() [all …]
|
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 | vdso.h | 20 struct dso; 22 bool dso__is_vdso(struct dso *dso); 27 struct dso *machine__findnew_vdso(struct machine *machine, struct thread *thread);
|
D | unwind-libunwind-local.c | 249 static int unwind_spec_ehframe(struct dso *dso, struct machine *machine, in unwind_spec_ehframe() argument 258 r = dso__data_read_offset(dso, machine, offset, in unwind_spec_ehframe() 272 static int read_unwind_spec_eh_frame(struct dso *dso, struct machine *machine, in read_unwind_spec_eh_frame() argument 277 u64 offset = dso->data.eh_frame_hdr_offset; in read_unwind_spec_eh_frame() 280 fd = dso__data_get_fd(dso, machine); in read_unwind_spec_eh_frame() 286 dso->data.eh_frame_hdr_offset = offset; in read_unwind_spec_eh_frame() 287 dso__data_put_fd(dso); in read_unwind_spec_eh_frame() 291 ret = unwind_spec_ehframe(dso, machine, offset, in read_unwind_spec_eh_frame() 299 static int read_unwind_spec_debug_frame(struct dso *dso, in read_unwind_spec_debug_frame() argument 303 u64 ofs = dso->data.debug_frame_offset; in read_unwind_spec_debug_frame() [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 | map.h | 14 struct dso; 36 struct dso *dso; member 84 dso__for_each_symbol(map->dso, pos, n) 104 u64 start, u64 end, u64 pgoff, struct dso *dso); 111 struct map *map__new2(u64 start, struct dso *dso);
|
D | symbol-elf.c | 267 static char *demangle_sym(struct dso *dso, int kmodule, const char *elf_name) in demangle_sym() argument 277 if (!want_demangle(dso->kernel || kmodule)) in demangle_sym() 310 int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss) in dso__synthesize_plt_symbols() argument 420 demangled = demangle_sym(dso, 0, elf_name); in dso__synthesize_plt_symbols() 433 symbols__insert(&dso->symbols, f); in dso__synthesize_plt_symbols() 446 demangled = demangle_sym(dso, 0, elf_name); in dso__synthesize_plt_symbols() 459 symbols__insert(&dso->symbols, f); in dso__synthesize_plt_symbols() 469 __func__, dso->long_name); in dso__synthesize_plt_symbols() 473 char *dso__demangle_sym(struct dso *dso, int kmodule, const char *elf_name) in dso__demangle_sym() argument 475 return demangle_sym(dso, kmodule, elf_name); in dso__demangle_sym() [all …]
|
D | machine.h | 13 struct dso; 212 struct dso *machine__findnew_dso_id(struct machine *machine, const char *filename, struct dso_id *i… 213 struct dso *machine__findnew_dso(struct machine *machine, const char *filename); 239 bool (skip)(struct dso *dso, int parm), int parm); 242 bool (skip)(struct dso *dso, int parm), int parm); 253 typedef int (*machine__dso_t)(struct dso *dso, struct machine *machine, void *priv); 276 struct dso *kernel); 287 struct dso *kernel, 291 struct dso *kernel);
|
/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 …]
|
/tools/perf/tests/ |
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 | 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 | 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()
|
/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()
|
/tools/perf/scripts/python/ |
D | intel-pt-events.py | 89 def print_common_ip(sample, symbol, dso): argument 91 print("%16x %s (%s)" % (ip, symbol, dso)) 102 dso = param_dict["dso"] 104 dso = "[unknown]" 114 print_common_ip(sample, symbol, dso) 118 print_common_ip(sample, symbol, dso) 122 print_common_ip(sample, symbol, dso) 126 print_common_ip(sample, symbol, dso) 130 print_common_ip(sample, symbol, dso) 134 print_common_ip(sample, symbol, dso)
|
/tools/perf/ |
D | builtin-inject.c | 61 static int dso__inject_build_id(struct dso *dso, struct perf_tool *tool, 327 static struct dso *findnew_dso(int pid, int tid, const char *filename, in findnew_dso() 333 struct dso *dso; in findnew_dso() local 356 dso = machine__findnew_vdso(machine, thread); in findnew_dso() 358 dso = machine__findnew_dso_id(machine, filename, id); in findnew_dso() 361 if (dso) { in findnew_dso() 362 nsinfo__put(dso->nsinfo); in findnew_dso() 363 dso->nsinfo = nsi; in findnew_dso() 368 return dso; in findnew_dso() 376 struct dso *dso; in perf_event__repipe_buildid_mmap() local [all …]
|
/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 …]
|