Lines Matching +full:data +full:- +full:size
1 // SPDX-License-Identifier: GPL-2.0
16 #include "bpf-event.h"
17 #include "bpf-utils.h"
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()
72 char *root_dir, char *filename, size_t size) in dso__read_binary_type_filename() argument
86 len = __symbol__join_symfs(filename, size, dso->long_name); in dso__read_binary_type_filename()
89 last_slash--; in dso__read_binary_type_filename()
91 strncpy(dso_dir, filename, last_slash - filename); in dso__read_binary_type_filename()
92 dso_dir[last_slash-filename] = '\0'; in dso__read_binary_type_filename()
95 ret = -1; in dso__read_binary_type_filename()
104 ret = -1; in dso__read_binary_type_filename()
106 snprintf(filename, size, in dso__read_binary_type_filename()
117 if (dso__build_id_filename(dso, filename, size, false) == NULL) in dso__read_binary_type_filename()
118 ret = -1; in dso__read_binary_type_filename()
122 if (dso__build_id_filename(dso, filename, size, true) == NULL) in dso__read_binary_type_filename()
123 ret = -1; in dso__read_binary_type_filename()
127 len = __symbol__join_symfs(filename, size, "/usr/lib/debug"); in dso__read_binary_type_filename()
128 snprintf(filename + len, size - len, "%s.debug", dso->long_name); in dso__read_binary_type_filename()
132 len = __symbol__join_symfs(filename, size, "/usr/lib/debug"); 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()
143 strncmp(dso->long_name, "/usr/lib/", 9)) { in dso__read_binary_type_filename()
144 ret = -1; in dso__read_binary_type_filename()
147 len = __symbol__join_symfs(filename, size, "/usr/lib/debug"); in dso__read_binary_type_filename()
148 snprintf(filename + len, size - len, "%s", dso->long_name + 4); in dso__read_binary_type_filename()
156 last_slash = dso->long_name + dso->long_name_len; in dso__read_binary_type_filename()
157 while (last_slash != dso->long_name && *last_slash != '/') in dso__read_binary_type_filename()
158 last_slash--; in dso__read_binary_type_filename()
160 len = __symbol__join_symfs(filename, size, ""); in dso__read_binary_type_filename()
161 dir_size = last_slash - dso->long_name + 2; in dso__read_binary_type_filename()
162 if (dir_size > (size - len)) { in dso__read_binary_type_filename()
163 ret = -1; in dso__read_binary_type_filename()
166 len += scnprintf(filename + len, dir_size, "%s", dso->long_name); in dso__read_binary_type_filename()
167 len += scnprintf(filename + len , size - len, ".debug%s", in dso__read_binary_type_filename()
173 if (!dso->has_build_id) { in dso__read_binary_type_filename()
174 ret = -1; in dso__read_binary_type_filename()
178 build_id__sprintf(&dso->bid, build_id_hex); in dso__read_binary_type_filename()
179 len = __symbol__join_symfs(filename, size, "/usr/lib/debug/.build-id/"); in dso__read_binary_type_filename()
180 snprintf(filename + len, size - len, "%.2s/%s.debug", in dso__read_binary_type_filename()
187 __symbol__join_symfs(filename, size, dso->long_name); in dso__read_binary_type_filename()
192 path__join3(filename, size, symbol_conf.symfs, in dso__read_binary_type_filename()
193 root_dir, dso->long_name); in dso__read_binary_type_filename()
198 __symbol__join_symfs(filename, size, dso->long_name); in dso__read_binary_type_filename()
203 snprintf(filename, size, "%s", dso->long_name); in dso__read_binary_type_filename()
214 ret = -1; in dso__read_binary_type_filename()
279 return dso->symtab_type == DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE_COMP || in dso__needs_decompress()
280 dso->symtab_type == DSO_BINARY_TYPE__GUEST_KMODULE_COMP; in dso__needs_decompress()
287 int fd = -1; in filename__decompress()
295 * data. So even if the DSO is represented by 'krava.xz' module, in filename__decompress()
308 return -1; in filename__decompress()
314 fd = -1; in filename__decompress()
330 return -1; in decompress_kmodule()
332 if (dso->comp == COMP_ID__NONE) in decompress_kmodule()
333 return -1; in decompress_kmodule()
335 return filename__decompress(name, pathname, len, dso->comp, in decompress_kmodule()
336 &dso->load_errno); in decompress_kmodule()
350 return fd >= 0 ? 0 : -1; in dso__decompress_kmodule_path()
357 * @comp - true if @path contains supported compression suffix,
359 * @kmod - true if @path contains '.ko' suffix in right position,
361 * @name - if (@alloc_name && @kmod) is true, it contains strdup-ed base name
362 * of the kernel module without suffixes, otherwise strudup-ed
364 * @ext - if (@alloc_ext && @comp) is true, it contains strdup-ed string
367 * Returns 0 if there's no strdup error, -ENOMEM otherwise.
395 m->kmod = false; in __kmod_path__parse()
398 m->kmod = true; in __kmod_path__parse()
404 m->name = strdup(name); in __kmod_path__parse()
405 return m->name ? 0 : -ENOMEM; in __kmod_path__parse()
410 m->comp = is_supported_compression(ext + 1); in __kmod_path__parse()
411 if (m->comp > COMP_ID__NONE) in __kmod_path__parse()
412 ext -= 3; in __kmod_path__parse()
416 m->kmod = !strncmp(ext, ".ko", 3); in __kmod_path__parse()
419 if (m->kmod) { in __kmod_path__parse()
420 if (asprintf(&m->name, "[%.*s]", (int) (ext - name), name) == -1) in __kmod_path__parse()
421 return -ENOMEM; in __kmod_path__parse()
423 if (asprintf(&m->name, "%s", name) == -1) in __kmod_path__parse()
424 return -ENOMEM; in __kmod_path__parse()
427 strreplace(m->name, '-', '_'); in __kmod_path__parse()
437 dso->symtab_type = DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE; in dso__set_module_info()
439 dso->symtab_type = DSO_BINARY_TYPE__GUEST_KMODULE; in dso__set_module_info()
442 if (m->kmod && m->comp) { in dso__set_module_info()
443 dso->symtab_type++; in dso__set_module_info()
444 dso->comp = m->comp; in dso__set_module_info()
447 dso__set_short_name(dso, strdup(m->name), true); in dso__set_module_info()
459 list_add_tail(&dso->data.open_entry, &dso__data_open); in dso__list_add()
465 list_del_init(&dso->data.open_entry); in dso__list_del()
467 "DSO data fd counter out of bounds."); in dso__list_del()
468 dso__data_open_cnt--; in dso__list_del()
491 return -1; in do_open()
496 int fd = -EINVAL; in __open_dso()
502 return -ENOMEM; in __open_dso()
504 mutex_lock(&dso->lock); in __open_dso()
506 root_dir = machine->root_dir; in __open_dso()
508 if (dso__read_binary_type_filename(dso, dso->binary_type, in __open_dso()
515 if (errno != ENOENT || dso->nsinfo == NULL) in __open_dso()
518 new_name = filename_with_chroot(dso->nsinfo->pid, name); in __open_dso()
531 fd = -dso->load_errno; in __open_dso()
545 mutex_unlock(&dso->lock); in __open_dso()
553 * dso_close - Open DSO data file
556 * Open @dso's data file descriptor and updates
564 if (dso->binary_type != DSO_BINARY_TYPE__BUILD_ID_CACHE) { in open_dso()
565 mutex_lock(&dso->lock); in open_dso()
566 nsinfo__mountns_enter(dso->nsinfo, &nsc); in open_dso()
567 mutex_unlock(&dso->lock); in open_dso()
570 if (dso->binary_type != DSO_BINARY_TYPE__BUILD_ID_CACHE) in open_dso()
587 if (dso->data.fd >= 0) { in close_data_fd()
588 close(dso->data.fd); in close_data_fd()
589 dso->data.fd = -1; in close_data_fd()
590 dso->data.file_size = 0; in close_data_fd()
596 * dso_close - Close DSO data file
599 * Close @dso's data file descriptor and updates
611 dso = list_first_entry(&dso__data_open, struct dso, data.open_entry); in close_first_dso()
637 * Used only by tests/dso-data.c to reset the environment
671 * dso__data_close - Close DSO data file
674 * External interface to close @dso's data file descriptor.
692 if (dso->data.fd >= 0) in try_to_open_dso()
695 if (dso->binary_type != DSO_BINARY_TYPE__NOT_FOUND) { in try_to_open_dso()
696 dso->data.fd = open_dso(dso, machine); in try_to_open_dso()
701 dso->binary_type = binary_type_data[i++]; in try_to_open_dso()
703 dso->data.fd = open_dso(dso, machine); in try_to_open_dso()
704 if (dso->data.fd >= 0) in try_to_open_dso()
707 } while (dso->binary_type != DSO_BINARY_TYPE__NOT_FOUND); in try_to_open_dso()
709 if (dso->data.fd >= 0) in try_to_open_dso()
710 dso->data.status = DSO_DATA_STATUS_OK; in try_to_open_dso()
712 dso->data.status = DSO_DATA_STATUS_ERROR; in try_to_open_dso()
716 * dso__data_get_fd - Get dso's data file descriptor
722 * dso__data_put_fd() if it returns non-negative value.
726 if (dso->data.status == DSO_DATA_STATUS_ERROR) in dso__data_get_fd()
727 return -1; in dso__data_get_fd()
730 return -1; in dso__data_get_fd()
734 if (dso->data.fd < 0) in dso__data_get_fd()
737 return dso->data.fd; in dso__data_get_fd()
749 if (dso->data.status_seen & flag) in dso__data_status_seen()
752 dso->data.status_seen |= flag; in dso__data_status_seen()
758 static ssize_t bpf_read(struct dso *dso, u64 offset, char *data) in bpf_read() argument
761 ssize_t size = DSO__DATA_CACHE_SIZE; in bpf_read() local
765 node = perf_env__find_bpf_prog_info(dso->bpf_prog.env, dso->bpf_prog.id); in bpf_read()
766 if (!node || !node->info_linear) { in bpf_read()
767 dso->data.status = DSO_DATA_STATUS_ERROR; in bpf_read()
768 return -1; in bpf_read()
771 len = node->info_linear->info.jited_prog_len; in bpf_read()
772 buf = (u8 *)(uintptr_t)node->info_linear->info.jited_prog_insns; in bpf_read()
775 return -1; in bpf_read()
777 size = (ssize_t)min(len - offset, (u64)size); in bpf_read()
778 memcpy(data, buf + offset, size); in bpf_read()
779 return size; in bpf_read()
786 node = perf_env__find_bpf_prog_info(dso->bpf_prog.env, dso->bpf_prog.id); in bpf_size()
787 if (!node || !node->info_linear) { in bpf_size()
788 dso->data.status = DSO_DATA_STATUS_ERROR; in bpf_size()
789 return -1; in bpf_size()
792 dso->data.file_size = node->info_linear->info.jited_prog_len; in bpf_size()
800 struct rb_root *root = &dso->data.cache; in dso_cache__free()
803 mutex_lock(&dso->lock); in dso_cache__free()
808 next = rb_next(&cache->rb_node); in dso_cache__free()
809 rb_erase(&cache->rb_node, root); in dso_cache__free()
812 mutex_unlock(&dso->lock); in dso_cache__free()
817 const struct rb_root *root = &dso->data.cache; in __dso_cache__find()
818 struct rb_node * const *p = &root->rb_node; in __dso_cache__find()
827 end = cache->offset + DSO__DATA_CACHE_SIZE; in __dso_cache__find()
829 if (offset < cache->offset) in __dso_cache__find()
830 p = &(*p)->rb_left; in __dso_cache__find()
832 p = &(*p)->rb_right; in __dso_cache__find()
843 struct rb_root *root = &dso->data.cache; in dso_cache__insert()
844 struct rb_node **p = &root->rb_node; in dso_cache__insert()
847 u64 offset = new->offset; in dso_cache__insert()
849 mutex_lock(&dso->lock); in dso_cache__insert()
855 end = cache->offset + DSO__DATA_CACHE_SIZE; in dso_cache__insert()
857 if (offset < cache->offset) in dso_cache__insert()
858 p = &(*p)->rb_left; in dso_cache__insert()
860 p = &(*p)->rb_right; in dso_cache__insert()
865 rb_link_node(&new->rb_node, parent, p); in dso_cache__insert()
866 rb_insert_color(&new->rb_node, root); in dso_cache__insert()
870 mutex_unlock(&dso->lock); in dso_cache__insert()
874 static ssize_t dso_cache__memcpy(struct dso_cache *cache, u64 offset, u8 *data, in dso_cache__memcpy() argument
875 u64 size, bool out) in dso_cache__memcpy() argument
877 u64 cache_offset = offset - cache->offset; in dso_cache__memcpy()
878 u64 cache_size = min(cache->size - cache_offset, size); in dso_cache__memcpy()
881 memcpy(data, cache->data + cache_offset, cache_size); in dso_cache__memcpy()
883 memcpy(cache->data + cache_offset, data, cache_size); in dso_cache__memcpy()
888 u64 offset, char *data) in file_read() argument
895 * dso->data.fd might be closed if other thread opened another in file_read()
900 if (dso->data.fd < 0) { in file_read()
901 dso->data.status = DSO_DATA_STATUS_ERROR; in file_read()
902 ret = -errno; in file_read()
906 ret = pread(dso->data.fd, data, DSO__DATA_CACHE_SIZE, offset); in file_read()
922 *ret = -ENOMEM; in dso_cache__populate()
926 if (dso->binary_type == DSO_BINARY_TYPE__BPF_PROG_INFO) in dso_cache__populate()
927 *ret = bpf_read(dso, cache_offset, cache->data); in dso_cache__populate()
930 if (dso->binary_type == DSO_BINARY_TYPE__OOL) in dso_cache__populate()
933 *ret = file_read(dso, machine, cache_offset, cache->data); in dso_cache__populate()
940 cache->offset = cache_offset; in dso_cache__populate()
941 cache->size = *ret; in dso_cache__populate()
964 u64 offset, u8 *data, ssize_t size, bool out) in dso_cache_io() argument
973 return dso_cache__memcpy(cache, offset, data, size, out); in dso_cache_io()
977 * Reads and caches dso data DSO__DATA_CACHE_SIZE size chunks
978 * in the rb_tree. Any read to already cached data is served
979 * by cached data. Writes update the cache only, not the backing file.
982 u64 offset, u8 *data, ssize_t size, bool out) in cached_io() argument
985 u8 *p = data; in cached_io()
990 ret = dso_cache_io(dso, machine, offset, p, size, out); in cached_io()
998 BUG_ON(ret > size); in cached_io()
1003 size -= ret; in cached_io()
1005 } while (size); in cached_io()
1019 * dso->data.fd might be closed if other thread opened another in file_size()
1024 if (dso->data.fd < 0) { in file_size()
1025 ret = -errno; in file_size()
1026 dso->data.status = DSO_DATA_STATUS_ERROR; in file_size()
1030 if (fstat(dso->data.fd, &st) < 0) { in file_size()
1031 ret = -errno; in file_size()
1034 dso->data.status = DSO_DATA_STATUS_ERROR; in file_size()
1037 dso->data.file_size = st.st_size; in file_size()
1046 if (dso->data.file_size) in dso__data_file_size()
1049 if (dso->data.status == DSO_DATA_STATUS_ERROR) in dso__data_file_size()
1050 return -1; in dso__data_file_size()
1052 if (dso->binary_type == DSO_BINARY_TYPE__BPF_PROG_INFO) in dso__data_file_size()
1059 * dso__data_size - Return dso data size
1063 * Return: dso data size
1068 return -1; in dso__data_size()
1070 /* For now just estimate dso data size is close to file size */ in dso__data_size()
1071 return dso->data.file_size; in dso__data_size()
1075 u64 offset, u8 *data, ssize_t size, in data_read_write_offset() argument
1079 return -1; in data_read_write_offset()
1082 if (offset > dso->data.file_size) in data_read_write_offset()
1083 return -1; in data_read_write_offset()
1085 if (offset + size < offset) in data_read_write_offset()
1086 return -1; in data_read_write_offset()
1088 return cached_io(dso, machine, offset, data, size, out); in data_read_write_offset()
1092 * dso__data_read_offset - Read data from dso file offset
1096 * @data: buffer to store data
1097 * @size: size of the @data buffer
1099 * External interface to read data from dso file offset. Open
1100 * dso data file and use cached_read to get the data.
1103 u64 offset, u8 *data, ssize_t size) in dso__data_read_offset() argument
1105 if (dso->data.status == DSO_DATA_STATUS_ERROR) in dso__data_read_offset()
1106 return -1; in dso__data_read_offset()
1108 return data_read_write_offset(dso, machine, offset, data, size, true); in dso__data_read_offset()
1112 * dso__data_read_addr - Read data from dso address
1116 * @data: buffer to store data
1117 * @size: size of the @data buffer
1119 * External interface to read data from dso address.
1123 u8 *data, ssize_t size) in dso__data_read_addr() argument
1125 u64 offset = map->map_ip(map, addr); in dso__data_read_addr()
1126 return dso__data_read_offset(dso, machine, offset, data, size); in dso__data_read_addr()
1130 * dso__data_write_cache_offs - Write data to dso data cache at file offset
1134 * @data: buffer to write
1135 * @size: size of the @data buffer
1137 * Write into the dso file data cache, but do not change the file itself.
1140 u64 offset, const u8 *data_in, ssize_t size) in dso__data_write_cache_offs() argument
1142 u8 *data = (u8 *)data_in; /* cast away const to use same fns for r/w */ in dso__data_write_cache_offs() local
1144 if (dso->data.status == DSO_DATA_STATUS_ERROR) in dso__data_write_cache_offs()
1145 return -1; in dso__data_write_cache_offs()
1147 return data_read_write_offset(dso, machine, offset, data, size, false); in dso__data_write_cache_offs()
1151 * dso__data_write_cache_addr - Write data to dso data cache at dso address
1155 * @data: buffer to write
1156 * @size: size of the @data buffer
1158 * External interface to write into the dso file data cache, but do not change
1163 const u8 *data, ssize_t size) in dso__data_write_cache_addr() argument
1165 u64 offset = map->map_ip(map, addr); in dso__data_write_cache_addr()
1166 return dso__data_write_cache_offs(dso, machine, offset, data, size); in dso__data_write_cache_addr()
1196 dso->kernel = dso_type; in machine__findnew_kernel()
1204 struct rb_root *root = dso->root; in dso__set_long_name_id()
1209 if (dso->long_name_allocated) in dso__set_long_name_id()
1210 free((char *)dso->long_name); in dso__set_long_name_id()
1213 rb_erase(&dso->rb_node, root); in dso__set_long_name_id()
1218 RB_CLEAR_NODE(&dso->rb_node); in dso__set_long_name_id()
1219 dso->root = NULL; in dso__set_long_name_id()
1222 dso->long_name = name; in dso__set_long_name_id()
1223 dso->long_name_len = strlen(name); in dso__set_long_name_id()
1224 dso->long_name_allocated = name_allocated; in dso__set_long_name_id()
1240 if (dso->short_name_allocated) in dso__set_short_name()
1241 free((char *)dso->short_name); in dso__set_short_name()
1243 dso->short_name = name; in dso__set_short_name()
1244 dso->short_name_len = strlen(name); in dso__set_short_name()
1245 dso->short_name_allocated = name_allocated; in dso__set_short_name()
1253 return dso->long_name_len; in dso__name_len()
1255 return dso->short_name_len; in dso__name_len()
1260 return dso->loaded; in dso__loaded()
1265 return dso->sorted_by_name; in dso__sorted_by_name()
1270 dso->sorted_by_name = true; in dso__set_sorted_by_name()
1278 strcpy(dso->name, name); in dso__new_id()
1280 dso->id = *id; in dso__new_id()
1281 dso__set_long_name_id(dso, dso->name, id, false); in dso__new_id()
1282 dso__set_short_name(dso, dso->name, false); in dso__new_id()
1283 dso->symbols = dso->symbol_names = RB_ROOT_CACHED; in dso__new_id()
1284 dso->data.cache = RB_ROOT; in dso__new_id()
1285 dso->inlined_nodes = RB_ROOT_CACHED; in dso__new_id()
1286 dso->srclines = RB_ROOT_CACHED; in dso__new_id()
1287 dso->data.fd = -1; in dso__new_id()
1288 dso->data.status = DSO_DATA_STATUS_UNKNOWN; in dso__new_id()
1289 dso->symtab_type = DSO_BINARY_TYPE__NOT_FOUND; in dso__new_id()
1290 dso->binary_type = DSO_BINARY_TYPE__NOT_FOUND; in dso__new_id()
1291 dso->is_64_bit = (sizeof(void *) == 8); in dso__new_id()
1292 dso->loaded = 0; in dso__new_id()
1293 dso->rel = 0; in dso__new_id()
1294 dso->sorted_by_name = 0; in dso__new_id()
1295 dso->has_build_id = 0; in dso__new_id()
1296 dso->has_srcline = 1; in dso__new_id()
1297 dso->a2l_fails = 1; in dso__new_id()
1298 dso->kernel = DSO_SPACE__USER; in dso__new_id()
1299 dso->needs_swap = DSO_SWAP__UNSET; in dso__new_id()
1300 dso->comp = COMP_ID__NONE; in dso__new_id()
1301 RB_CLEAR_NODE(&dso->rb_node); in dso__new_id()
1302 dso->root = NULL; in dso__new_id()
1303 INIT_LIST_HEAD(&dso->node); in dso__new_id()
1304 INIT_LIST_HEAD(&dso->data.open_entry); in dso__new_id()
1305 mutex_init(&dso->lock); in dso__new_id()
1306 refcount_set(&dso->refcnt, 1); in dso__new_id()
1319 if (!RB_EMPTY_NODE(&dso->rb_node)) in dso__delete()
1321 dso->long_name); in dso__delete()
1324 inlines__tree_delete(&dso->inlined_nodes); in dso__delete()
1325 srcline__tree_delete(&dso->srclines); in dso__delete()
1326 symbols__delete(&dso->symbols); in dso__delete()
1328 if (dso->short_name_allocated) { in dso__delete()
1329 zfree((char **)&dso->short_name); in dso__delete()
1330 dso->short_name_allocated = false; in dso__delete()
1333 if (dso->long_name_allocated) { in dso__delete()
1334 zfree((char **)&dso->long_name); in dso__delete()
1335 dso->long_name_allocated = false; in dso__delete()
1339 auxtrace_cache__free(dso->auxtrace_cache); in dso__delete()
1342 zfree(&dso->symsrc_filename); in dso__delete()
1343 nsinfo__zput(dso->nsinfo); in dso__delete()
1344 mutex_destroy(&dso->lock); in dso__delete()
1351 refcount_inc(&dso->refcnt); in dso__get()
1357 if (dso && refcount_dec_and_test(&dso->refcnt)) in dso__put()
1363 dso->bid = *bid; in dso__set_build_id()
1364 dso->has_build_id = 1; in dso__set_build_id()
1369 if (dso->bid.size > bid->size && dso->bid.size == BUILD_ID_SIZE) { in dso__build_id_equal()
1371 * For the backward compatibility, it allows a build-id has in dso__build_id_equal()
1374 return !memcmp(dso->bid.data, bid->data, bid->size) && in dso__build_id_equal()
1375 !memchr_inv(&dso->bid.data[bid->size], 0, in dso__build_id_equal()
1376 dso->bid.size - bid->size); in dso__build_id_equal()
1379 return dso->bid.size == bid->size && in dso__build_id_equal()
1380 memcmp(dso->bid.data, bid->data, dso->bid.size) == 0; in dso__build_id_equal()
1389 sprintf(path, "%s/sys/kernel/notes", machine->root_dir); in dso__read_running_kernel_build_id()
1390 if (sysfs__read_build_id(path, &dso->bid) == 0) in dso__read_running_kernel_build_id()
1391 dso->has_build_id = true; in dso__read_running_kernel_build_id()
1402 const char *name = dso->short_name + 1; in dso__kernel_module_get_build_id()
1405 "%s/sys/module/%.*s/notes/.note.gnu.build-id", in dso__kernel_module_get_build_id()
1406 root_dir, (int)strlen(name) - 1, name); in dso__kernel_module_get_build_id()
1408 if (sysfs__read_build_id(filename, &dso->bid) == 0) in dso__kernel_module_get_build_id()
1409 dso->has_build_id = true; in dso__kernel_module_get_build_id()
1418 build_id__sprintf(&dso->bid, sbuild_id); in dso__fprintf_buildid()
1425 size_t ret = fprintf(fp, "dso: %s (", dso->short_name); in dso__fprintf()
1427 if (dso->short_name != dso->long_name) in dso__fprintf()
1428 ret += fprintf(fp, "%s, ", dso->long_name); in dso__fprintf()
1432 for (nd = rb_first_cached(&dso->symbols); nd; nd = rb_next(nd)) { in dso__fprintf()
1456 int idx, errnum = dso->load_errno; in dso__strerror_load()
1480 return -1; in dso__strerror_load()
1482 idx = errnum - __DSO_LOAD_ERRNO__START; in dso__strerror_load()