mirror of
https://github.com/gperftools/gperftools
synced 2025-01-18 04:41:34 +00:00
mark stacktrace capturing functions as noinline
It is required for LTO builds, specifically it fixes stacktrace_unittest. This is because API of stacktrace capturing functions implicitly assumes that those are not inlined. Refers to github issue #1358.
This commit is contained in:
parent
777182fbdf
commit
6bdeec0ecb
@ -294,6 +294,7 @@ namespace {
|
||||
};
|
||||
}
|
||||
|
||||
ATTRIBUTE_NOINLINE
|
||||
PERFTOOLS_DLL_DECL int GetStackFrames(void** result, int* sizes, int max_depth,
|
||||
int skip_count) {
|
||||
StacktraceScope scope;
|
||||
@ -304,6 +305,7 @@ PERFTOOLS_DLL_DECL int GetStackFrames(void** result, int* sizes, int max_depth,
|
||||
return frame_forcer(get_stack_impl->GetStackFramesPtr(result, sizes, max_depth, skip_count));
|
||||
}
|
||||
|
||||
ATTRIBUTE_NOINLINE
|
||||
PERFTOOLS_DLL_DECL int GetStackFramesWithContext(void** result, int* sizes, int max_depth,
|
||||
int skip_count, const void *uc) {
|
||||
StacktraceScope scope;
|
||||
@ -316,6 +318,7 @@ PERFTOOLS_DLL_DECL int GetStackFramesWithContext(void** result, int* sizes, int
|
||||
skip_count, uc));
|
||||
}
|
||||
|
||||
ATTRIBUTE_NOINLINE
|
||||
PERFTOOLS_DLL_DECL int GetStackTrace(void** result, int max_depth,
|
||||
int skip_count) {
|
||||
StacktraceScope scope;
|
||||
@ -326,6 +329,7 @@ PERFTOOLS_DLL_DECL int GetStackTrace(void** result, int max_depth,
|
||||
return frame_forcer(get_stack_impl->GetStackTracePtr(result, max_depth, skip_count));
|
||||
}
|
||||
|
||||
ATTRIBUTE_NOINLINE
|
||||
PERFTOOLS_DLL_DECL int GetStackTraceWithContext(void** result, int max_depth,
|
||||
int skip_count, const void *uc) {
|
||||
StacktraceScope scope;
|
||||
|
Loading…
Reference in New Issue
Block a user