3 #define __PERF_SYMBOL 1 5 #include <linux/types.h> 10 #include <linux/list.h> 11 #include <linux/rbtree.h> 19 #ifdef HAVE_LIBELF_SUPPORT 31 #ifdef HAVE_LIBELF_MMAP_SUPPORT 32 # define PERF_ELF_C_READ_MMAP ELF_C_READ_MMAP 34 # define PERF_ELF_C_READ_MMAP ELF_C_READ 37 #ifdef HAVE_LIBELF_SUPPORT 39 GElf_Shdr *shp,
const char *
name,
size_t *idx);
43 #define DMGL_NO_OPTS 0 44 #define DMGL_PARAMS (1 << 0) 45 #define DMGL_ANSI (1 << 1) 48 #define DSO__NAME_KALLSYMS "[kernel.kallsyms]" 49 #define DSO__NAME_KCORE "[kernel.kcore]" 78 #define symbols__for_each_entry(symbols, pos, nd) \ 79 for (nd = rb_first(symbols); \ 80 nd && (pos = rb_entry(nd, struct symbol, rb_node)); \ 93 bool try_vmlinux_path,
97 ignore_vmlinux_buildid,
106 show_branchflag_count,
108 show_cpu_utilization,
128 *default_guest_kallsyms,
129 *default_guest_modules;
131 const char *dso_list_str,
163 #define symbol__join_symfs(bf, path) __symbol__join_symfs(bf, sizeof(bf), path) 203 union perf_mem_data_src data_src;
226 #ifdef HAVE_LIBELF_SUPPORT 254 const char *vmlinux,
bool vmlinux_allocated);
277 int (*process_module)(
void *arg,
const char *
name,
291 bool unknown_as_addr,
292 bool print_offsets, FILE *fp);
297 bool unknown_as_addr, FILE *fp);
301 const char *restricted_filename);
303 const char *
dir,
int unset __maybe_unused);
306 struct symsrc *runtime_ss,
int kmodule);
321 #define PERF_KCORE_EXTRACT "/tmp/perf-kcore-XXXXXX" 335 int kcore_copy(
const char *from_dir,
const char *to_dir);
339 const char *list_name);
341 const char *list_name);
343 #ifdef HAVE_LIBELF_SUPPORT 375 struct list_head note_list;
382 #define SDT_BASE_SCN ".stapsdt.base" 383 #define SDT_NOTE_SCN ".note.stapsdt" 384 #define SDT_NOTE_TYPE 3 385 #define SDT_NOTE_NAME "stapsdt" 398 #define mem_info__zput(mi) __mem_info__zput(&mi) int filename__read_build_id(const char *filename, void *bf, size_t size)
int file__read_maps(int fd, bool exe, mapfn_t mapfn, void *data, bool *is_64_bit)
void __symbols__insert(struct rb_root *symbols, struct symbol *sym, bool kernel)
int symbol__match_symbol_name(const char *namea, const char *nameb, enum symbol_tag_include includes)
int(* mapfn_t)(u64 start, u64 len, u64 pgoff, void *data)
const char * vmlinux_name
struct mem_info * mem_info__get(struct mem_info *mi)
struct strlist * sym_to_list
#define PERF_KCORE_EXTRACT
int arch__compare_symbol_names(const char *namea, const char *nameb)
int cleanup_sdt_note_list(struct list_head *sdt_notes)
int symbol__annotation_init(void)
int vmlinux_path__nr_entries
static int __symbol__join_symfs(char *bf, size_t size, const char *path)
struct symbol * symbol__new(u64 start, u64 len, u8 binding, u8 type, const char *name)
void map_groups__fixup_end(struct map_groups *mg)
int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name, enum dso_binary_type type)
int dso__load_vmlinux(struct dso *dso, struct map *map, const char *vmlinux, bool vmlinux_allocated)
int symbol__init(struct perf_env *env)
int dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map)
const char * tid_list_str
int filename__read_debuglink(const char *filename, char *debuglink, size_t size)
void symbol__delete(struct symbol *sym)
struct symbol * symbol__next_by_name(struct symbol *sym)
int arch__choose_best_symbol(struct symbol *syma, struct symbol *symb)
void dso__insert_symbol(struct dso *dso, struct symbol *sym)
void __weak arch__sym_update(struct symbol *s __maybe_unused, GElf_Sym *sym __maybe_unused)
int get_sdt_note_list(struct list_head *head, const char *target)
void symbols__fixup_end(struct rb_root *symbols)
const char * default_guest_vmlinux_name
struct symbol * dso__first_symbol(struct dso *dso)
size_t symbol__fprintf_symname_offs(const struct symbol *sym, const struct addr_location *al, FILE *fp)
int path__join(char *bf, size_t size, const char *path1, const char *path2)
int setup_intlist(struct intlist **list, const char *list_str, const char *list_name)
int dso__load(struct dso *dso, struct map *map)
bool __weak elf__needs_adjust_symbols(GElf_Ehdr ehdr)
struct symbol * dso__find_symbol(struct dso *dso, u64 addr)
int modules__parse(const char *filename, void *arg, int(*process_module)(void *arg, const char *name, u64 start, u64 size))
int dso__load_vmlinux_path(struct dso *dso, struct map *map)
struct symbol * dso__next_symbol(struct symbol *sym)
struct mem_info * mem_info__new(void)
int kcore_extract__create(struct kcore_extract *kce)
size_t symbol__fprintf_symname(const struct symbol *sym, FILE *fp)
Elf_Scn * elf_section_by_name(Elf *elf, GElf_Ehdr *ep, GElf_Shdr *shp, const char *name, size_t *idx)
void symbols__fixup_duplicate(struct rb_root *symbols)
void symbol__elf_init(void)
bool symsrc__has_symtab(struct symsrc *ss)
int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss, struct symsrc *runtime_ss, int kmodule)
size_t __symbol__fprintf_symname(const struct symbol *sym, const struct addr_location *al, bool unknown_as_addr, FILE *fp)
int kcore_copy(const char *from_dir, const char *to_dir)
enum dso_type dso__type_fd(int fd)
void mem_info__put(struct mem_info *mi)
const char * arch__normalize_symbol_name(const char *name)
int sysfs__read_build_id(const char *filename, void *bf, size_t size)
bool symsrc__possibly_runtime(struct symsrc *ss)
void symbols__insert(struct rb_root *symbols, struct symbol *sym)
static int sym(yyscan_t scanner, int type, int config)
void symbols__delete(struct rb_root *symbols)
size_t symbol__fprintf(struct symbol *sym, FILE *fp)
int sdt_notes__get_count(struct list_head *start)
int symbol__config_symfs(const struct option *opt __maybe_unused, const char *dir, int unset __maybe_unused)
static void __mem_info__zput(struct mem_info **mi)
void symsrc__destroy(struct symsrc *ss)
static size_t symbol__size(const struct symbol *sym)
char * dso__demangle_sym(struct dso *dso, int kmodule, const char *elf_name)
struct intlist * tid_list
int setup_list(struct strlist **list, const char *list_str, const char *list_name)
static void * symbol__priv(struct symbol *sym)
size_t __symbol__fprintf_symname_offs(const struct symbol *sym, const struct addr_location *al, bool unknown_as_addr, bool print_offsets, FILE *fp)
int arch__compare_symbol_names_n(const char *namea, const char *nameb, unsigned int n)
bool symbol__restricted_filename(const char *filename, const char *restricted_filename)
struct symbol * dso__find_symbol_by_name(struct dso *dso, const char *name)
int compare_proc_modules(const char *from, const char *to)
int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss)
struct symbol * dso__last_symbol(struct dso *dso)
int __dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map, bool no_kcore)
void kcore_extract__delete(struct kcore_extract *kce)