/tools/perf/tests/ |
D | pe-file-parsing.c | 27 struct build_id bid; in run_dir() local 40 ret = filename__read_build_id(filename, &bid); in run_dir() 43 TEST_ASSERT_VAL("Wrong build_id", !memcmp(bid.data, expect_build_id, in run_dir() 52 ret = filename__read_build_id(debugfile, &bid); in run_dir() 55 TEST_ASSERT_VAL("Wrong build_id", !memcmp(bid.data, expect_build_id, in run_dir()
|
D | sdt.c | 31 struct build_id bid; in build_id_cache__add_file() local 34 err = filename__read_build_id(filename, &bid); in build_id_cache__add_file() 40 build_id__sprintf(&bid, sbuild_id); in build_id_cache__add_file()
|
/tools/perf/util/ |
D | symbol-minimal.c | 34 static int read_build_id(void *note_data, size_t note_len, struct build_id *bid, in read_build_id() argument 37 size_t size = sizeof(bid->data); in read_build_id() 67 memcpy(bid->data, ptr, sz); in read_build_id() 68 memset(bid->data + sz, 0, size - sz); in read_build_id() 69 bid->size = sz; in read_build_id() 89 int filename__read_build_id(const char *filename, struct build_id *bid) in filename__read_build_id() argument 161 ret = read_build_id(buf, buf_size, bid, need_swap); in filename__read_build_id() 163 ret = bid->size; in filename__read_build_id() 212 ret = read_build_id(buf, buf_size, bid, need_swap); in filename__read_build_id() 214 ret = bid->size; in filename__read_build_id() [all …]
|
D | build-id.c | 104 char *bid = bf; in build_id__sprintf() local 111 sprintf(bid, "%02x", *raw); in build_id__sprintf() 113 bid += 2; in build_id__sprintf() 116 return (bid - bf) + 1; in build_id__sprintf() 122 struct build_id bid; in sysfs__sprintf_build_id() local 130 ret = sysfs__read_build_id(notes, &bid); in sysfs__sprintf_build_id() 134 return build_id__sprintf(&bid, sbuild_id); in sysfs__sprintf_build_id() 139 struct build_id bid; in filename__sprintf_build_id() local 142 ret = filename__read_build_id(pathname, &bid); in filename__sprintf_build_id() 146 return build_id__sprintf(&bid, sbuild_id); in filename__sprintf_build_id() [all …]
|
D | dso.c | 211 build_id__sprintf(&dso->bid, build_id_hex); in dso__read_binary_type_filename() 1404 void dso__set_build_id(struct dso *dso, struct build_id *bid) in dso__set_build_id() argument 1406 dso->bid = *bid; in dso__set_build_id() 1410 bool dso__build_id_equal(const struct dso *dso, struct build_id *bid) in dso__build_id_equal() argument 1412 if (dso->bid.size > bid->size && dso->bid.size == BUILD_ID_SIZE) { in dso__build_id_equal() 1417 return !memcmp(dso->bid.data, bid->data, bid->size) && in dso__build_id_equal() 1418 !memchr_inv(&dso->bid.data[bid->size], 0, in dso__build_id_equal() 1419 dso->bid.size - bid->size); in dso__build_id_equal() 1422 return dso->bid.size == bid->size && in dso__build_id_equal() 1423 memcmp(dso->bid.data, bid->data, dso->bid.size) == 0; in dso__build_id_equal() [all …]
|
D | print-events.c | 183 char *bid = strchr(sdt_name->s, '@'); in print_sdt_events() local 186 if (bid) in print_sdt_events() 187 *(bid++) = '\0'; in print_sdt_events() 207 char *path = build_id_cache__origname(bid); in print_sdt_events() 210 if (asprintf(&evt_name, "%s@%s(%.12s)", sdt_name->s, path, bid) < 0) in print_sdt_events()
|
D | build-id.h | 25 void build_id__init(struct build_id *bid, const u8 *data, size_t size); 27 bool build_id__is_defined(const struct build_id *bid);
|
D | dsos.c | 90 if (filename__read_build_id(pos->long_name, &pos->bid) > 0) { in __dsos__read_build_ids() 97 &pos->bid) > 0) { in __dsos__read_build_ids() 317 build_id__sprintf(&pos->bid, sbuild_id); in __dsos__fprintf_buildid()
|
D | dso.h | 182 struct build_id bid; member 276 void dso__set_build_id(struct dso *dso, struct build_id *bid); 277 bool dso__build_id_equal(const struct dso *dso, struct build_id *bid);
|
D | map.c | 120 u32 prot, u32 flags, struct build_id *bid, in map__new() argument 190 if (build_id__is_defined(bid)) { in map__new() 191 dso__set_build_id(dso, bid); in map__new() 203 dso__set_build_id(dso, &header_bid_dso->bid); in map__new() 358 build_id__sprintf(&dso->bid, sbuild_id); in map__load()
|
D | symbol-elf.c | 937 static int read_build_id(const char *filename, struct build_id *bid) in read_build_id() argument 939 size_t size = sizeof(bid->data); in read_build_id() 955 memcpy(bid->data, abfd->build_id->data, abfd->build_id->size); in read_build_id() 956 memset(bid->data + abfd->build_id->size, 0, size - abfd->build_id->size); in read_build_id() 957 err = bid->size = abfd->build_id->size; in read_build_id() 966 static int read_build_id(const char *filename, struct build_id *bid) in read_build_id() argument 968 size_t size = sizeof(bid->data); in read_build_id() 985 err = elf_read_build_id(elf, bid->data, size); in read_build_id() 987 bid->size = err; in read_build_id() 998 int filename__read_build_id(const char *filename, struct build_id *bid) in filename__read_build_id() argument [all …]
|
D | synthetic-events.c | 370 struct build_id bid; in perf_record_mmap2__read_build_id() local 378 rc = sysfs__read_build_id("/sys/kernel/notes", &bid); in perf_record_mmap2__read_build_id() 389 bid = dso->bid; in perf_record_mmap2__read_build_id() 397 rc = filename__read_build_id(event->filename, &bid) > 0 ? 0 : -1; in perf_record_mmap2__read_build_id() 404 memcpy(event->build_id, bid.data, sizeof(bid.data)); in perf_record_mmap2__read_build_id() 405 event->build_id_size = (u8) bid.size; in perf_record_mmap2__read_build_id() 411 dso__set_build_id(dso, &bid); in perf_record_mmap2__read_build_id() 2225 ev.build_id.size = min(pos->bid.size, sizeof(pos->bid.data)); in perf_event__synthesize_build_id() 2226 memcpy(&ev.build_id.build_id, pos->bid.data, ev.build_id.size); in perf_event__synthesize_build_id()
|
D | symbol.c | 1755 struct build_id bid; in dso__load() local 1817 if (filename__read_build_id(name, &bid) > 0) in dso__load() 1818 dso__set_build_id(dso, &bid); in dso__load() 2061 struct build_id bid; in dso__find_kallsyms() local 2074 if (sysfs__read_build_id("/sys/kernel/notes", &bid) == 0) in dso__find_kallsyms() 2075 is_host = dso__build_id_equal(dso, &bid); in dso__find_kallsyms() 2091 build_id__sprintf(&dso->bid, sbuild_id); in dso__find_kallsyms()
|
D | symbol.h | 144 int sysfs__read_build_id(const char *filename, struct build_id *bid);
|
D | event.c | 328 struct build_id bid; in perf_event__fprintf_mmap2() local 330 build_id__init(&bid, event->mmap2.build_id, in perf_event__fprintf_mmap2() 332 build_id__sprintf(&bid, sbuild_id); in perf_event__fprintf_mmap2()
|
D | machine.c | 1799 struct build_id *bid) in machine__process_kernel_mmap_event() argument 1833 if (build_id__is_defined(bid)) in machine__process_kernel_mmap_event() 1834 dso__set_build_id(map__dso(map), bid); in machine__process_kernel_mmap_event() 1897 if (build_id__is_defined(bid)) in machine__process_kernel_mmap_event() 1898 dso__set_build_id(kernel, bid); in machine__process_kernel_mmap_event() 1938 struct build_id __bid, *bid = NULL; in machine__process_mmap2_event() local 1945 bid = &__bid; in machine__process_mmap2_event() 1946 build_id__init(bid, event->mmap2.build_id, event->mmap2.build_id_size); in machine__process_mmap2_event() 1958 ret = machine__process_kernel_mmap_event(machine, &xm, bid); in machine__process_mmap2_event() 1972 event->mmap2.flags, bid, in machine__process_mmap2_event()
|
D | probe-finder.c | 121 struct build_id bid; in debuginfo__new() local 129 if (is_regular_file(path) && filename__read_build_id(path, &bid) > 0) in debuginfo__new() 130 dso__set_build_id(dso, &bid); in debuginfo__new() 960 struct build_id bid; in find_probe_point_lazy() local 970 build_id__init(&bid, pf->dbg->build_id, BUILD_ID_SIZE); in find_probe_point_lazy() 971 build_id__sprintf(&bid, sbuild_id); in find_probe_point_lazy()
|
D | dlfilter.c | 41 d_al->buildid_size = dso->bid.size; in al_to_d_al() 42 d_al->buildid = dso->bid.data; in al_to_d_al()
|
D | map.h | 171 struct build_id *bid, char *filename, struct thread *thread);
|
D | probe-event.c | 489 build_id__sprintf(&dso->bid, sbuild_id); in open_from_debuginfod() 1039 struct build_id bid; in __show_line_range() local 1061 build_id__init(&bid, dinfo->build_id, BUILD_ID_SIZE); in __show_line_range() 1062 build_id__sprintf(&bid, sbuild_id); in __show_line_range()
|
D | header.c | 2295 struct build_id bid; in __event_process_build_id() local 2301 build_id__init(&bid, bev->data, size); in __event_process_build_id() 2302 dso__set_build_id(dso, &bid); in __event_process_build_id() 2315 build_id__sprintf(&dso->bid, sbuild_id); in __event_process_build_id()
|
/tools/perf/ |
D | builtin-buildid-cache.c | 178 struct build_id bid; in build_id_cache__add_file() local 183 err = filename__read_build_id(filename, &bid); in build_id_cache__add_file() 190 build_id__sprintf(&bid, sbuild_id); in build_id_cache__add_file() 201 struct build_id bid; in build_id_cache__remove_file() local 207 err = filename__read_build_id(filename, &bid); in build_id_cache__remove_file() 214 build_id__sprintf(&bid, sbuild_id); in build_id_cache__remove_file() 278 struct build_id bid; in dso__missing_buildid_cache() local 281 filename__read_build_id(filename, &bid) == -1) { in dso__missing_buildid_cache() 287 } else if (memcmp(dso->bid.data, bid.data, bid.size)) { in dso__missing_buildid_cache() 304 struct build_id bid; in build_id_cache__update_file() local [all …]
|
D | builtin-buildid-list.c | 32 build_id__sprintf(&dso->bid, bid_buf); in buildid__map_cb()
|
D | builtin-inject.c | 639 if (filename__read_build_id(dso->long_name, &dso->bid) > 0) in dso__read_build_id() 644 if (new_name && filename__read_build_id(new_name, &dso->bid) > 0) in dso__read_build_id() 706 dso->bid.data[ix] = (hex(build_id[2 * ix]) << 4 | in perf_inject__lookup_known_build_id() 709 dso->bid.size = bid_len / 2; in perf_inject__lookup_known_build_id()
|
/tools/perf/bench/ |
D | inject-buildid.c | 83 struct build_id bid; in add_dso() local 88 if (filename__read_build_id(fpath, &bid) < 0) in add_dso()
|