Home
last modified time | relevance | path

Searched refs:dso (Results 1 – 25 of 119) sorted by relevance

12345

/openbmc/linux/tools/perf/util/
H A Ddso.c42 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 bool dso__is_object_file(const struct dso *dso) in dso__is_object_file() argument
72 switch (dso->binary_type) { in dso__is_object_file()
103 int dso__read_binary_type_filename(const struct dso *dso, in dso__read_binary_type_filename() argument
119 len = __symbol__join_symfs(filename, size, dso->long_name); in dso__read_binary_type_filename()
150 if (dso__build_id_filename(dso, filename, size, false) == NULL) in dso__read_binary_type_filename()
155 if (dso__build_id_filename(dso, filename, size, true) == NULL) in dso__read_binary_type_filename()
161 snprintf(filename + len, size - len, "%s.debug", dso->long_name); in dso__read_binary_type_filename()
[all …]
H A Ddso.h103 #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
228 #define dso__for_each_symbol(dso, pos, n) \ argument
229 symbols__for_each_entry(&(dso)->symbols, pos, n)
237 static inline void dso__set_loaded(struct dso *dso) in dso__set_loaded() argument
239 dso->loaded = true; in dso__set_loaded()
242 struct dso *dso__new_id(const char *name, struct dso_id *id);
243 struct dso *dso__new(const char *name);
[all …]
H A Ddsos.c51 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()
109 static int __dso__cmp_long_name(const char *long_name, struct dso_id *id, struct dso *b) in __dso__cmp_long_name()
115 static int __dso__cmp_short_name(const char *short_name, struct dso_id *id, struct dso *b) in __dso__cmp_short_name()
121 static int dso__cmp_short_name(struct dso *a, struct dso *b) in dso__cmp_short_name()
[all …]
H A Dmap.c105 void map__init(struct map *map, u64 start, u64 end, u64 pgoff, struct dso *dso) in map__init() argument
111 map__set_dso(map, dso__get(dso)); in map__init()
131 struct dso *dso, *header_bid_dso; in map__new() local
165 dso = machine__findnew_vdso(machine, thread); in map__new()
167 dso = machine__findnew_dso_id(machine, filename, id); in map__new()
169 if (dso == NULL) in map__new()
172 map__init(result, start, start + len, pgoff, dso); in map__new()
183 dso__set_loaded(dso); in map__new()
185 mutex_lock(&dso->lock); in map__new()
186 nsinfo__put(dso->nsinfo); in map__new()
[all …]
H A Dvdso.c127 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(rb_node->map); in machine__thread_dso_type() local
152 if (!dso || dso->long_name[0] != '/') in machine__thread_dso_type()
[all …]
H A Dsymbol.c44 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);
507 void dso__reset_find_symbol_cache(struct dso *dso) in dso__reset_find_symbol_cache() argument
509 dso->last_find_result.addr = 0; in dso__reset_find_symbol_cache()
510 dso->last_find_result.symbol = NULL; in dso__reset_find_symbol_cache()
513 void dso__insert_symbol(struct dso *dso, struct symbol *sym) in dso__insert_symbol() argument
515 __symbols__insert(&dso->symbols, sym, dso->kernel); in dso__insert_symbol()
518 if (dso->last_find_result.addr >= sym->start && in dso__insert_symbol()
519 (dso->last_find_result.addr < sym->end || in dso__insert_symbol()
521 dso->last_find_result.symbol = sym; in dso__insert_symbol()
[all …]
H A Dsymbol.h23 struct dso;
118 int dso__load(struct dso *dso, struct map *map);
119 int dso__load_vmlinux(struct dso *dso, struct map *map,
121 int dso__load_vmlinux_path(struct dso *dso, struct map *map);
122 int __dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map,
124 int dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map);
126 void dso__insert_symbol(struct dso *dso,
128 void dso__delete_symbol(struct dso *dso,
131 struct symbol *dso__find_symbol(struct dso *dso, u64 addr);
132 struct symbol *dso__find_symbol_nocache(struct dso *dso, u64 addr);
[all …]
H A Ddsos.h11 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);
H A Dsrcline.c30 static const char *dso__name(struct dso *dso) in dso__name() argument
34 if (dso->symsrc_filename) in dso__name()
35 dso_name = dso->symsrc_filename; in dso__name()
37 dso_name = dso->long_name; in dso__name()
92 static struct symbol *new_inline_sym(struct dso *dso, in new_inline_sym() argument
102 if (dso) { in new_inline_sym()
103 demangled = dso__demangle_sym(dso, 0, funcname); in new_inline_sym()
287 static int inline_list__append_dso_a2l(struct dso *dso, in inline_list__append_dso_a2l() argument
291 struct a2l_data *a2l = dso->a2l; in inline_list__append_dso_a2l()
292 struct symbol *inline_sym = new_inline_sym(dso, sym, a2l->funcname); in inline_list__append_dso_a2l()
[all …]
H A Dunwind-libunwind-local.c284 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 …]
H A Dsrcline.h9 struct dso;
14 char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
16 char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
20 char *get_srcline_split(struct dso *dso, u64 addr, unsigned *line);
45 struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr,
H A Dunwind-libdw.c29 const struct dso *dso = *userdata; in __find_debuginfo() local
31 assert(dso); in __find_debuginfo()
32 if (dso->symsrc_filename && strcmp (file_name, dso->symsrc_filename)) in __find_debuginfo()
33 *debuginfo_file_name = strdup(dso->symsrc_filename); in __find_debuginfo()
48 struct dso *dso = NULL; in __report_module() local
57 dso = map__dso(al->map); in __report_module()
59 if (!dso) in __report_module()
69 if (!strncmp(dso->long_name, "/tmp/jitted-", 12)) in __report_module()
86 __symbol__join_symfs(filename, sizeof(filename), dso->long_name); in __report_module()
87 mod = dwfl_report_elf(ui->dwfl, dso->short_name, filename, -1, in __report_module()
[all …]
H A Dsymbol-elf.c305 static char *demangle_sym(struct dso *dso, int kmodule, const char *elf_name) in demangle_sym() argument
314 if (!want_demangle(dso->kernel || kmodule)) in demangle_sym()
402 static bool get_ifunc_name(Elf *elf, struct dso *dso, GElf_Ehdr *ehdr, in get_ifunc_name() argument
417 sym = dso__find_symbol_nocache(dso, addr); in get_ifunc_name()
433 static bool get_plt_sizes(struct dso *dso, GElf_Ehdr *ehdr, GElf_Shdr *shdr_plt, in get_plt_sizes() argument
472 pr_debug("Missing PLT entry size for %s\n", dso->long_name); in get_plt_sizes()
487 struct dso *dso; member
619 demangled = demangle_sym(di->dso, 0, sym_name); in get_plt_got_name()
632 static int dso__synthesize_plt_got_symbols(struct dso *dso, Elf *elf, in dso__synthesize_plt_got_symbols() argument
636 struct rela_dyn_info di = { .dso = dso }; in dso__synthesize_plt_got_symbols()
[all …]
/openbmc/linux/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/
H A DEventClass.py26 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 …]
/openbmc/linux/tools/perf/tests/
H A Ddso-data.c106 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 …]
H A Dhists_common.c129 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()
182 struct dso *dso = map__dso(he->ms.map); in print_hists_in() local
186 dso->short_name, in print_hists_in()
211 struct dso *dso = map__dso(he->ms.map); in print_hists_out() local
[all …]
H A Dpe-file-parsing.c34 struct dso *dso; in run_dir() local
58 dso = dso__new(filename); in run_dir()
59 TEST_ASSERT_VAL("Failed to get dso", dso); in run_dir()
61 ret = dso__load_bfd_symbols(dso, debugfile); in run_dir()
64 dso__sort_by_name(dso); in run_dir()
65 sym = dso__find_symbol_by_name(dso, "main", &idx); in run_dir()
67 dso__delete(dso); in run_dir()
H A Dsymbols.c65 static int test_dso(struct dso *dso) in test_dso() argument
73 dso__fprintf(dso, stderr); in test_dso()
75 for (nd = rb_first_cached(&dso->symbols); nd; nd = rb_next(nd)) { in test_dso()
104 struct dso *dso; in test_file() local
112 dso = map__dso(map); in test_file()
113 nr = dso__load(dso, map); in test_file()
126 ret = test_dso(dso); in test_file()
/openbmc/openbmc/poky/meta/recipes-support/apr/apr/
H A D0001-dso-Check-for-NULL-handle-in-apr_dso_sym.patch4 Subject: [PATCH] dso: Check for NULL handle in apr_dso_sym
9 dso/unix/dso.c | 12 ++++++++++++
12 diff --git a/dso/unix/dso.c b/dso/unix/dso.c
14 --- a/dso/unix/dso.c
15 +++ b/dso/unix/dso.c
/openbmc/linux/tools/perf/
H A Dbuiltin-buildid-list.c27 const struct dso *dso = map__dso(map); 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()
H A Dbuiltin-inject.c137 static int dso__inject_build_id(struct dso *dso, struct perf_tool *tool,
413 static struct dso *findnew_dso(int pid, int tid, const char *filename, in findnew_dso()
419 struct dso *dso; in findnew_dso() local
442 dso = machine__findnew_vdso(machine, thread); in findnew_dso()
444 dso = machine__findnew_dso_id(machine, filename, id); in findnew_dso()
447 if (dso) { in findnew_dso()
448 mutex_lock(&dso->lock); in findnew_dso()
449 nsinfo__put(dso->nsinfo); in findnew_dso()
450 dso->nsinfo = nsi; in findnew_dso()
451 mutex_unlock(&dso->lock); in findnew_dso()
[all …]
/openbmc/linux/tools/perf/scripts/python/
H A Darm-cs-trace-disasm.py139 def print_srccode(comm, param_dict, sample, symbol, dso): argument
166 elif dso == glb_dso:
169 src_str = dso
170 glb_dso = dso
185 dso = get_optional(param_dict, "dso")
196 if (dso == '[unknown]'):
201 print("Failed to find valid dso map for dso %s" % dso)
205 print_srccode(comm, param_dict, sample, symbol, dso)
252 …x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (start_addr, int(dso_start), int(dso_end), dso))
256 …0x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (stop_addr, int(dso_start), int(dso_end), dso))
[all …]
H A Dintel-pt-events.py266 def print_common_ip(param_dict, sample, symbol, dso): argument
287 print("%s%s (%s)" % (symbol, offs, dso), end=' ')
289 print("%16x %s%s (%s)" % (ip, symbol, offs, dso), end=' ')
292 dso = get_optional(sample, "addr_dso")
295 print("=> %x %s%s (%s)%s" % (addr, symbol, offs, dso, ipc_str))
299 def print_srccode(comm, param_dict, sample, symbol, dso, with_insn): argument
331 elif dso == glb_dso:
334 src_str = dso
335 glb_dso = dso
354 dso = get_optional(param_dict, "dso")
[all …]
/openbmc/linux/tools/perf/arch/powerpc/util/
H A Dskip-callchain-idx.c152 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
259 dso = map__dso(al.map); in arch_skip_callchain_idx()
261 if (!dso) { in arch_skip_callchain_idx()
267 rc = check_return_addr(dso, map__start(al.map), ip); in arch_skip_callchain_idx()
270 dso->long_name, al.sym->name, ip, rc); in arch_skip_callchain_idx()
/openbmc/linux/tools/perf/bench/
H A Dinject-buildid.c82 struct bench_dso *dso = &dsos[nr_dsos]; in add_dso() local
91 dso->name = realpath(fpath, NULL); in add_dso()
92 if (dso->name == NULL) in add_dso()
95 dso->ino = nr_dsos++; in add_dso()
124 struct bench_dso *dso = &dsos[i]; in release_dso() local
126 zfree(&dso->name); in release_dso()
132 static u64 dso_map_addr(struct bench_dso *dso) in dso_map_addr() argument
134 return 0x400000ULL + dso->ino * 8192ULL; in dso_map_addr()
173 static ssize_t synthesize_mmap(struct bench_data *data, struct bench_dso *dso, u64 timestamp) in synthesize_mmap() argument
180 len += roundup(strlen(dso->name) + 1, 8) + bench_id_hdr_size; in synthesize_mmap()
[all …]

12345