3 #include <sys/resource.h>
10 char dso__symtab_origin(const struct dso *dso)
12 static const char origin[] = {
13 [DSO_BINARY_TYPE__KALLSYMS] = 'k',
14 [DSO_BINARY_TYPE__VMLINUX] = 'v',
15 [DSO_BINARY_TYPE__JAVA_JIT] = 'j',
16 [DSO_BINARY_TYPE__DEBUGLINK] = 'l',
17 [DSO_BINARY_TYPE__BUILD_ID_CACHE] = 'B',
18 [DSO_BINARY_TYPE__FEDORA_DEBUGINFO] = 'f',
19 [DSO_BINARY_TYPE__UBUNTU_DEBUGINFO] = 'u',
20 [DSO_BINARY_TYPE__OPENEMBEDDED_DEBUGINFO] = 'o',
21 [DSO_BINARY_TYPE__BUILDID_DEBUGINFO] = 'b',
22 [DSO_BINARY_TYPE__SYSTEM_PATH_DSO] = 'd',
23 [DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE] = 'K',
24 [DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE_COMP] = 'm',
25 [DSO_BINARY_TYPE__GUEST_KALLSYMS] = 'g',
26 [DSO_BINARY_TYPE__GUEST_KMODULE] = 'G',
27 [DSO_BINARY_TYPE__GUEST_KMODULE_COMP] = 'M',
28 [DSO_BINARY_TYPE__GUEST_VMLINUX] = 'V',
31 if (dso == NULL || dso->symtab_type == DSO_BINARY_TYPE__NOT_FOUND)
33 return origin[dso->symtab_type];
36 int dso__read_binary_type_filename(const struct dso *dso,
37 enum dso_binary_type type,
38 char *root_dir, char *filename, size_t size)
40 char build_id_hex[BUILD_ID_SIZE * 2 + 1];
45 case DSO_BINARY_TYPE__DEBUGLINK: {
48 strncpy(filename, dso->long_name, size);
49 debuglink = filename + dso->long_name_len;
50 while (debuglink != filename && *debuglink != '/')
52 if (*debuglink == '/')
54 ret = filename__read_debuglink(dso->long_name, debuglink,
55 size - (debuglink - filename));
58 case DSO_BINARY_TYPE__BUILD_ID_CACHE:
59 /* skip the locally configured cache if a symfs is given */
60 if (symbol_conf.symfs[0] ||
61 (dso__build_id_filename(dso, filename, size) == NULL))
65 case DSO_BINARY_TYPE__FEDORA_DEBUGINFO:
66 len = __symbol__join_symfs(filename, size, "/usr/lib/debug");
67 snprintf(filename + len, size - len, "%s.debug", dso->long_name);
70 case DSO_BINARY_TYPE__UBUNTU_DEBUGINFO:
71 len = __symbol__join_symfs(filename, size, "/usr/lib/debug");
72 snprintf(filename + len, size - len, "%s", dso->long_name);
75 case DSO_BINARY_TYPE__OPENEMBEDDED_DEBUGINFO:
77 const char *last_slash;
80 last_slash = dso->long_name + dso->long_name_len;
81 while (last_slash != dso->long_name && *last_slash != '/')
84 len = __symbol__join_symfs(filename, size, "");
85 dir_size = last_slash - dso->long_name + 2;
86 if (dir_size > (size - len)) {
90 len += scnprintf(filename + len, dir_size, "%s", dso->long_name);
91 len += scnprintf(filename + len , size - len, ".debug%s",
96 case DSO_BINARY_TYPE__BUILDID_DEBUGINFO:
97 if (!dso->has_build_id) {
102 build_id__sprintf(dso->build_id,
103 sizeof(dso->build_id),
105 len = __symbol__join_symfs(filename, size, "/usr/lib/debug/.build-id/");
106 snprintf(filename + len, size - len, "%.2s/%s.debug",
107 build_id_hex, build_id_hex + 2);
110 case DSO_BINARY_TYPE__VMLINUX:
111 case DSO_BINARY_TYPE__GUEST_VMLINUX:
112 case DSO_BINARY_TYPE__SYSTEM_PATH_DSO:
113 __symbol__join_symfs(filename, size, dso->long_name);
116 case DSO_BINARY_TYPE__GUEST_KMODULE:
117 case DSO_BINARY_TYPE__GUEST_KMODULE_COMP:
118 path__join3(filename, size, symbol_conf.symfs,
119 root_dir, dso->long_name);
122 case DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE:
123 case DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE_COMP:
124 __symbol__join_symfs(filename, size, dso->long_name);
127 case DSO_BINARY_TYPE__KCORE:
128 case DSO_BINARY_TYPE__GUEST_KCORE:
129 snprintf(filename, size, "%s", dso->long_name);
133 case DSO_BINARY_TYPE__KALLSYMS:
134 case DSO_BINARY_TYPE__GUEST_KALLSYMS:
135 case DSO_BINARY_TYPE__JAVA_JIT:
136 case DSO_BINARY_TYPE__NOT_FOUND:
144 static const struct {
146 int (*decompress)(const char *input, int output);
148 #ifdef HAVE_ZLIB_SUPPORT
149 { "gz", gzip_decompress_to_file },
154 bool is_supported_compression(const char *ext)
158 for (i = 0; compressions[i].fmt; i++) {
159 if (!strcmp(ext, compressions[i].fmt))
165 bool is_kmodule_extension(const char *ext)
167 if (strncmp(ext, "ko", 2))
170 if (ext[2] == '\0' || (ext[2] == '.' && is_supported_compression(ext+3)))
176 bool is_kernel_module(const char *pathname, bool *compressed)
178 const char *ext = strrchr(pathname, '.');
183 if (is_supported_compression(ext + 1)) {
187 } else if (compressed)
190 return is_kmodule_extension(ext + 1);
193 bool decompress_to_file(const char *ext, const char *filename, int output_fd)
197 for (i = 0; compressions[i].fmt; i++) {
198 if (!strcmp(ext, compressions[i].fmt))
199 return !compressions[i].decompress(filename,
205 bool dso__needs_decompress(struct dso *dso)
207 return dso->symtab_type == DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE_COMP ||
208 dso->symtab_type == DSO_BINARY_TYPE__GUEST_KMODULE_COMP;
212 * Global list of open DSOs and the counter.
214 static LIST_HEAD(dso__data_open);
215 static long dso__data_open_cnt;
217 static void dso__list_add(struct dso *dso)
219 list_add_tail(&dso->data.open_entry, &dso__data_open);
220 dso__data_open_cnt++;
223 static void dso__list_del(struct dso *dso)
225 list_del(&dso->data.open_entry);
226 WARN_ONCE(dso__data_open_cnt <= 0,
227 "DSO data fd counter out of bounds.");
228 dso__data_open_cnt--;
231 static void close_first_dso(void);
233 static int do_open(char *name)
236 char sbuf[STRERR_BUFSIZE];
239 fd = open(name, O_RDONLY);
243 pr_debug("dso open failed, mmap: %s\n",
244 strerror_r(errno, sbuf, sizeof(sbuf)));
245 if (!dso__data_open_cnt || errno != EMFILE)
254 static int __open_dso(struct dso *dso, struct machine *machine)
257 char *root_dir = (char *)"";
258 char *name = malloc(PATH_MAX);
264 root_dir = machine->root_dir;
266 if (dso__read_binary_type_filename(dso, dso->binary_type,
267 root_dir, name, PATH_MAX)) {
277 static void check_data_close(void);
280 * dso_close - Open DSO data file
283 * Open @dso's data file descriptor and updates
284 * list/count of open DSO objects.
286 static int open_dso(struct dso *dso, struct machine *machine)
288 int fd = __open_dso(dso, machine);
293 * Check if we crossed the allowed number
294 * of opened DSOs and close one if needed.
302 static void close_data_fd(struct dso *dso)
304 if (dso->data.fd >= 0) {
307 dso->data.file_size = 0;
313 * dso_close - Close DSO data file
316 * Close @dso's data file descriptor and updates
317 * list/count of open DSO objects.
319 static void close_dso(struct dso *dso)
324 static void close_first_dso(void)
328 dso = list_first_entry(&dso__data_open, struct dso, data.open_entry);
332 static rlim_t get_fd_limit(void)
337 /* Allow half of the current open fd limit. */
338 if (getrlimit(RLIMIT_NOFILE, &l) == 0) {
339 if (l.rlim_cur == RLIM_INFINITY)
342 limit = l.rlim_cur / 2;
344 pr_err("failed to get fd limit\n");
351 static bool may_cache_fd(void)
356 limit = get_fd_limit();
358 if (limit == RLIM_INFINITY)
361 return limit > (rlim_t) dso__data_open_cnt;
365 * Check and close LRU dso if we crossed allowed limit
366 * for opened dso file descriptors. The limit is half
367 * of the RLIMIT_NOFILE files opened.
369 static void check_data_close(void)
371 bool cache_fd = may_cache_fd();
378 * dso__data_close - Close DSO data file
381 * External interface to close @dso's data file descriptor.
383 void dso__data_close(struct dso *dso)
389 * dso__data_fd - Get dso's data file descriptor
391 * @machine: machine object
393 * External interface to find dso's file, open it and
394 * returns file descriptor.
396 int dso__data_fd(struct dso *dso, struct machine *machine)
398 enum dso_binary_type binary_type_data[] = {
399 DSO_BINARY_TYPE__BUILD_ID_CACHE,
400 DSO_BINARY_TYPE__SYSTEM_PATH_DSO,
401 DSO_BINARY_TYPE__NOT_FOUND,
405 if (dso->data.status == DSO_DATA_STATUS_ERROR)
408 if (dso->data.fd >= 0)
411 if (dso->binary_type != DSO_BINARY_TYPE__NOT_FOUND) {
412 dso->data.fd = open_dso(dso, machine);
417 dso->binary_type = binary_type_data[i++];
419 dso->data.fd = open_dso(dso, machine);
420 if (dso->data.fd >= 0)
423 } while (dso->binary_type != DSO_BINARY_TYPE__NOT_FOUND);
425 if (dso->data.fd >= 0)
426 dso->data.status = DSO_DATA_STATUS_OK;
428 dso->data.status = DSO_DATA_STATUS_ERROR;
433 bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by)
437 if (dso->data.status_seen & flag)
440 dso->data.status_seen |= flag;
446 dso_cache__free(struct rb_root *root)
448 struct rb_node *next = rb_first(root);
451 struct dso_cache *cache;
453 cache = rb_entry(next, struct dso_cache, rb_node);
454 next = rb_next(&cache->rb_node);
455 rb_erase(&cache->rb_node, root);
460 static struct dso_cache *dso_cache__find(const struct rb_root *root, u64 offset)
462 struct rb_node * const *p = &root->rb_node;
463 const struct rb_node *parent = NULL;
464 struct dso_cache *cache;
470 cache = rb_entry(parent, struct dso_cache, rb_node);
471 end = cache->offset + DSO__DATA_CACHE_SIZE;
473 if (offset < cache->offset)
475 else if (offset >= end)
484 dso_cache__insert(struct rb_root *root, struct dso_cache *new)
486 struct rb_node **p = &root->rb_node;
487 struct rb_node *parent = NULL;
488 struct dso_cache *cache;
489 u64 offset = new->offset;
495 cache = rb_entry(parent, struct dso_cache, rb_node);
496 end = cache->offset + DSO__DATA_CACHE_SIZE;
498 if (offset < cache->offset)
500 else if (offset >= end)
504 rb_link_node(&new->rb_node, parent, p);
505 rb_insert_color(&new->rb_node, root);
509 dso_cache__memcpy(struct dso_cache *cache, u64 offset,
512 u64 cache_offset = offset - cache->offset;
513 u64 cache_size = min(cache->size - cache_offset, size);
515 memcpy(data, cache->data + cache_offset, cache_size);
520 dso_cache__read(struct dso *dso, u64 offset, u8 *data, ssize_t size)
522 struct dso_cache *cache;
530 cache = zalloc(sizeof(*cache) + DSO__DATA_CACHE_SIZE);
534 cache_offset = offset & DSO__DATA_CACHE_MASK;
536 ret = pread(dso->data.fd, cache->data, DSO__DATA_CACHE_SIZE, cache_offset);
540 cache->offset = cache_offset;
542 dso_cache__insert(&dso->data.cache, cache);
544 ret = dso_cache__memcpy(cache, offset, data, size);
554 static ssize_t dso_cache_read(struct dso *dso, u64 offset,
555 u8 *data, ssize_t size)
557 struct dso_cache *cache;
559 cache = dso_cache__find(&dso->data.cache, offset);
561 return dso_cache__memcpy(cache, offset, data, size);
563 return dso_cache__read(dso, offset, data, size);
567 * Reads and caches dso data DSO__DATA_CACHE_SIZE size chunks
568 * in the rb_tree. Any read to already cached data is served
571 static ssize_t cached_read(struct dso *dso, u64 offset, u8 *data, ssize_t size)
579 ret = dso_cache_read(dso, offset, p, size);
583 /* Reached EOF, return what we have. */
599 static int data_file_size(struct dso *dso)
602 char sbuf[STRERR_BUFSIZE];
604 if (!dso->data.file_size) {
605 if (fstat(dso->data.fd, &st)) {
606 pr_err("dso mmap failed, fstat: %s\n",
607 strerror_r(errno, sbuf, sizeof(sbuf)));
610 dso->data.file_size = st.st_size;
617 * dso__data_size - Return dso data size
619 * @machine: machine object
621 * Return: dso data size
623 off_t dso__data_size(struct dso *dso, struct machine *machine)
627 fd = dso__data_fd(dso, machine);
631 if (data_file_size(dso))
634 /* For now just estimate dso data size is close to file size */
635 return dso->data.file_size;
638 static ssize_t data_read_offset(struct dso *dso, u64 offset,
639 u8 *data, ssize_t size)
641 if (data_file_size(dso))
644 /* Check the offset sanity. */
645 if (offset > dso->data.file_size)
648 if (offset + size < offset)
651 return cached_read(dso, offset, data, size);
655 * dso__data_read_offset - Read data from dso file offset
657 * @machine: machine object
658 * @offset: file offset
659 * @data: buffer to store data
660 * @size: size of the @data buffer
662 * External interface to read data from dso file offset. Open
663 * dso data file and use cached_read to get the data.
665 ssize_t dso__data_read_offset(struct dso *dso, struct machine *machine,
666 u64 offset, u8 *data, ssize_t size)
668 if (dso__data_fd(dso, machine) < 0)
671 return data_read_offset(dso, offset, data, size);
675 * dso__data_read_addr - Read data from dso address
677 * @machine: machine object
678 * @add: virtual memory address
679 * @data: buffer to store data
680 * @size: size of the @data buffer
682 * External interface to read data from dso address.
684 ssize_t dso__data_read_addr(struct dso *dso, struct map *map,
685 struct machine *machine, u64 addr,
686 u8 *data, ssize_t size)
688 u64 offset = map->map_ip(map, addr);
689 return dso__data_read_offset(dso, machine, offset, data, size);
692 struct map *dso__new_map(const char *name)
694 struct map *map = NULL;
695 struct dso *dso = dso__new(name);
698 map = map__new2(0, dso, MAP__FUNCTION);
703 struct dso *dso__kernel_findnew(struct machine *machine, const char *name,
704 const char *short_name, int dso_type)
707 * The kernel dso could be created by build_id processing.
709 struct dso *dso = __dsos__findnew(&machine->kernel_dsos, name);
712 * We need to run this in all cases, since during the build_id
713 * processing we had no idea this was the kernel dso.
716 dso__set_short_name(dso, short_name, false);
717 dso->kernel = dso_type;
724 * Find a matching entry and/or link current entry to RB tree.
725 * Either one of the dso or name parameter must be non-NULL or the
726 * function will not work.
728 static struct dso *dso__findlink_by_longname(struct rb_root *root,
729 struct dso *dso, const char *name)
731 struct rb_node **p = &root->rb_node;
732 struct rb_node *parent = NULL;
735 name = dso->long_name;
737 * Find node with the matching name
740 struct dso *this = rb_entry(*p, struct dso, rb_node);
741 int rc = strcmp(name, this->long_name);
746 * In case the new DSO is a duplicate of an existing
747 * one, print an one-time warning & put the new entry
748 * at the end of the list of duplicates.
750 if (!dso || (dso == this))
751 return this; /* Find matching dso */
753 * The core kernel DSOs may have duplicated long name.
754 * In this case, the short name should be different.
755 * Comparing the short names to differentiate the DSOs.
757 rc = strcmp(dso->short_name, this->short_name);
759 pr_err("Duplicated dso name: %s\n", name);
764 p = &parent->rb_left;
766 p = &parent->rb_right;
769 /* Add new node and rebalance tree */
770 rb_link_node(&dso->rb_node, parent, p);
771 rb_insert_color(&dso->rb_node, root);
776 static inline struct dso *
777 dso__find_by_longname(const struct rb_root *root, const char *name)
779 return dso__findlink_by_longname((struct rb_root *)root, NULL, name);
782 void dso__set_long_name(struct dso *dso, const char *name, bool name_allocated)
787 if (dso->long_name_allocated)
788 free((char *)dso->long_name);
790 dso->long_name = name;
791 dso->long_name_len = strlen(name);
792 dso->long_name_allocated = name_allocated;
795 void dso__set_short_name(struct dso *dso, const char *name, bool name_allocated)
800 if (dso->short_name_allocated)
801 free((char *)dso->short_name);
803 dso->short_name = name;
804 dso->short_name_len = strlen(name);
805 dso->short_name_allocated = name_allocated;
808 static void dso__set_basename(struct dso *dso)
811 * basename() may modify path buffer, so we must pass
814 char *base, *lname = strdup(dso->long_name);
820 * basename() may return a pointer to internal
821 * storage which is reused in subsequent calls
822 * so copy the result.
824 base = strdup(basename(lname));
831 dso__set_short_name(dso, base, true);
834 int dso__name_len(const struct dso *dso)
837 return strlen("[unknown]");
839 return dso->long_name_len;
841 return dso->short_name_len;
844 bool dso__loaded(const struct dso *dso, enum map_type type)
846 return dso->loaded & (1 << type);
849 bool dso__sorted_by_name(const struct dso *dso, enum map_type type)
851 return dso->sorted_by_name & (1 << type);
854 void dso__set_sorted_by_name(struct dso *dso, enum map_type type)
856 dso->sorted_by_name |= (1 << type);
859 struct dso *dso__new(const char *name)
861 struct dso *dso = calloc(1, sizeof(*dso) + strlen(name) + 1);
865 strcpy(dso->name, name);
866 dso__set_long_name(dso, dso->name, false);
867 dso__set_short_name(dso, dso->name, false);
868 for (i = 0; i < MAP__NR_TYPES; ++i)
869 dso->symbols[i] = dso->symbol_names[i] = RB_ROOT;
870 dso->data.cache = RB_ROOT;
872 dso->data.status = DSO_DATA_STATUS_UNKNOWN;
873 dso->symtab_type = DSO_BINARY_TYPE__NOT_FOUND;
874 dso->binary_type = DSO_BINARY_TYPE__NOT_FOUND;
875 dso->is_64_bit = (sizeof(void *) == 8);
878 dso->sorted_by_name = 0;
879 dso->has_build_id = 0;
880 dso->has_srcline = 1;
882 dso->kernel = DSO_TYPE_USER;
883 dso->needs_swap = DSO_SWAP__UNSET;
884 RB_CLEAR_NODE(&dso->rb_node);
885 INIT_LIST_HEAD(&dso->node);
886 INIT_LIST_HEAD(&dso->data.open_entry);
892 void dso__delete(struct dso *dso)
896 if (!RB_EMPTY_NODE(&dso->rb_node))
897 pr_err("DSO %s is still in rbtree when being deleted!\n",
899 for (i = 0; i < MAP__NR_TYPES; ++i)
900 symbols__delete(&dso->symbols[i]);
902 if (dso->short_name_allocated) {
903 zfree((char **)&dso->short_name);
904 dso->short_name_allocated = false;
907 if (dso->long_name_allocated) {
908 zfree((char **)&dso->long_name);
909 dso->long_name_allocated = false;
912 dso__data_close(dso);
913 dso_cache__free(&dso->data.cache);
915 zfree(&dso->symsrc_filename);
919 void dso__set_build_id(struct dso *dso, void *build_id)
921 memcpy(dso->build_id, build_id, sizeof(dso->build_id));
922 dso->has_build_id = 1;
925 bool dso__build_id_equal(const struct dso *dso, u8 *build_id)
927 return memcmp(dso->build_id, build_id, sizeof(dso->build_id)) == 0;
930 void dso__read_running_kernel_build_id(struct dso *dso, struct machine *machine)
934 if (machine__is_default_guest(machine))
936 sprintf(path, "%s/sys/kernel/notes", machine->root_dir);
937 if (sysfs__read_build_id(path, dso->build_id,
938 sizeof(dso->build_id)) == 0)
939 dso->has_build_id = true;
942 int dso__kernel_module_get_build_id(struct dso *dso,
943 const char *root_dir)
945 char filename[PATH_MAX];
947 * kernel module short names are of the form "[module]" and
948 * we need just "module" here.
950 const char *name = dso->short_name + 1;
952 snprintf(filename, sizeof(filename),
953 "%s/sys/module/%.*s/notes/.note.gnu.build-id",
954 root_dir, (int)strlen(name) - 1, name);
956 if (sysfs__read_build_id(filename, dso->build_id,
957 sizeof(dso->build_id)) == 0)
958 dso->has_build_id = true;
963 bool __dsos__read_build_ids(struct list_head *head, bool with_hits)
965 bool have_build_id = false;
968 list_for_each_entry(pos, head, node) {
969 if (with_hits && !pos->hit)
971 if (pos->has_build_id) {
972 have_build_id = true;
975 if (filename__read_build_id(pos->long_name, pos->build_id,
976 sizeof(pos->build_id)) > 0) {
977 have_build_id = true;
978 pos->has_build_id = true;
982 return have_build_id;
985 void dsos__add(struct dsos *dsos, struct dso *dso)
987 list_add_tail(&dso->node, &dsos->head);
988 dso__findlink_by_longname(&dsos->root, dso, NULL);
991 struct dso *dsos__find(const struct dsos *dsos, const char *name,
997 list_for_each_entry(pos, &dsos->head, node)
998 if (strcmp(pos->short_name, name) == 0)
1002 return dso__find_by_longname(&dsos->root, name);
1005 struct dso *__dsos__findnew(struct dsos *dsos, const char *name)
1007 struct dso *dso = dsos__find(dsos, name, false);
1010 dso = dso__new(name);
1012 dsos__add(dsos, dso);
1013 dso__set_basename(dso);
1020 size_t __dsos__fprintf_buildid(struct list_head *head, FILE *fp,
1021 bool (skip)(struct dso *dso, int parm), int parm)
1026 list_for_each_entry(pos, head, node) {
1027 if (skip && skip(pos, parm))
1029 ret += dso__fprintf_buildid(pos, fp);
1030 ret += fprintf(fp, " %s\n", pos->long_name);
1035 size_t __dsos__fprintf(struct list_head *head, FILE *fp)
1040 list_for_each_entry(pos, head, node) {
1042 for (i = 0; i < MAP__NR_TYPES; ++i)
1043 ret += dso__fprintf(pos, i, fp);
1049 size_t dso__fprintf_buildid(struct dso *dso, FILE *fp)
1051 char sbuild_id[BUILD_ID_SIZE * 2 + 1];
1053 build_id__sprintf(dso->build_id, sizeof(dso->build_id), sbuild_id);
1054 return fprintf(fp, "%s", sbuild_id);
1057 size_t dso__fprintf(struct dso *dso, enum map_type type, FILE *fp)
1060 size_t ret = fprintf(fp, "dso: %s (", dso->short_name);
1062 if (dso->short_name != dso->long_name)
1063 ret += fprintf(fp, "%s, ", dso->long_name);
1064 ret += fprintf(fp, "%s, %sloaded, ", map_type__name[type],
1065 dso__loaded(dso, type) ? "" : "NOT ");
1066 ret += dso__fprintf_buildid(dso, fp);
1067 ret += fprintf(fp, ")\n");
1068 for (nd = rb_first(&dso->symbols[type]); nd; nd = rb_next(nd)) {
1069 struct symbol *pos = rb_entry(nd, struct symbol, rb_node);
1070 ret += symbol__fprintf(pos, fp);
1076 enum dso_type dso__type(struct dso *dso, struct machine *machine)
1080 fd = dso__data_fd(dso, machine);
1082 return DSO__TYPE_UNKNOWN;
1084 return dso__type_fd(fd);