|
Linux Perf
|
#include <elf.h>#include <errno.h>#include <gelf.h>#include <fcntl.h>#include <inttypes.h>#include <string.h>#include <unistd.h>#include <sys/mman.h>#include <linux/list.h>#include "callchain.h"#include "thread.h"#include "session.h"#include "perf_regs.h"#include "unwind.h"#include "symbol.h"#include "util.h"#include "debug.h"#include "asm/bug.h"#include "dso.h"#include <libunwind.h>#include <libunwind-ptrace.h>

Go to the source code of this file.
Classes | |
| struct | unwind_info |
| struct | table_entry |
| struct | eh_frame_hdr |
Macros | |
| #define | dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table) |
| #define | dwarf_find_debug_frame UNW_OBJ(dwarf_find_debug_frame) |
| #define | DW_EH_PE_FORMAT_MASK 0x0f /* format of the encoded value */ |
| #define | DW_EH_PE_APPL_MASK 0x70 /* how the value is to be applied */ |
| #define | DW_EH_PE_omit 0xff |
| #define | DW_EH_PE_ptr 0x00 /* pointer-sized unsigned value */ |
| #define | DW_EH_PE_udata4 0x03 /* unsigned 32-bit value */ |
| #define | DW_EH_PE_udata8 0x04 /* unsigned 64-bit value */ |
| #define | DW_EH_PE_sdata4 0x0b /* signed 32-bit value */ |
| #define | DW_EH_PE_sdata8 0x0c /* signed 64-bit value */ |
| #define | DW_EH_PE_absptr 0x00 /* absolute value */ |
| #define | DW_EH_PE_pcrel 0x10 /* rel. to addr. of encoded value */ |
| #define | DW_EH_PE_funcrel 0x40 /* start-of-procedure-relative */ |
| #define | DW_EH_PE_aligned 0x50 /* aligned pointer */ |
| #define | dw_read(ptr, type, end) |
| #define | dw_read_encoded_value(ptr, end, enc) |
Functions | |
| int UNW_OBJ() | dwarf_search_unwind_table (unw_addr_space_t as, unw_word_t ip, unw_dyn_info_t *di, unw_proc_info_t *pi, int need_unwind_info, void *arg) |
| int UNW_OBJ() | dwarf_find_debug_frame (int found, unw_dyn_info_t *di_debug, unw_word_t ip, unw_word_t segbase, const char *obj_name, unw_word_t start, unw_word_t end) |
| static int | __dw_read_encoded_value (u8 **p, u8 *end, u64 *val, u8 encoding) |
| static u64 | elf_section_offset (int fd, const char *name) |
| static int | elf_is_exec (int fd, const char *name) |
| static int | unwind_spec_ehframe (struct dso *dso, struct machine *machine, u64 offset, u64 *table_data, u64 *segbase, u64 *fde_count) |
| static int | read_unwind_spec_eh_frame (struct dso *dso, struct machine *machine, u64 *table_data, u64 *segbase, u64 *fde_count) |
| static int | read_unwind_spec_debug_frame (struct dso *dso, struct machine *machine, u64 *offset) |
| static struct map * | find_map (unw_word_t ip, struct unwind_info *ui) |
| static int | find_proc_info (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi, int need_unwind_info, void *arg) |
| static int | access_fpreg (unw_addr_space_t __maybe_unused as, unw_regnum_t __maybe_unused num, unw_fpreg_t __maybe_unused *val, int __maybe_unused __write, void __maybe_unused *arg) |
| static int | get_dyn_info_list_addr (unw_addr_space_t __maybe_unused as, unw_word_t __maybe_unused *dil_addr, void __maybe_unused *arg) |
| static int | resume (unw_addr_space_t __maybe_unused as, unw_cursor_t __maybe_unused *cu, void __maybe_unused *arg) |
| static int | get_proc_name (unw_addr_space_t __maybe_unused as, unw_word_t __maybe_unused addr, char __maybe_unused *bufp, size_t __maybe_unused buf_len, unw_word_t __maybe_unused *offp, void __maybe_unused *arg) |
| static int | access_dso_mem (struct unwind_info *ui, unw_word_t addr, unw_word_t *data) |
| static int | access_mem (unw_addr_space_t __maybe_unused as, unw_word_t addr, unw_word_t *valp, int __write, void *arg) |
| static int | access_reg (unw_addr_space_t __maybe_unused as, unw_regnum_t regnum, unw_word_t *valp, int __write, void *arg) |
| static void | put_unwind_info (unw_addr_space_t __maybe_unused as, unw_proc_info_t *pi __maybe_unused, void *arg __maybe_unused) |
| static int | entry (u64 ip, struct thread *thread, unwind_entry_cb_t cb, void *arg) |
| static void | display_error (int err) |
| static int | _unwind__prepare_access (struct thread *thread) |
| static void | _unwind__flush_access (struct thread *thread) |
| static void | _unwind__finish_access (struct thread *thread) |
| static int | get_entries (struct unwind_info *ui, unwind_entry_cb_t cb, void *arg, int max_stack) |
| static int | _unwind__get_entries (unwind_entry_cb_t cb, void *arg, struct thread *thread, struct perf_sample *data, int max_stack) |
Variables | |
| struct eh_frame_hdr | __packed |
| static unw_accessors_t | accessors |
| static struct unwind_libunwind_ops | _unwind_libunwind_ops |
| struct unwind_libunwind_ops * | local_unwind_libunwind_ops = &_unwind_libunwind_ops |
| #define DW_EH_PE_absptr 0x00 /* absolute value */ |
Definition at line 73 of file unwind-libunwind-local.c.
| #define DW_EH_PE_aligned 0x50 /* aligned pointer */ |
Definition at line 82 of file unwind-libunwind-local.c.
| #define DW_EH_PE_APPL_MASK 0x70 /* how the value is to be applied */ |
Definition at line 62 of file unwind-libunwind-local.c.
| #define DW_EH_PE_FORMAT_MASK 0x0f /* format of the encoded value */ |
Definition at line 61 of file unwind-libunwind-local.c.
| #define DW_EH_PE_funcrel 0x40 /* start-of-procedure-relative */ |
Definition at line 81 of file unwind-libunwind-local.c.
| #define DW_EH_PE_omit 0xff |
Definition at line 65 of file unwind-libunwind-local.c.
| #define DW_EH_PE_pcrel 0x10 /* rel. to addr. of encoded value */ |
Definition at line 74 of file unwind-libunwind-local.c.
| #define DW_EH_PE_ptr 0x00 /* pointer-sized unsigned value */ |
Definition at line 66 of file unwind-libunwind-local.c.
| #define DW_EH_PE_sdata4 0x0b /* signed 32-bit value */ |
Definition at line 69 of file unwind-libunwind-local.c.
| #define DW_EH_PE_sdata8 0x0c /* signed 64-bit value */ |
Definition at line 70 of file unwind-libunwind-local.c.
| #define DW_EH_PE_udata4 0x03 /* unsigned 32-bit value */ |
Definition at line 67 of file unwind-libunwind-local.c.
| #define DW_EH_PE_udata8 0x04 /* unsigned 64-bit value */ |
Definition at line 68 of file unwind-libunwind-local.c.
| #define dw_read | ( | ptr, | |
| type, | |||
| end | |||
| ) |
Definition at line 100 of file unwind-libunwind-local.c.
| #define dw_read_encoded_value | ( | ptr, | |
| end, | |||
| enc | |||
| ) |
Definition at line 162 of file unwind-libunwind-local.c.
| #define dwarf_find_debug_frame UNW_OBJ(dwarf_find_debug_frame) |
Definition at line 59 of file unwind-libunwind-local.c.
| #define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table) |
Definition at line 50 of file unwind-libunwind-local.c.
|
static |
Definition at line 110 of file unwind-libunwind-local.c.
|
static |
Definition at line 638 of file unwind-libunwind-local.c.
|
static |
Definition at line 631 of file unwind-libunwind-local.c.
|
static |
|
static |
Definition at line 617 of file unwind-libunwind-local.c.
|
static |
|
static |
Definition at line 428 of file unwind-libunwind-local.c.
|
static |
|
static |
|
static |
Definition at line 589 of file unwind-libunwind-local.c.
| int UNW_OBJ() dwarf_find_debug_frame | ( | int | found, |
| unw_dyn_info_t * | di_debug, | ||
| unw_word_t | ip, | ||
| unw_word_t | segbase, | ||
| const char * | obj_name, | ||
| unw_word_t | start, | ||
| unw_word_t | end | ||
| ) |
| int UNW_OBJ() dwarf_search_unwind_table | ( | unw_addr_space_t | as, |
| unw_word_t | ip, | ||
| unw_dyn_info_t * | di, | ||
| unw_proc_info_t * | pi, | ||
| int | need_unwind_info, | ||
| void * | arg | ||
| ) |
|
static |
Definition at line 196 of file unwind-libunwind-local.c.
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 438 of file unwind-libunwind-local.c.
|
static |
|
static |
Definition at line 454 of file unwind-libunwind-local.c.
|
static |
Definition at line 564 of file unwind-libunwind-local.c.
|
static |
Definition at line 445 of file unwind-libunwind-local.c.
| struct eh_frame_hdr __packed |
|
static |
Definition at line 729 of file unwind-libunwind-local.c.
|
static |
Definition at line 606 of file unwind-libunwind-local.c.
| struct unwind_libunwind_ops* local_unwind_libunwind_ops = &_unwind_libunwind_ops |
Definition at line 738 of file unwind-libunwind-local.c.