mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-15 04:38:12 +01:00
f7fe1c9a7e
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. |
||
---|---|---|
.. | ||
tdep | ||
tdep-aarch64 | ||
tdep-arm | ||
tdep-hppa | ||
tdep-ia64 | ||
tdep-mips | ||
tdep-ppc32 | ||
tdep-ppc64 | ||
tdep-sh | ||
tdep-tilegx | ||
tdep-x86 | ||
tdep-x86_64 | ||
x86 | ||
compiler.h | ||
dwarf-eh.h | ||
dwarf.h | ||
dwarf_i.h | ||
libunwind-aarch64.h | ||
libunwind-arm.h | ||
libunwind-common.h.in | ||
libunwind-coredump.h | ||
libunwind-dynamic.h | ||
libunwind-hppa.h | ||
libunwind-ia64.h | ||
libunwind-mips.h | ||
libunwind-ppc32.h | ||
libunwind-ppc64.h | ||
libunwind-ptrace.h | ||
libunwind-sh.h | ||
libunwind-tilegx.h | ||
libunwind-x86.h | ||
libunwind-x86_64.h | ||
libunwind.h.in | ||
libunwind_i.h | ||
mempool.h | ||
remote.h | ||
unwind.h |