summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alkondratenko@gmail.com>2021-02-14 22:36:55 -0800
committerAliaksey Kandratsenka <alkondratenko@gmail.com>2021-02-14 22:39:30 -0800
commit91ff3114492f368a651ee790c8311eb6fadf3e8e (patch)
tree30ffebebb2c3f7dcc622a977209560ea9dc7542a
parent4cf7dd0a7502849b117e15ad5eb1eb68eab4b6dc (diff)
downloadgperftools-91ff3114492f368a651ee790c8311eb6fadf3e8e.tar.gz
don't default to generic_fp without frame pointers
I.e. on x86-64 and riscv.
-rw-r--r--src/stacktrace.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stacktrace.cc b/src/stacktrace.cc
index 140dff1..2a2c648 100644
--- a/src/stacktrace.cc
+++ b/src/stacktrace.cc
@@ -231,7 +231,9 @@ static bool get_stack_impl_inited;
static GetStackImplementation *get_stack_impl = &impl__instrument;
#elif defined(HAVE_GST_win32)
static GetStackImplementation *get_stack_impl = &impl__win32;
-#elif defined(HAVE_GST_generic_fp) && (!defined(HAVE_GST_libunwind) || defined(TCMALLOC_DONT_PREFER_LIBUNWIND))
+#elif defined(HAVE_GST_generic_fp) && !defined(NO_FRAME_POINTER) \
+ && !defined(__riscv) \
+ && (!defined(HAVE_GST_libunwind) || defined(TCMALLOC_DONT_PREFER_LIBUNWIND))
static GetStackImplementation *get_stack_impl = &impl__generic_fp;
#elif defined(HAVE_GST_x86) && defined(TCMALLOC_DONT_PREFER_LIBUNWIND)
static GetStackImplementation *get_stack_impl = &impl__x86;