Changeset 95512 in webkit
- Timestamp:
- Sep 19, 2011, 9:05:28 PM (14 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r95511 r95512 1 2011-09-19 Geoffrey Garen <ggaren@apple.com> 2 3 Removed ENABLE_LAZY_BLOCK_FREEING and related #ifdefs 4 https://bugs.webkit.org/show_bug.cgi?id=68424 5 6 As discussed on webkit-dev. All ports build with threads enabled in JSC now. 7 8 This may break WinCE and other ports that have not built and tested with 9 this configuration. I've filed bugs for port maintainers. It's time for 10 WebKit to move forward. 11 12 Reviewed by Mark Rowe. 13 14 * heap/Heap.cpp: 15 (JSC::Heap::Heap): 16 (JSC::Heap::~Heap): 17 (JSC::Heap::destroy): 18 (JSC::Heap::blockFreeingThreadMain): 19 (JSC::Heap::allocateBlock): 20 (JSC::Heap::freeBlocks): 21 (JSC::Heap::releaseFreeBlocks): 22 * heap/Heap.h: 23 * wtf/Platform.h: 24 1 25 2011-09-19 Geoffrey Garen <ggaren@apple.com> 2 26 -
trunk/Source/JavaScriptCore/heap/Heap.cpp
r95507 r95512 262 262 m_markedSpace.setHighWaterMark(m_minBytesPerCycle); 263 263 (*m_activityCallback)(); 264 #if ENABLE(LAZY_BLOCK_FREEING)265 264 m_numberOfFreeBlocks = 0; 266 265 m_blockFreeingThread = createThread(blockFreeingThreadStartFunc, this, "JavaScriptCore::BlockFree"); 267 266 ASSERT(m_blockFreeingThread); 268 #endif269 267 } 270 268 271 269 Heap::~Heap() 272 270 { 273 #if ENABLE(LAZY_BLOCK_FREEING)274 271 // destroy our thread 275 272 { … … 279 276 } 280 277 waitForThreadCompletion(m_blockFreeingThread, 0); 281 #endif282 278 283 279 // The destroy function must already have been called, so assert this. … … 318 314 #endif 319 315 320 #if ENABLE(LAZY_BLOCK_FREEING)321 316 releaseFreeBlocks(); 322 #endif323 317 324 318 m_globalData = 0; 325 319 } 326 320 327 #if ENABLE(LAZY_BLOCK_FREEING)328 321 void Heap::waitForRelativeTimeWhileHoldingLock(double relative) 329 322 { … … 387 380 } 388 381 } 389 #endif // ENABLE(LAZY_BLOCK_FREEING)390 382 391 383 void Heap::reportExtraMemoryCostSlowCase(size_t cost) … … 737 729 MarkedBlock* block; 738 730 739 #if !ENABLE(LAZY_BLOCK_FREEING)740 if (allocationEffort == AllocationCanFail)741 return 0;742 743 block = MarkedBlock::create(this, cellSize);744 #else745 731 { 746 732 MutexLocker locker(m_freeBlockLock); … … 758 744 else 759 745 block = MarkedBlock::create(this, cellSize); 760 #endif761 746 762 747 m_blocks.add(block); … … 773 758 m_blocks.remove(block); 774 759 block->reset(); 775 #if !ENABLE(LAZY_BLOCK_FREEING)776 MarkedBlock::destroy(block);777 #else778 760 MutexLocker locker(m_freeBlockLock); 779 761 m_freeBlocks.append(block); 780 762 m_numberOfFreeBlocks++; 781 #endif782 763 } 783 764 } … … 790 771 } 791 772 792 #if ENABLE(LAZY_BLOCK_FREEING)793 773 void Heap::releaseFreeBlocks() 794 774 { … … 812 792 } 813 793 } 814 #endif815 794 816 795 #if ENABLE(GGC) -
trunk/Source/JavaScriptCore/heap/Heap.h
r95507 r95512 165 165 static void writeBarrierSlowCase(const JSCell*, JSCell*); 166 166 167 #if ENABLE(LAZY_BLOCK_FREEING)168 167 void waitForRelativeTimeWhileHoldingLock(double relative); 169 168 void waitForRelativeTime(double relative); 170 169 void blockFreeingThreadMain(); 171 170 static void* blockFreeingThreadStartFunc(void* heap); 172 #endif173 171 174 172 const HeapSize m_heapSize; … … 179 177 MarkedBlockSet m_blocks; 180 178 181 #if ENABLE(LAZY_BLOCK_FREEING)182 179 DoublyLinkedList<MarkedBlock> m_freeBlocks; 183 180 size_t m_numberOfFreeBlocks; … … 187 184 ThreadCondition m_freeBlockCondition; 188 185 bool m_blockFreeingThreadShouldQuit; 189 #endif190 186 191 187 #if ENABLE(SIMPLE_HEAP_PROFILING) -
trunk/Source/JavaScriptCore/wtf/Platform.h
r95511 r95512 1036 1036 #endif 1037 1037 1038 #if !defined(ENABLE_LAZY_BLOCK_FREEING)1039 #define ENABLE_LAZY_BLOCK_FREEING 11040 #endif1041 1042 1038 #ifndef ENABLE_LARGE_HEAP 1043 1039 #if CPU(X86) || CPU(X86_64)
Note:
See TracChangeset
for help on using the changeset viewer.