Skip to content

Commit

Permalink
Revert "Change exception tracer to use per-thread caching in libunwind"
Browse files Browse the repository at this point in the history
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: [email protected]

FB internal diff: D1085368

@override-unit-failures
  • Loading branch information
tudor authored and jdelong committed Dec 20, 2013
1 parent 730a0da commit 3952281
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
2 changes: 0 additions & 2 deletions folly/experimental/exception_tracer/ExceptionTracerLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ void initialize() {
!orig_cxa_end_catch || !orig_rethrow_exception) {
abort(); // what else can we do?
}

initStackTrace();
}

} // namespace
Expand Down
5 changes: 0 additions & 5 deletions folly/experimental/exception_tracer/StackTrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 0 additions & 18 deletions folly/experimental/symbolizer/Symbolizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3952281

Please sign in to comment.