5 #include <linux/refcount.h> 6 #include <linux/types.h> 7 #include <linux/rbtree.h> 11 #include <linux/types.h> 12 #include <linux/bitops.h> 94 #define DSO__SWAP(dso, type, val) \ 97 BUG_ON(dso->needs_swap == DSO_SWAP__UNSET); \ 98 if (dso->needs_swap == DSO_SWAP__YES) { \ 99 switch (sizeof(____r)) { \ 101 ____r = bswap_16(val); \ 104 ____r = bswap_32(val); \ 107 ____r = bswap_64(val); \ 116 #define DSO__DATA_CACHE_SIZE 4096 117 #define DSO__DATA_CACHE_MASK ~(DSO__DATA_CACHE_SIZE - 1) 131 struct list_head head;
143 struct rb_root symbols;
144 struct rb_root symbol_names;
145 struct rb_root inlined_nodes;
146 struct rb_root srclines;
181 struct rb_root cache;
186 struct list_head open_entry;
206 #define dso__for_each_symbol(dso, pos, n) \ 207 symbols__for_each_entry(&(dso)->symbols, pos, n) 222 struct dso *
dso__get(
struct dso *dso);
231 #define dso__zput(dso) __dso__zput(&dso) 237 return !RB_EMPTY_ROOT(&dso->
symbols);
259 char *pathname,
size_t len);
261 #define KMOD_DECOMP_NAME "/tmp/perf-kmod-XXXXXX" 262 #define KMOD_DECOMP_LEN sizeof(KMOD_DECOMP_NAME) 272 bool alloc_name,
bool alloc_ext);
274 #define kmod_path__parse(__m, __p) __kmod_path__parse(__m, __p, false, false) 275 #define kmod_path__parse_name(__m, __p) __kmod_path__parse(__m, __p, true , false) 276 #define kmod_path__parse_ext(__m, __p) __kmod_path__parse(__m, __p, false, true) 279 struct machine *machine);
332 struct machine *machine, u64 addr,
352 bool (
skip)(
struct dso *dso,
int parm),
int parm);
struct dso * __dsos__findnew(struct dsos *dsos, const char *name)
static bool dso__is_vmlinux(struct dso *dso)
bool decompress_to_file(const char *ext, const char *filename, int output_fd)
int dso__read_binary_type_filename(const struct dso *dso, enum dso_binary_type type, char *root_dir, char *filename, size_t size)
static void dso__set_loaded(struct dso *dso)
struct dso * dsos__find(struct dsos *dsos, const char *name, bool cmp_short)
int dso__decompress_kmodule_fd(struct dso *dso, const char *name)
struct dso * dso__new(const char *name)
int __kmod_path__parse(struct kmod_path *m, const char *path, bool alloc_name, bool alloc_ext)
static void skip(int size)
size_t __dsos__fprintf_buildid(struct list_head *head, FILE *fp, bool(skip)(struct dso *dso, int parm), int parm)
ssize_t dso__data_read_addr(struct dso *dso, struct map *map, struct machine *machine, u64 addr, u8 *data, ssize_t size)
struct dso * machine__findnew_kernel(struct machine *machine, const char *name, const char *short_name, int dso_type)
bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by)
void dso__set_module_info(struct dso *dso, struct kmod_path *m, struct machine *machine)
bool dso__loaded(const struct dso *dso)
enum dso_type dso__type(struct dso *dso, struct machine *machine)
struct dso * __dsos__addnew(struct dsos *dsos, const char *name)
void dso__data_put_fd(struct dso *dso)
void dso__set_short_name(struct dso *dso, const char *name, bool name_allocated)
off_t dso__data_size(struct dso *dso, struct machine *machine)
bool is_supported_compression(const char *ext)
void dso__read_running_kernel_build_id(struct dso *dso, struct machine *machine)
char dso__symtab_origin(const struct dso *dso)
void reset_fd_limit(void)
void dso__sort_by_name(struct dso *dso)
size_t dso__fprintf_symbols_by_name(struct dso *dso, FILE *fp)
int dso__decompress_kmodule_path(struct dso *dso, const char *name, char *pathname, size_t len)
void dso__set_build_id(struct dso *dso, void *build_id)
static bool dso__is_kallsyms(struct dso *dso)
bool dso__build_id_equal(const struct dso *dso, u8 *build_id)
static bool dso__is_kcore(struct dso *dso)
enum dso_kernel_type kernel
bool is_kernel_module(const char *pathname, int cpumode)
void dso__set_sorted_by_name(struct dso *dso)
int dso__data_get_fd(struct dso *dso, struct machine *machine)
ssize_t dso__data_read_offset(struct dso *dso, struct machine *machine, u64 offset, u8 *data, ssize_t size)
void dso__data_close(struct dso *dso)
struct map * dso__new_map(const char *name)
struct dso * dsos__findnew(struct dsos *dsos, const char *name)
void __dsos__add(struct dsos *dsos, struct dso *dso)
bool dso__needs_decompress(struct dso *dso)
struct auxtrace_cache * auxtrace_cache
static void __dso__zput(struct dso **dso)
void dso__reset_find_symbol_cache(struct dso *dso)
u8 build_id[BUILD_ID_SIZE]
void dso__put(struct dso *dso)
int dso__kernel_module_get_build_id(struct dso *dso, const char *root_dir)
void dso__free_a2l(struct dso *dso)
static bool dso__has_symbols(const struct dso *dso)
struct dso * __dsos__find(struct dsos *dsos, const char *name, bool cmp_short)
int dso__name_len(const struct dso *dso)
bool __dsos__read_build_ids(struct list_head *head, bool with_hits)
size_t __dsos__fprintf(struct list_head *head, FILE *fp)
size_t dso__fprintf_buildid(struct dso *dso, FILE *fp)
size_t dso__fprintf(struct dso *dso, FILE *fp)
enum dso_binary_type binary_type
void dsos__add(struct dsos *dsos, struct dso *dso)
struct dso * dso__get(struct dso *dso)
void dso__delete(struct dso *dso)
int dso__strerror_load(struct dso *dso, char *buf, size_t buflen)
void dso__set_long_name(struct dso *dso, const char *name, bool name_allocated)
bool dso__sorted_by_name(const struct dso *dso)