From 1334cae32430fe4544f776769d64b8ae1cdbb47b Mon Sep 17 00:00:00 2001 From: "hp.com!davidm" Date: Thu, 4 Dec 2003 07:30:39 +0000 Subject: [PATCH] (HAVE___THREAD): Force it off for now---the per-thread cache uses about 128KB of thread-local storage for each and every thread, even if a thread never ever needs to unwind its stack. Seems a bit much. (ALWAYS_INLINE): New macro which can be used to force inlining on compilers that support it. (Logical change 1.132) --- include/internal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/internal.h b/include/internal.h index ffba2b08..ac5b0bf2 100644 --- a/include/internal.h +++ b/include/internal.h @@ -30,6 +30,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ # include "config.h" #endif +#ifdef HAVE___THREAD + /* For now, turn off per-thread caching. It uses up too much TLS + memory per thread even when the thread never uses libunwind at + all. */ +# undef HAVE___THREAD +#endif + /* Platform-independent libunwind-internal declarations. */ #include /* HP-UX needs this before include of pthread.h */ @@ -54,8 +61,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef __GNUC__ # define UNUSED __attribute__((unused)) # if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 2) +# define ALWAYS_INLINE __attribute__((always_inline)) # define HIDDEN __attribute__((visibility ("hidden"))) # else +# define ALWAYS_INLINE # define HIDDEN # endif # if (__GNUC__ >= 3) @@ -66,6 +75,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ # define unlikely(x) (x) # endif #else +# define ALWAYS_INLINE # define UNUSED # define HIDDEN # define likely(x) (x)