Index: third_party/tcmalloc/chromium/src/thread_cache.cc |
diff --git a/third_party/tcmalloc/chromium/src/thread_cache.cc b/third_party/tcmalloc/chromium/src/thread_cache.cc |
index 1ad0f6d66d675011b7ec7db74a6f5b1a0afdf9b7..6818ce02c60c981644f41e6c61cbd2cd72c04da7 100644 |
--- a/third_party/tcmalloc/chromium/src/thread_cache.cc |
+++ b/third_party/tcmalloc/chromium/src/thread_cache.cc |
@@ -67,7 +67,12 @@ __thread ThreadCache* ThreadCache::threadlocal_heap_ |
// See comments in thread_cache.h about this. Bug here: |
// http://code.google.com/p/chromium/issues/detail?id=124489 |
#if defined(HAVE___ATTRIBUTE__) && !defined(PGO_GENERATE) |
+// If we are not using component build, we can further optimize it. |
+#if !defined(COMPONENT_BUILD) |
+ __attribute__ ((tls_model ("local-exec"))) |
+#else |
__attribute__ ((tls_model ("initial-exec"))) |
+#endif |
# endif |
; |
#endif |