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. |
||
---|---|---|
.. | ||
dwarf-config.h | ||
jmpbuf.h | ||
libunwind_i.h |