Lines Matching refs:dso
104 #define DSO__SWAP(dso, type, val) \ argument
107 enum dso_swap_type ___dst = dso__needs_swap(dso); \
151 struct dso *dso; member
171 DECLARE_RC_STRUCT(dso) { in DECLARE_RC_STRUCT() argument
240 #define dso__for_each_symbol(dso, pos, n) \ argument
241 symbols__for_each_entry(dso__symbols(dso), pos, n)
243 static inline void *dso__a2l(const struct dso *dso) in dso__a2l() argument
245 return RC_CHK_ACCESS(dso)->a2l; in dso__a2l()
248 static inline void dso__set_a2l(struct dso *dso, void *val) in dso__set_a2l() argument
250 RC_CHK_ACCESS(dso)->a2l = val; in dso__set_a2l()
253 static inline unsigned int dso__a2l_fails(const struct dso *dso) in dso__a2l_fails() argument
255 return RC_CHK_ACCESS(dso)->a2l_fails; in dso__a2l_fails()
258 static inline void dso__set_a2l_fails(struct dso *dso, unsigned int val) in dso__set_a2l_fails() argument
260 RC_CHK_ACCESS(dso)->a2l_fails = val; in dso__set_a2l_fails()
263 static inline bool dso__adjust_symbols(const struct dso *dso) in dso__adjust_symbols() argument
265 return RC_CHK_ACCESS(dso)->adjust_symbols; in dso__adjust_symbols()
268 static inline void dso__set_adjust_symbols(struct dso *dso, bool val) in dso__set_adjust_symbols() argument
270 RC_CHK_ACCESS(dso)->adjust_symbols = val; in dso__set_adjust_symbols()
273 static inline bool dso__annotate_warned(const struct dso *dso) in dso__annotate_warned() argument
275 return RC_CHK_ACCESS(dso)->annotate_warned; in dso__annotate_warned()
278 static inline void dso__set_annotate_warned(struct dso *dso) in dso__set_annotate_warned() argument
280 RC_CHK_ACCESS(dso)->annotate_warned = 1; in dso__set_annotate_warned()
283 static inline bool dso__auxtrace_warned(const struct dso *dso) in dso__auxtrace_warned() argument
285 return RC_CHK_ACCESS(dso)->auxtrace_warned; in dso__auxtrace_warned()
288 static inline void dso__set_auxtrace_warned(struct dso *dso) in dso__set_auxtrace_warned() argument
290 RC_CHK_ACCESS(dso)->auxtrace_warned = 1; in dso__set_auxtrace_warned()
293 static inline struct auxtrace_cache *dso__auxtrace_cache(struct dso *dso) in dso__auxtrace_cache() argument
295 return RC_CHK_ACCESS(dso)->auxtrace_cache; in dso__auxtrace_cache()
298 static inline void dso__set_auxtrace_cache(struct dso *dso, struct auxtrace_cache *cache) in dso__set_auxtrace_cache() argument
300 RC_CHK_ACCESS(dso)->auxtrace_cache = cache; in dso__set_auxtrace_cache()
303 static inline struct build_id *dso__bid(struct dso *dso) in dso__bid() argument
305 return &RC_CHK_ACCESS(dso)->bid; in dso__bid()
308 static inline const struct build_id *dso__bid_const(const struct dso *dso) in dso__bid_const() argument
310 return &RC_CHK_ACCESS(dso)->bid; in dso__bid_const()
313 static inline struct dso_bpf_prog *dso__bpf_prog(struct dso *dso) in dso__bpf_prog() argument
315 return &RC_CHK_ACCESS(dso)->bpf_prog; in dso__bpf_prog()
318 static inline bool dso__has_build_id(const struct dso *dso) in dso__has_build_id() argument
320 return RC_CHK_ACCESS(dso)->has_build_id; in dso__has_build_id()
323 static inline void dso__set_has_build_id(struct dso *dso) in dso__set_has_build_id() argument
325 RC_CHK_ACCESS(dso)->has_build_id = true; in dso__set_has_build_id()
328 static inline bool dso__has_srcline(const struct dso *dso) in dso__has_srcline() argument
330 return RC_CHK_ACCESS(dso)->has_srcline; in dso__has_srcline()
333 static inline void dso__set_has_srcline(struct dso *dso, bool val) in dso__set_has_srcline() argument
335 RC_CHK_ACCESS(dso)->has_srcline = val; in dso__set_has_srcline()
338 static inline int dso__comp(const struct dso *dso) in dso__comp() argument
340 return RC_CHK_ACCESS(dso)->comp; in dso__comp()
343 static inline void dso__set_comp(struct dso *dso, int comp) in dso__set_comp() argument
345 RC_CHK_ACCESS(dso)->comp = comp; in dso__set_comp()
348 static inline struct dso_data *dso__data(struct dso *dso) in dso__data() argument
350 return &RC_CHK_ACCESS(dso)->data; in dso__data()
353 static inline u64 dso__db_id(const struct dso *dso) in dso__db_id() argument
355 return RC_CHK_ACCESS(dso)->db_id; in dso__db_id()
358 static inline void dso__set_db_id(struct dso *dso, u64 db_id) in dso__set_db_id() argument
360 RC_CHK_ACCESS(dso)->db_id = db_id; in dso__set_db_id()
363 static inline struct dsos *dso__dsos(struct dso *dso) in dso__dsos() argument
365 return RC_CHK_ACCESS(dso)->dsos; in dso__dsos()
368 static inline void dso__set_dsos(struct dso *dso, struct dsos *dsos) in dso__set_dsos() argument
370 RC_CHK_ACCESS(dso)->dsos = dsos; in dso__set_dsos()
373 static inline bool dso__header_build_id(struct dso *dso) in dso__header_build_id() argument
375 return RC_CHK_ACCESS(dso)->header_build_id; in dso__header_build_id()
378 static inline void dso__set_header_build_id(struct dso *dso, bool val) in dso__set_header_build_id() argument
380 RC_CHK_ACCESS(dso)->header_build_id = val; in dso__set_header_build_id()
383 static inline bool dso__hit(const struct dso *dso) in dso__hit() argument
385 return RC_CHK_ACCESS(dso)->hit; in dso__hit()
388 static inline void dso__set_hit(struct dso *dso) in dso__set_hit() argument
390 RC_CHK_ACCESS(dso)->hit = 1; in dso__set_hit()
393 static inline struct dso_id *dso__id(struct dso *dso) in dso__id() argument
395 return &RC_CHK_ACCESS(dso)->id; in dso__id()
398 static inline const struct dso_id *dso__id_const(const struct dso *dso) in dso__id_const() argument
400 return &RC_CHK_ACCESS(dso)->id; in dso__id_const()
403 static inline struct rb_root_cached *dso__inlined_nodes(struct dso *dso) in dso__inlined_nodes() argument
405 return &RC_CHK_ACCESS(dso)->inlined_nodes; in dso__inlined_nodes()
408 static inline bool dso__is_64_bit(const struct dso *dso) in dso__is_64_bit() argument
410 return RC_CHK_ACCESS(dso)->is_64_bit; in dso__is_64_bit()
413 static inline void dso__set_is_64_bit(struct dso *dso, bool is) in dso__set_is_64_bit() argument
415 RC_CHK_ACCESS(dso)->is_64_bit = is; in dso__set_is_64_bit()
418 static inline bool dso__is_kmod(const struct dso *dso) in dso__is_kmod() argument
420 return RC_CHK_ACCESS(dso)->is_kmod; in dso__is_kmod()
423 static inline void dso__set_is_kmod(struct dso *dso) in dso__set_is_kmod() argument
425 RC_CHK_ACCESS(dso)->is_kmod = 1; in dso__set_is_kmod()
428 static inline enum dso_space_type dso__kernel(const struct dso *dso) in dso__kernel() argument
430 return RC_CHK_ACCESS(dso)->kernel; in dso__kernel()
433 static inline void dso__set_kernel(struct dso *dso, enum dso_space_type kernel) in dso__set_kernel() argument
435 RC_CHK_ACCESS(dso)->kernel = kernel; in dso__set_kernel()
438 static inline u64 dso__last_find_result_addr(const struct dso *dso) in dso__last_find_result_addr() argument
440 return RC_CHK_ACCESS(dso)->last_find_result.addr; in dso__last_find_result_addr()
443 static inline void dso__set_last_find_result_addr(struct dso *dso, u64 addr) in dso__set_last_find_result_addr() argument
445 RC_CHK_ACCESS(dso)->last_find_result.addr = addr; in dso__set_last_find_result_addr()
448 static inline struct symbol *dso__last_find_result_symbol(const struct dso *dso) in dso__last_find_result_symbol() argument
450 return RC_CHK_ACCESS(dso)->last_find_result.symbol; in dso__last_find_result_symbol()
453 static inline void dso__set_last_find_result_symbol(struct dso *dso, struct symbol *symbol) in dso__set_last_find_result_symbol() argument
455 RC_CHK_ACCESS(dso)->last_find_result.symbol = symbol; in dso__set_last_find_result_symbol()
458 static inline enum dso_load_errno *dso__load_errno(struct dso *dso) in dso__load_errno() argument
460 return &RC_CHK_ACCESS(dso)->load_errno; in dso__load_errno()
463 static inline void dso__set_loaded(struct dso *dso) in dso__set_loaded() argument
465 RC_CHK_ACCESS(dso)->loaded = true; in dso__set_loaded()
468 static inline struct mutex *dso__lock(struct dso *dso) in dso__lock() argument
470 return &RC_CHK_ACCESS(dso)->lock; in dso__lock()
473 static inline const char *dso__long_name(const struct dso *dso) in dso__long_name() argument
475 return RC_CHK_ACCESS(dso)->long_name; in dso__long_name()
478 static inline bool dso__long_name_allocated(const struct dso *dso) in dso__long_name_allocated() argument
480 return RC_CHK_ACCESS(dso)->long_name_allocated; in dso__long_name_allocated()
483 static inline void dso__set_long_name_allocated(struct dso *dso, bool allocated) in dso__set_long_name_allocated() argument
485 RC_CHK_ACCESS(dso)->long_name_allocated = allocated; in dso__set_long_name_allocated()
488 static inline u16 dso__long_name_len(const struct dso *dso) in dso__long_name_len() argument
490 return RC_CHK_ACCESS(dso)->long_name_len; in dso__long_name_len()
493 static inline const char *dso__name(const struct dso *dso) in dso__name() argument
495 return RC_CHK_ACCESS(dso)->name; in dso__name()
498 static inline enum dso_swap_type dso__needs_swap(const struct dso *dso) in dso__needs_swap() argument
500 return RC_CHK_ACCESS(dso)->needs_swap; in dso__needs_swap()
503 static inline void dso__set_needs_swap(struct dso *dso, enum dso_swap_type type) in dso__set_needs_swap() argument
505 RC_CHK_ACCESS(dso)->needs_swap = type; in dso__set_needs_swap()
508 static inline struct nsinfo *dso__nsinfo(struct dso *dso) in dso__nsinfo() argument
510 return RC_CHK_ACCESS(dso)->nsinfo; in dso__nsinfo()
513 static inline const struct nsinfo *dso__nsinfo_const(const struct dso *dso) in dso__nsinfo_const() argument
515 return RC_CHK_ACCESS(dso)->nsinfo; in dso__nsinfo_const()
518 static inline struct nsinfo **dso__nsinfo_ptr(struct dso *dso) in dso__nsinfo_ptr() argument
520 return &RC_CHK_ACCESS(dso)->nsinfo; in dso__nsinfo_ptr()
523 void dso__set_nsinfo(struct dso *dso, struct nsinfo *nsi);
525 static inline u8 dso__rel(const struct dso *dso) in dso__rel() argument
527 return RC_CHK_ACCESS(dso)->rel; in dso__rel()
530 static inline void dso__set_rel(struct dso *dso, u8 rel) in dso__set_rel() argument
532 RC_CHK_ACCESS(dso)->rel = rel; in dso__set_rel()
535 static inline const char *dso__short_name(const struct dso *dso) in dso__short_name() argument
537 return RC_CHK_ACCESS(dso)->short_name; in dso__short_name()
540 static inline bool dso__short_name_allocated(const struct dso *dso) in dso__short_name_allocated() argument
542 return RC_CHK_ACCESS(dso)->short_name_allocated; in dso__short_name_allocated()
545 static inline void dso__set_short_name_allocated(struct dso *dso, bool allocated) in dso__set_short_name_allocated() argument
547 RC_CHK_ACCESS(dso)->short_name_allocated = allocated; in dso__set_short_name_allocated()
550 static inline u16 dso__short_name_len(const struct dso *dso) in dso__short_name_len() argument
552 return RC_CHK_ACCESS(dso)->short_name_len; in dso__short_name_len()
555 static inline struct rb_root_cached *dso__srclines(struct dso *dso) in dso__srclines() argument
557 return &RC_CHK_ACCESS(dso)->srclines; in dso__srclines()
560 static inline struct rb_root *dso__data_types(struct dso *dso) in dso__data_types() argument
562 return &RC_CHK_ACCESS(dso)->data_types; in dso__data_types()
565 static inline struct rb_root *dso__global_vars(struct dso *dso) in dso__global_vars() argument
567 return &RC_CHK_ACCESS(dso)->global_vars; in dso__global_vars()
570 static inline struct rb_root_cached *dso__symbols(struct dso *dso) in dso__symbols() argument
572 return &RC_CHK_ACCESS(dso)->symbols; in dso__symbols()
575 static inline struct symbol **dso__symbol_names(struct dso *dso) in dso__symbol_names() argument
577 return RC_CHK_ACCESS(dso)->symbol_names; in dso__symbol_names()
580 static inline void dso__set_symbol_names(struct dso *dso, struct symbol **names) in dso__set_symbol_names() argument
582 RC_CHK_ACCESS(dso)->symbol_names = names; in dso__set_symbol_names()
585 static inline size_t dso__symbol_names_len(struct dso *dso) in dso__symbol_names_len() argument
587 return RC_CHK_ACCESS(dso)->symbol_names_len; in dso__symbol_names_len()
590 static inline void dso__set_symbol_names_len(struct dso *dso, size_t len) in dso__set_symbol_names_len() argument
592 RC_CHK_ACCESS(dso)->symbol_names_len = len; in dso__set_symbol_names_len()
595 static inline const char *dso__symsrc_filename(const struct dso *dso) in dso__symsrc_filename() argument
597 return RC_CHK_ACCESS(dso)->symsrc_filename; in dso__symsrc_filename()
600 static inline void dso__set_symsrc_filename(struct dso *dso, char *val) in dso__set_symsrc_filename() argument
602 RC_CHK_ACCESS(dso)->symsrc_filename = val; in dso__set_symsrc_filename()
605 static inline void dso__free_symsrc_filename(struct dso *dso) in dso__free_symsrc_filename() argument
607 zfree(&RC_CHK_ACCESS(dso)->symsrc_filename); in dso__free_symsrc_filename()
610 static inline enum dso_binary_type dso__symtab_type(const struct dso *dso) in dso__symtab_type() argument
612 return RC_CHK_ACCESS(dso)->symtab_type; in dso__symtab_type()
615 static inline void dso__set_symtab_type(struct dso *dso, enum dso_binary_type bt) in dso__set_symtab_type() argument
617 RC_CHK_ACCESS(dso)->symtab_type = bt; in dso__set_symtab_type()
620 static inline u64 dso__text_end(const struct dso *dso) in dso__text_end() argument
622 return RC_CHK_ACCESS(dso)->text_end; in dso__text_end()
625 static inline void dso__set_text_end(struct dso *dso, u64 val) in dso__set_text_end() argument
627 RC_CHK_ACCESS(dso)->text_end = val; in dso__set_text_end()
630 static inline u64 dso__text_offset(const struct dso *dso) in dso__text_offset() argument
632 return RC_CHK_ACCESS(dso)->text_offset; in dso__text_offset()
635 static inline void dso__set_text_offset(struct dso *dso, u64 val) in dso__set_text_offset() argument
637 RC_CHK_ACCESS(dso)->text_offset = val; in dso__set_text_offset()
643 struct dso *dso__new_id(const char *name, const struct dso_id *id);
644 struct dso *dso__new(const char *name);
645 void dso__delete(struct dso *dso);
647 int dso__cmp_id(struct dso *a, struct dso *b);
648 void dso__set_short_name(struct dso *dso, const char *name, bool name_allocated);
649 void dso__set_long_name(struct dso *dso, const char *name, bool name_allocated);
650 void __dso__inject_id(struct dso *dso, const struct dso_id *id);
652 int dso__name_len(const struct dso *dso);
654 struct dso *dso__get(struct dso *dso);
655 void dso__put(struct dso *dso);
657 static inline void __dso__zput(struct dso **dso) in __dso__zput() argument
659 dso__put(*dso); in __dso__zput()
660 *dso = NULL; in __dso__zput()
663 #define dso__zput(dso) __dso__zput(&dso) argument
665 bool dso__loaded(const struct dso *dso);
667 static inline bool dso__has_symbols(const struct dso *dso) in dso__has_symbols() argument
669 return !RB_EMPTY_ROOT(&RC_CHK_ACCESS(dso)->symbols.rb_root); in dso__has_symbols()
672 char *dso__filename_with_chroot(const struct dso *dso, const char *filename);
674 bool dso__sorted_by_name(const struct dso *dso);
675 void dso__set_sorted_by_name(struct dso *dso);
676 void dso__sort_by_name(struct dso *dso);
678 void dso__set_build_id(struct dso *dso, struct build_id *bid);
679 bool dso__build_id_equal(const struct dso *dso, struct build_id *bid);
680 void dso__read_running_kernel_build_id(struct dso *dso,
682 int dso__kernel_module_get_build_id(struct dso *dso, const char *root_dir);
684 char dso__symtab_origin(const struct dso *dso);
685 int dso__read_binary_type_filename(const struct dso *dso, enum dso_binary_type type,
688 bool dso__needs_decompress(struct dso *dso);
689 int dso__decompress_kmodule_fd(struct dso *dso, const char *name);
690 int dso__decompress_kmodule_path(struct dso *dso, const char *name,
710 void dso__set_module_info(struct dso *dso, struct kmod_path *m,
758 int dso__data_get_fd(struct dso *dso, struct machine *machine);
759 void dso__data_put_fd(struct dso *dso);
760 void dso__data_close(struct dso *dso);
762 int dso__data_file_size(struct dso *dso, struct machine *machine);
763 off_t dso__data_size(struct dso *dso, struct machine *machine);
764 ssize_t dso__data_read_offset(struct dso *dso, struct machine *machine,
766 ssize_t dso__data_read_addr(struct dso *dso, struct map *map,
769 bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by);
770 ssize_t dso__data_write_cache_offs(struct dso *dso, struct machine *machine,
772 ssize_t dso__data_write_cache_addr(struct dso *dso, struct map *map,
777 struct dso *machine__findnew_kernel(struct machine *machine, const char *name,
780 void dso__reset_find_symbol_cache(struct dso *dso);
782 size_t dso__fprintf_symbols_by_name(struct dso *dso, FILE *fp);
783 size_t dso__fprintf(struct dso *dso, FILE *fp);
785 static inline enum dso_binary_type dso__binary_type(const struct dso *dso) in dso__binary_type() argument
787 return RC_CHK_ACCESS(dso)->binary_type; in dso__binary_type()
790 static inline void dso__set_binary_type(struct dso *dso, enum dso_binary_type bt) in dso__set_binary_type() argument
792 RC_CHK_ACCESS(dso)->binary_type = bt; in dso__set_binary_type()
795 static inline bool dso__is_vmlinux(const struct dso *dso) in dso__is_vmlinux() argument
797 enum dso_binary_type bt = dso__binary_type(dso); in dso__is_vmlinux()
802 static inline bool dso__is_kcore(const struct dso *dso) in dso__is_kcore() argument
804 enum dso_binary_type bt = dso__binary_type(dso); in dso__is_kcore()
809 static inline bool dso__is_kallsyms(const struct dso *dso) in dso__is_kallsyms() argument
811 return RC_CHK_ACCESS(dso)->kernel && RC_CHK_ACCESS(dso)->long_name[0] != '/'; in dso__is_kallsyms()
814 bool dso__is_object_file(const struct dso *dso);
816 void dso__free_a2l(struct dso *dso);
818 enum dso_type dso__type(struct dso *dso, struct machine *machine);
820 int dso__strerror_load(struct dso *dso, char *buf, size_t buflen);
824 u64 dso__find_global_type(struct dso *dso, u64 addr);
825 u64 dso__findnew_global_type(struct dso *dso, u64 addr, u64 offset);