Commit 99818114 authored by ap@webkit.org's avatar ap@webkit.org

Reviewed by Darin Adler.

        <rdar://problem/6474973> REGRESSION: PLT ~2% slower due to 39465 (consolidate thread data)

        I could not reproduce the slowdown on my PowerPC test machine, but the change should bring
        performance back.

        * platform/ThreadGlobalData.cpp: (WebCore::threadGlobalData): Don't use AtomicallyInitializedStatic.
        Prior to r39465, it was only used for cached converters, which was necessary because the
        first access to ICU or TEC one could happen on a secondary thread, but now they are all
        initialized from ThreadGlobalData constructor.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1a84c866
2009-01-06 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Darin Adler.
<rdar://problem/6474973> REGRESSION: PLT ~2% slower due to 39465 (consolidate thread data)
I could not reproduce the slowdown on my PowerPC test machine, but the change should bring
performance back.
* platform/ThreadGlobalData.cpp: (WebCore::threadGlobalData): Don't use AtomicallyInitializedStatic.
Prior to r39465, it was only used for cached converters, which was necessary because the
first access to ICU or TEC one could happen on a secondary thread, but now they are all
initialized from ThreadGlobalData constructor.
2009-01-06 David Smith <catfish.man@gmail.com>
Reviewed by Darin Adler.
......@@ -52,7 +52,8 @@ ThreadGlobalData& threadGlobalData()
// FIXME: Workers are not necessarily the only feature that make per-thread global data necessary.
// We need to check for e.g. database objects manipulating strings on secondary threads.
#if ENABLE(WORKERS)
AtomicallyInitializedStatic(ThreadSpecific<ThreadGlobalData>*, threadGlobalData = new ThreadSpecific<ThreadGlobalData>);
// ThreadGlobalData is used on main thread before it could possibly be used on secondary ones, so there is no need for synchronization here.
static ThreadSpecific<ThreadGlobalData>* threadGlobalData = new ThreadSpecific<ThreadGlobalData>;
return **threadGlobalData;
#else
static ThreadGlobalData* staticData;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment