Lines Matching refs:dso
162 #define DSO__SWAP(dso, type, val) \ argument
165 enum dso_swap_type ___dst = dso__needs_swap(dso); \
228 struct dso *dso; member
250 DECLARE_RC_STRUCT(dso) { in DECLARE_RC_STRUCT() argument
322 #define dso__for_each_symbol(dso, pos, n) \ argument
323 symbols__for_each_entry(dso__symbols(dso), pos, n)
325 static inline void *dso__a2l(const struct dso *dso) in dso__a2l() argument
327 return RC_CHK_ACCESS(dso)->a2l; in dso__a2l()
330 static inline void dso__set_a2l(struct dso *dso, void *val) in dso__set_a2l() argument
332 RC_CHK_ACCESS(dso)->a2l = val; in dso__set_a2l()
335 static inline unsigned int dso__a2l_fails(const struct dso *dso) in dso__a2l_fails() argument
337 return RC_CHK_ACCESS(dso)->a2l_fails; in dso__a2l_fails()
340 static inline void dso__set_a2l_fails(struct dso *dso, unsigned int val) in dso__set_a2l_fails() argument
342 RC_CHK_ACCESS(dso)->a2l_fails = val; in dso__set_a2l_fails()
345 static inline bool dso__adjust_symbols(const struct dso *dso) in dso__adjust_symbols() argument
347 return RC_CHK_ACCESS(dso)->adjust_symbols; in dso__adjust_symbols()
350 static inline void dso__set_adjust_symbols(struct dso *dso, bool val) in dso__set_adjust_symbols() argument
352 RC_CHK_ACCESS(dso)->adjust_symbols = val; in dso__set_adjust_symbols()
355 static inline bool dso__annotate_warned(const struct dso *dso) in dso__annotate_warned() argument
357 return RC_CHK_ACCESS(dso)->annotate_warned; in dso__annotate_warned()
360 static inline void dso__set_annotate_warned(struct dso *dso) in dso__set_annotate_warned() argument
362 RC_CHK_ACCESS(dso)->annotate_warned = 1; in dso__set_annotate_warned()
365 static inline bool dso__auxtrace_warned(const struct dso *dso) in dso__auxtrace_warned() argument
367 return RC_CHK_ACCESS(dso)->auxtrace_warned; in dso__auxtrace_warned()
370 static inline void dso__set_auxtrace_warned(struct dso *dso) in dso__set_auxtrace_warned() argument
372 RC_CHK_ACCESS(dso)->auxtrace_warned = 1; in dso__set_auxtrace_warned()
375 static inline struct auxtrace_cache *dso__auxtrace_cache(struct dso *dso) in dso__auxtrace_cache() argument
377 return RC_CHK_ACCESS(dso)->auxtrace_cache; in dso__auxtrace_cache()
380 static inline void dso__set_auxtrace_cache(struct dso *dso, struct auxtrace_cache *cache) in dso__set_auxtrace_cache() argument
382 RC_CHK_ACCESS(dso)->auxtrace_cache = cache; in dso__set_auxtrace_cache()
385 static inline struct dso_bpf_prog *dso__bpf_prog(struct dso *dso) in dso__bpf_prog() argument
387 return &RC_CHK_ACCESS(dso)->bpf_prog; in dso__bpf_prog()
390 static inline bool dso__has_srcline(const struct dso *dso) in dso__has_srcline() argument
392 return RC_CHK_ACCESS(dso)->has_srcline; in dso__has_srcline()
395 static inline void dso__set_has_srcline(struct dso *dso, bool val) in dso__set_has_srcline() argument
397 RC_CHK_ACCESS(dso)->has_srcline = val; in dso__set_has_srcline()
400 static inline int dso__comp(const struct dso *dso) in dso__comp() argument
402 return RC_CHK_ACCESS(dso)->comp; in dso__comp()
405 static inline void dso__set_comp(struct dso *dso, int comp) in dso__set_comp() argument
407 RC_CHK_ACCESS(dso)->comp = comp; in dso__set_comp()
410 static inline struct dso_data *dso__data(struct dso *dso) in dso__data() argument
412 return &RC_CHK_ACCESS(dso)->data; in dso__data()
415 static inline u64 dso__db_id(const struct dso *dso) in dso__db_id() argument
417 return RC_CHK_ACCESS(dso)->db_id; in dso__db_id()
420 static inline void dso__set_db_id(struct dso *dso, u64 db_id) in dso__set_db_id() argument
422 RC_CHK_ACCESS(dso)->db_id = db_id; in dso__set_db_id()
425 static inline struct dsos *dso__dsos(struct dso *dso) in dso__dsos() argument
427 return RC_CHK_ACCESS(dso)->dsos; in dso__dsos()
430 static inline void dso__set_dsos(struct dso *dso, struct dsos *dsos) in dso__set_dsos() argument
432 RC_CHK_ACCESS(dso)->dsos = dsos; in dso__set_dsos()
435 static inline bool dso__header_build_id(struct dso *dso) in dso__header_build_id() argument
437 return RC_CHK_ACCESS(dso)->header_build_id; in dso__header_build_id()
440 static inline void dso__set_header_build_id(struct dso *dso, bool val) in dso__set_header_build_id() argument
442 RC_CHK_ACCESS(dso)->header_build_id = val; in dso__set_header_build_id()
445 static inline bool dso__hit(const struct dso *dso) in dso__hit() argument
447 return RC_CHK_ACCESS(dso)->hit; in dso__hit()
450 static inline void dso__set_hit(struct dso *dso) in dso__set_hit() argument
452 RC_CHK_ACCESS(dso)->hit = 1; in dso__set_hit()
455 static inline struct dso_id *dso__id(struct dso *dso) in dso__id() argument
457 return &RC_CHK_ACCESS(dso)->id; in dso__id()
460 static inline const struct dso_id *dso__id_const(const struct dso *dso) in dso__id_const() argument
462 return &RC_CHK_ACCESS(dso)->id; in dso__id_const()
465 static inline const struct build_id *dso__bid(const struct dso *dso) in dso__bid() argument
467 return &dso__id_const(dso)->build_id; in dso__bid()
470 static inline bool dso__has_build_id(const struct dso *dso) in dso__has_build_id() argument
472 return build_id__is_defined(dso__bid(dso)); in dso__has_build_id()
475 static inline struct rb_root_cached *dso__inlined_nodes(struct dso *dso) in dso__inlined_nodes() argument
477 return &RC_CHK_ACCESS(dso)->inlined_nodes; in dso__inlined_nodes()
480 static inline bool dso__is_64_bit(const struct dso *dso) in dso__is_64_bit() argument
482 return RC_CHK_ACCESS(dso)->is_64_bit; in dso__is_64_bit()
485 static inline void dso__set_is_64_bit(struct dso *dso, bool is) in dso__set_is_64_bit() argument
487 RC_CHK_ACCESS(dso)->is_64_bit = is; in dso__set_is_64_bit()
490 static inline bool dso__is_kmod(const struct dso *dso) in dso__is_kmod() argument
492 return RC_CHK_ACCESS(dso)->is_kmod; in dso__is_kmod()
495 static inline void dso__set_is_kmod(struct dso *dso) in dso__set_is_kmod() argument
497 RC_CHK_ACCESS(dso)->is_kmod = 1; in dso__set_is_kmod()
500 static inline enum dso_space_type dso__kernel(const struct dso *dso) in dso__kernel() argument
502 return RC_CHK_ACCESS(dso)->kernel; in dso__kernel()
505 static inline void dso__set_kernel(struct dso *dso, enum dso_space_type kernel) in dso__set_kernel() argument
507 RC_CHK_ACCESS(dso)->kernel = kernel; in dso__set_kernel()
510 static inline u64 dso__last_find_result_addr(const struct dso *dso) in dso__last_find_result_addr() argument
512 return RC_CHK_ACCESS(dso)->last_find_result.addr; in dso__last_find_result_addr()
515 static inline void dso__set_last_find_result_addr(struct dso *dso, u64 addr) in dso__set_last_find_result_addr() argument
517 RC_CHK_ACCESS(dso)->last_find_result.addr = addr; in dso__set_last_find_result_addr()
520 static inline struct symbol *dso__last_find_result_symbol(const struct dso *dso) in dso__last_find_result_symbol() argument
522 return RC_CHK_ACCESS(dso)->last_find_result.symbol; in dso__last_find_result_symbol()
525 static inline void dso__set_last_find_result_symbol(struct dso *dso, struct symbol *symbol) in dso__set_last_find_result_symbol() argument
527 RC_CHK_ACCESS(dso)->last_find_result.symbol = symbol; in dso__set_last_find_result_symbol()
530 static inline enum dso_load_errno *dso__load_errno(struct dso *dso) in dso__load_errno() argument
532 return &RC_CHK_ACCESS(dso)->load_errno; in dso__load_errno()
535 static inline void dso__set_loaded(struct dso *dso) in dso__set_loaded() argument
537 RC_CHK_ACCESS(dso)->loaded = true; in dso__set_loaded()
540 static inline struct mutex *dso__lock(struct dso *dso) in dso__lock() argument
542 return &RC_CHK_ACCESS(dso)->lock; in dso__lock()
545 static inline const char *dso__long_name(const struct dso *dso) in dso__long_name() argument
547 return RC_CHK_ACCESS(dso)->long_name; in dso__long_name()
550 static inline bool dso__long_name_allocated(const struct dso *dso) in dso__long_name_allocated() argument
552 return RC_CHK_ACCESS(dso)->long_name_allocated; in dso__long_name_allocated()
555 static inline void dso__set_long_name_allocated(struct dso *dso, bool allocated) in dso__set_long_name_allocated() argument
557 RC_CHK_ACCESS(dso)->long_name_allocated = allocated; in dso__set_long_name_allocated()
560 static inline u16 dso__long_name_len(const struct dso *dso) in dso__long_name_len() argument
562 return RC_CHK_ACCESS(dso)->long_name_len; in dso__long_name_len()
565 static inline const char *dso__name(const struct dso *dso) in dso__name() argument
567 return RC_CHK_ACCESS(dso)->name; in dso__name()
570 static inline enum dso_swap_type dso__needs_swap(const struct dso *dso) in dso__needs_swap() argument
572 return RC_CHK_ACCESS(dso)->needs_swap; in dso__needs_swap()
575 static inline void dso__set_needs_swap(struct dso *dso, enum dso_swap_type type) in dso__set_needs_swap() argument
577 RC_CHK_ACCESS(dso)->needs_swap = type; in dso__set_needs_swap()
580 static inline struct nsinfo *dso__nsinfo(struct dso *dso) in dso__nsinfo() argument
582 return RC_CHK_ACCESS(dso)->nsinfo; in dso__nsinfo()
585 static inline const struct nsinfo *dso__nsinfo_const(const struct dso *dso) in dso__nsinfo_const() argument
587 return RC_CHK_ACCESS(dso)->nsinfo; in dso__nsinfo_const()
590 static inline struct nsinfo **dso__nsinfo_ptr(struct dso *dso) in dso__nsinfo_ptr() argument
592 return &RC_CHK_ACCESS(dso)->nsinfo; in dso__nsinfo_ptr()
595 void dso__set_nsinfo(struct dso *dso, struct nsinfo *nsi);
597 static inline u8 dso__rel(const struct dso *dso) in dso__rel() argument
599 return RC_CHK_ACCESS(dso)->rel; in dso__rel()
602 static inline void dso__set_rel(struct dso *dso, u8 rel) in dso__set_rel() argument
604 RC_CHK_ACCESS(dso)->rel = rel; in dso__set_rel()
607 static inline const char *dso__short_name(const struct dso *dso) in dso__short_name() argument
609 return RC_CHK_ACCESS(dso)->short_name; in dso__short_name()
612 static inline bool dso__short_name_allocated(const struct dso *dso) in dso__short_name_allocated() argument
614 return RC_CHK_ACCESS(dso)->short_name_allocated; in dso__short_name_allocated()
617 static inline void dso__set_short_name_allocated(struct dso *dso, bool allocated) in dso__set_short_name_allocated() argument
619 RC_CHK_ACCESS(dso)->short_name_allocated = allocated; in dso__set_short_name_allocated()
622 static inline u16 dso__short_name_len(const struct dso *dso) in dso__short_name_len() argument
624 return RC_CHK_ACCESS(dso)->short_name_len; in dso__short_name_len()
627 static inline struct rb_root_cached *dso__srclines(struct dso *dso) in dso__srclines() argument
629 return &RC_CHK_ACCESS(dso)->srclines; in dso__srclines()
632 static inline struct rb_root *dso__data_types(struct dso *dso) in dso__data_types() argument
634 return &RC_CHK_ACCESS(dso)->data_types; in dso__data_types()
637 static inline struct rb_root *dso__global_vars(struct dso *dso) in dso__global_vars() argument
639 return &RC_CHK_ACCESS(dso)->global_vars; in dso__global_vars()
642 static inline struct rb_root_cached *dso__symbols(struct dso *dso) in dso__symbols() argument
644 return &RC_CHK_ACCESS(dso)->symbols; in dso__symbols()
647 static inline struct symbol **dso__symbol_names(struct dso *dso) in dso__symbol_names() argument
649 return RC_CHK_ACCESS(dso)->symbol_names; in dso__symbol_names()
652 static inline void dso__set_symbol_names(struct dso *dso, struct symbol **names) in dso__set_symbol_names() argument
654 RC_CHK_ACCESS(dso)->symbol_names = names; in dso__set_symbol_names()
657 static inline size_t dso__symbol_names_len(struct dso *dso) in dso__symbol_names_len() argument
659 return RC_CHK_ACCESS(dso)->symbol_names_len; in dso__symbol_names_len()
662 static inline void dso__set_symbol_names_len(struct dso *dso, size_t len) in dso__set_symbol_names_len() argument
664 RC_CHK_ACCESS(dso)->symbol_names_len = len; in dso__set_symbol_names_len()
667 static inline const char *dso__symsrc_filename(const struct dso *dso) in dso__symsrc_filename() argument
669 return RC_CHK_ACCESS(dso)->symsrc_filename; in dso__symsrc_filename()
672 static inline void dso__set_symsrc_filename(struct dso *dso, char *val) in dso__set_symsrc_filename() argument
674 RC_CHK_ACCESS(dso)->symsrc_filename = val; in dso__set_symsrc_filename()
677 static inline void dso__free_symsrc_filename(struct dso *dso) in dso__free_symsrc_filename() argument
679 zfree(&RC_CHK_ACCESS(dso)->symsrc_filename); in dso__free_symsrc_filename()
682 static inline enum dso_binary_type dso__symtab_type(const struct dso *dso) in dso__symtab_type() argument
684 return RC_CHK_ACCESS(dso)->symtab_type; in dso__symtab_type()
687 static inline void dso__set_symtab_type(struct dso *dso, enum dso_binary_type bt) in dso__set_symtab_type() argument
689 RC_CHK_ACCESS(dso)->symtab_type = bt; in dso__set_symtab_type()
692 static inline u64 dso__text_end(const struct dso *dso) in dso__text_end() argument
694 return RC_CHK_ACCESS(dso)->text_end; in dso__text_end()
697 static inline void dso__set_text_end(struct dso *dso, u64 val) in dso__set_text_end() argument
699 RC_CHK_ACCESS(dso)->text_end = val; in dso__set_text_end()
702 static inline u64 dso__text_offset(const struct dso *dso) in dso__text_offset() argument
704 return RC_CHK_ACCESS(dso)->text_offset; in dso__text_offset()
707 static inline void dso__set_text_offset(struct dso *dso, u64 val) in dso__set_text_offset() argument
709 RC_CHK_ACCESS(dso)->text_offset = val; in dso__set_text_offset()
712 struct dso *dso__new_id(const char *name, const struct dso_id *id);
713 struct dso *dso__new(const char *name);
714 void dso__delete(struct dso *dso);
716 int dso__cmp_id(struct dso *a, struct dso *b);
717 void dso__set_short_name(struct dso *dso, const char *name, bool name_allocated);
718 void dso__set_long_name(struct dso *dso, const char *name, bool name_allocated);
719 void __dso__improve_id(struct dso *dso, const struct dso_id *id);
721 int dso__name_len(const struct dso *dso);
723 struct dso *dso__get(struct dso *dso);
724 void dso__put(struct dso *dso) LOCKS_EXCLUDED(_dso__data_open_lock);
726 static inline void __dso__zput(struct dso **dso) in __dso__zput() argument
728 dso__put(*dso); in __dso__zput()
729 *dso = NULL; in __dso__zput()
732 #define dso__zput(dso) __dso__zput(&dso) argument
734 bool dso__loaded(const struct dso *dso);
736 static inline bool dso__has_symbols(const struct dso *dso) in dso__has_symbols() argument
738 return !RB_EMPTY_ROOT(&RC_CHK_ACCESS(dso)->symbols.rb_root); in dso__has_symbols()
741 char *dso__filename_with_chroot(const struct dso *dso, const char *filename);
743 bool dso__sorted_by_name(const struct dso *dso);
744 void dso__set_sorted_by_name(struct dso *dso);
745 void dso__sort_by_name(struct dso *dso);
747 int dso__swap_init(struct dso *dso, unsigned char eidata);
749 void dso__set_build_id(struct dso *dso, const struct build_id *bid);
750 bool dso__build_id_equal(const struct dso *dso, const struct build_id *bid);
751 void dso__read_running_kernel_build_id(struct dso *dso,
753 int dso__kernel_module_get_build_id(struct dso *dso, const char *root_dir);
755 char dso__symtab_origin(const struct dso *dso);
756 int dso__read_binary_type_filename(const struct dso *dso, enum dso_binary_type type,
759 bool dso__needs_decompress(struct dso *dso);
760 int dso__decompress_kmodule_fd(struct dso *dso, const char *name);
761 int dso__decompress_kmodule_path(struct dso *dso, const char *name,
781 void dso__set_module_info(struct dso *dso, struct kmod_path *m,
829 bool dso__data_get_fd(struct dso *dso, struct machine *machine, int *fd)
831 void dso__data_put_fd(struct dso *dso) UNLOCK_FUNCTION(_dso__data_open_lock);
832 void dso__data_close(struct dso *dso) LOCKS_EXCLUDED(_dso__data_open_lock);
834 int dso__data_file_size(struct dso *dso, struct machine *machine);
835 off_t dso__data_size(struct dso *dso, struct machine *machine);
836 ssize_t dso__data_read_offset(struct dso *dso, struct machine *machine,
838 uint16_t dso__e_machine(struct dso *dso, struct machine *machine);
839 ssize_t dso__data_read_addr(struct dso *dso, struct map *map,
842 bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by);
843 ssize_t dso__data_write_cache_offs(struct dso *dso, struct machine *machine,
845 ssize_t dso__data_write_cache_addr(struct dso *dso, struct map *map,
850 struct dso *machine__findnew_kernel(struct machine *machine, const char *name,
853 void dso__reset_find_symbol_cache(struct dso *dso);
855 size_t dso__fprintf_symbols_by_name(struct dso *dso, FILE *fp);
856 size_t dso__fprintf(struct dso *dso, FILE *fp);
858 static inline enum dso_binary_type dso__binary_type(const struct dso *dso) in dso__binary_type() argument
860 return RC_CHK_ACCESS(dso)->binary_type; in dso__binary_type()
863 static inline void dso__set_binary_type(struct dso *dso, enum dso_binary_type bt) in dso__set_binary_type() argument
865 RC_CHK_ACCESS(dso)->binary_type = bt; in dso__set_binary_type()
868 static inline bool dso__is_vmlinux(const struct dso *dso) in dso__is_vmlinux() argument
870 enum dso_binary_type bt = dso__binary_type(dso); in dso__is_vmlinux()
875 static inline bool dso__is_kcore(const struct dso *dso) in dso__is_kcore() argument
877 enum dso_binary_type bt = dso__binary_type(dso); in dso__is_kcore()
882 static inline bool dso__is_kallsyms(const struct dso *dso) in dso__is_kallsyms() argument
884 enum dso_binary_type bt = dso__binary_type(dso); in dso__is_kallsyms()
889 bool dso__is_object_file(const struct dso *dso);
891 void dso__free_a2l(struct dso *dso);
893 enum dso_type dso__type(struct dso *dso, struct machine *machine);
895 int dso__strerror_load(struct dso *dso, char *buf, size_t buflen);
899 u64 dso__find_global_type(struct dso *dso, u64 addr);
900 u64 dso__findnew_global_type(struct dso *dso, u64 addr, u64 offset);