1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-15 04:38:12 +01:00
libunwind-eh_elf/include
Dave Watson f7fe1c9a7e x86_64: Add stack alignment prologue tdep_trace fastpath
GCC versions 4.9~current will often generate stack alignment prologues like:

lea 0x8(%rsp),%r10
and $0xfffffffffffffff0,%rsp
...
push %rbp
mov %rsp, %rbp
push %r10

resulting in dwarf expressions:
DW_CFA_def_cfa_expression (DW_OP_breg6: -8; DW_OP_deref)
DW_CFA_expression: r6 (rbp) (DW_OP_breg6: 0)

These prologues seem to be generated for SSE/AVX code, but sometimes
other times as well.

tdep_trace fastpath currently falls back to the slow dwarf parsing path
if it encounters any cfa_expressions. Unfortunately this is happening
often enough in our codebase to cause perf issues.  We could also fix the
fallback path (make the rs cache bigger, lock-free instead of locking, etc),
but that seems like a separate issue, and it will ever be as fast as the tracing
code.   Our binaries each have at least ~100 functions in them like this.

This patch teaches the tdep_trace about the two specific cfa_expressions,
which really just result in a single extra memory dereference of the stack
at a fixed offset from rbp.
2017-01-13 08:28:21 -08:00
..
tdep Add TileGx platform support to libunwind. 2014-09-08 16:21:53 -04:00
tdep-aarch64 One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-arm One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-hppa One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-ia64 One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-mips One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-ppc32 One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-ppc64 powerpc64 implementation 2015-09-07 18:08:26 -07:00
tdep-sh One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-tilegx Add TileGx platform support to libunwind. 2014-09-08 16:21:53 -04:00
tdep-x86 One time whitespace fixup. 2014-09-27 09:47:23 -07:00
tdep-x86_64 x86_64: Add stack alignment prologue tdep_trace fastpath 2017-01-13 08:28:21 -08:00
x86 One time whitespace fixup. 2014-09-27 09:47:23 -07:00
compiler.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
dwarf-eh.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
dwarf.h x86_64: Add stack alignment prologue tdep_trace fastpath 2017-01-13 08:28:21 -08:00
dwarf_i.h Invalid dwarf opcodes can cause references beyond the end of the array. 2015-06-19 19:47:22 -07:00
libunwind-aarch64.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-arm.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-common.h.in Export unw_backtrace() and alias backtrace() to it. 2011-04-01 00:00:33 -07:00
libunwind-coredump.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-dynamic.h Add an option to have start_ip_offset be relative to start_ip 2015-09-15 12:18:30 -07:00
libunwind-hppa.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-ia64.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-mips.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-ppc32.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-ppc64.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-ptrace.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-sh.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-tilegx.h Add TileGx platform support to libunwind. 2014-09-08 16:21:53 -04:00
libunwind-x86.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind-x86_64.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
libunwind.h.in Add TileGx platform support to libunwind. 2014-09-08 16:21:53 -04:00
libunwind_i.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
mempool.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
remote.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00
unwind.h One time whitespace fixup. 2014-09-27 09:47:23 -07:00