diff options
Diffstat (limited to 'Source/JavaScriptCore/profiler/ProfilerDatabase.cpp')
| -rw-r--r-- | Source/JavaScriptCore/profiler/ProfilerDatabase.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp b/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp index fc952c0c2..f83652dda 100644 --- a/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp +++ b/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp @@ -29,13 +29,13 @@ #include "CodeBlock.h" #include "JSONObject.h" #include "ObjectConstructor.h" -#include "JSCInlines.h" +#include "Operations.h" namespace JSC { namespace Profiler { static std::atomic<int> databaseCounter; -static StaticLock registrationLock; +static SpinLock registrationLock = SPINLOCK_INITIALIZER; static std::atomic<int> didRegisterAtExit; static Database* firstDatabase; @@ -57,7 +57,7 @@ Database::~Database() Bytecodes* Database::ensureBytecodesFor(CodeBlock* codeBlock) { - LockHolder locker(m_lock); + Locker locker(m_lock); codeBlock = codeBlock->baselineVersion(); @@ -75,7 +75,7 @@ Bytecodes* Database::ensureBytecodesFor(CodeBlock* codeBlock) void Database::notifyDestruction(CodeBlock* codeBlock) { - LockHolder locker(m_lock); + Locker locker(m_lock); m_bytecodesMap.remove(codeBlock); } @@ -138,14 +138,14 @@ void Database::addDatabaseToAtExit() if (++didRegisterAtExit == 1) atexit(atExitCallback); - LockHolder holder(registrationLock); + TCMalloc_SpinLockHolder holder(®istrationLock); m_nextRegisteredDatabase = firstDatabase; firstDatabase = this; } void Database::removeDatabaseFromAtExit() { - LockHolder holder(registrationLock); + TCMalloc_SpinLockHolder holder(®istrationLock); for (Database** current = &firstDatabase; *current; current = &(*current)->m_nextRegisteredDatabase) { if (*current != this) continue; @@ -163,7 +163,7 @@ void Database::performAtExitSave() const Database* Database::removeFirstAtExitDatabase() { - LockHolder holder(registrationLock); + TCMalloc_SpinLockHolder holder(®istrationLock); Database* result = firstDatabase; if (result) { firstDatabase = result->m_nextRegisteredDatabase; |
