Commit 3952281c authored by Tudor Bosman's avatar Tudor Bosman Committed by Jordan DeLong

Revert "Change exception tracer to use per-thread caching in libunwind"

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
parent 730a0da8
......@@ -81,8 +81,6 @@ void initialize() {
!orig_cxa_end_catch || !orig_rethrow_exception) {
abort(); // what else can we do?
}
initStackTrace();
}
} // namespace
......
......@@ -75,11 +75,6 @@ void clearStack(StackTraceStack** head);
*/
int moveTop(StackTraceStack** from, StackTraceStack** to);
/**
* Initialize the stack tracing code.
*/
void initStackTrace();
#ifdef __cplusplus
} /* extern "C" */
#endif
......
......@@ -403,23 +403,5 @@ std::ostream& operator<<(std::ostream& out, const FrameInfo& ainfo) {
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment