Summary:
Per-thread caching calls malloc, which means it doesn't work for malloc's
profiling (and also it isn't async-signal-safe, despite the documentation).
Test Plan: compiled
Reviewed By: philipp@fb.com
FB internal diff:
D1085368
@override-unit-failures
!orig_cxa_end_catch || !orig_rethrow_exception) {
abort(); // what else can we do?
}
-
- initStackTrace();
}
} // namespace
*/
int moveTop(StackTraceStack** from, StackTraceStack** to);
-/**
- * Initialize the stack tracing code.
- */
-void initStackTrace();
-
#ifdef __cplusplus
} /* extern "C" */
#endif
return out;
}
-namespace {
-
-struct Init {
- Init();
-};
-
-Init::Init() {
- // Don't use global caching -- it's slow and leads to lock contention. (And
- // it's made signal-safe using sigprocmask to block all signals while the
- // lock is being held, and sigprocmask contends on a lock inside the kernel,
- // too, ugh.)
- unw_set_caching_policy(unw_local_addr_space, UNW_CACHE_PER_THREAD);
-}
-
-Init initializer;
-
-} // namespace
-
} // namespace symbolizer
} // namespace folly