diff options
author | Aliaksey Kandratsenka <alkondratenko@gmail.com> | 2021-02-14 21:37:20 -0800 |
---|---|---|
committer | Aliaksey Kandratsenka <alkondratenko@gmail.com> | 2021-02-14 22:12:47 -0800 |
commit | 37087ec5360e821627155d3129f9b55a321a0001 (patch) | |
tree | b2408c3db6dd2644ba8fcd32b054ccd9af852408 | |
parent | f4aa2a435eed63fc047448635f705a9c6037bd97 (diff) | |
download | gperftools-37087ec5360e821627155d3129f9b55a321a0001.tar.gz |
prefer libunwind on x86-64 even with -fno-omit-frame-pointer
Libunwind is mostly safe on x86-64 and most of OS (e.g. libc) is
compiled without frame pointers anyways. Even when libc is built with
frame pointers, various libc asm routines (e.g. memcpy) are not. And
even for code built with frame pointers we actually sometimes get
SIGPROF inside function prologues, before frame pointer is
established. Which then causes imperfect backtraces.
Libunwind should handle this all (when it doesn't crash or deadlock).
-rw-r--r-- | src/stacktrace.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stacktrace.cc b/src/stacktrace.cc index ab1c381..140dff1 100644 --- a/src/stacktrace.cc +++ b/src/stacktrace.cc @@ -219,7 +219,7 @@ static GetStackImplementation *all_impls[] = { // ppc and i386 implementations prefer arch-specific asm implementations. // arm's asm implementation is broken -#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__PPC__) +#if defined(__i386__) || defined(__ppc__) || defined(__PPC__) #if !defined(NO_FRAME_POINTER) #define TCMALLOC_DONT_PREFER_LIBUNWIND #endif |