Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: third_party/tcmalloc/chromium/src/thread_cache.h

Issue 10035012: Added compile-time define to add "initial-exec" attribute. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed .h/.cc issue. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/tcmalloc/chromium/src/thread_cache.h
diff --git a/third_party/tcmalloc/chromium/src/thread_cache.h b/third_party/tcmalloc/chromium/src/thread_cache.h
index 529402908450e9efb3f06708cdbd6dbecc7c7236..221cacb8eb34b292c92b47d416a588a5b8fd019d 100644
--- a/third_party/tcmalloc/chromium/src/thread_cache.h
+++ b/third_party/tcmalloc/chromium/src/thread_cache.h
@@ -259,7 +259,16 @@ class ThreadCache {
// a good tradeoff for us.
#ifdef HAVE_TLS
static __thread ThreadCache* threadlocal_heap_
-# ifdef HAVE___ATTRIBUTE__
+ // This code links against pyautolib.so, which causes dlopen() on that shared
+ // object to fail when -fprofile-generate is used with it. Ideally
+ // pyautolib.so should not link against this code. There is a bug filed for
+ // that:
+ // http://code.google.com/p/chromium/issues/detail?id=124489
+ // For now the workaround is to pass in -DPGO_GENERATE when building Chrome
+ // for instrumentation (-fprofile-generate).
+ // For all non-instrumentation builds, this define will not be set and the
+ // performance benefit of "intial-exec" will be achieved.
+#if defined(HAVE___ATTRIBUTE__) && !defined(PGO_GENERATE)
__attribute__ ((tls_model ("initial-exec")))
# endif
;
« no previous file with comments | « no previous file | third_party/tcmalloc/chromium/src/thread_cache.cc » ('j') | third_party/tcmalloc/chromium/src/thread_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698