Changeset 37901 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 27, 2008, 1:37:08 PM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r37894 r37901 1 2008-10-27 Geoffrey Garen <[email protected]> 2 3 Reviewed by Sam Weinig. 4 5 Added a mutex around the SamplingTool's ScopeNode* map, to solve a crash 6 when sampling the v8 tests. 7 8 * VM/SamplingTool.cpp: 9 (JSC::SamplingTool::run): 10 (JSC::SamplingTool::notifyOfScope): 11 * VM/SamplingTool.h: Since new ScopeNodes can be created after 12 the SamplingTools has begun sampling, reads and writes to / from the 13 map need to be synchronized. Shark says this doesn't measurably increase 14 sampling overhead. 15 1 16 2008-10-25 Geoffrey Garen <[email protected]> 2 17 -
trunk/JavaScriptCore/VM/SamplingTool.cpp
r37891 r37901 103 103 104 104 #if ENABLE(CODEBLOCK_SAMPLING) 105 MutexLocker locker(m_scopeSampleMapMutex); 105 106 ScopeSampleRecord* record = m_scopeSampleMap->get(sample.codeBlock()->ownerNode); 106 107 ASSERT(record); … … 118 119 void SamplingTool::notifyOfScope(ScopeNode* scope) 119 120 { 121 MutexLocker locker(m_scopeSampleMapMutex); 120 122 m_scopeSampleMap->set(scope, new ScopeSampleRecord(scope)); 121 123 } -
trunk/JavaScriptCore/VM/SamplingTool.h
r37893 r37901 203 203 unsigned m_opcodeSamples[numOpcodeIDs]; 204 204 unsigned m_opcodeSamplesInCTIFunctions[numOpcodeIDs]; 205 206 Mutex m_scopeSampleMapMutex; 205 207 OwnPtr<ScopeSampleRecordMap> m_scopeSampleMap; 206 208 };
Note:
See TracChangeset
for help on using the changeset viewer.