From: Tudor Bosman Date: Tue, 3 Dec 2013 21:09:13 +0000 (-0800) Subject: Change exception tracer to use per-thread caching in libunwind X-Git-Tag: v0.22.0~775 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ec61097ac903e471c1440b3c09818d8a1748de6d;p=folly.git Change exception tracer to use per-thread caching in libunwind Summary: Because the global cache is slow and contends on locks. Test Plan: testinproduction Reviewed By: philipp@fb.com FB internal diff: D1081259 --- diff --git a/folly/experimental/exception_tracer/ExceptionTracerLib.cpp b/folly/experimental/exception_tracer/ExceptionTracerLib.cpp index eab33fd3..3813c6ad 100644 --- a/folly/experimental/exception_tracer/ExceptionTracerLib.cpp +++ b/folly/experimental/exception_tracer/ExceptionTracerLib.cpp @@ -81,6 +81,8 @@ void initialize() { !orig_cxa_end_catch || !orig_rethrow_exception) { abort(); // what else can we do? } + + initStackTrace(); } } // namespace diff --git a/folly/experimental/exception_tracer/StackTrace.h b/folly/experimental/exception_tracer/StackTrace.h index 6b2ab3c7..b7354498 100644 --- a/folly/experimental/exception_tracer/StackTrace.h +++ b/folly/experimental/exception_tracer/StackTrace.h @@ -75,6 +75,11 @@ void clearStack(StackTraceStack** head); */ int moveTop(StackTraceStack** from, StackTraceStack** to); +/** + * Initialize the stack tracing code. + */ +void initStackTrace(); + #ifdef __cplusplus } /* extern "C" */ #endif