Ignore:
Timestamp:
Jul 5, 2011, 4:55:45 PM (14 years ago)
Author:
[email protected]
Message:

2011-07-05 Oliver Hunt <[email protected]>

Don't throw out compiled code repeatedly
https://bugs.webkit.org/show_bug.cgi?id=63960

Reviewed by Gavin Barraclough.

Stop throwing away all compiled code every time
we're told to do a full GC. Instead unlink all
callsites during such GC passes to maximise the
number of collectable functions, but otherwise
leave compiled functions alone.

  • API/JSBase.cpp: (JSGarbageCollect):
  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::visitAggregate):
  • heap/Heap.cpp: (JSC::Heap::collectAllGarbage):
  • heap/MarkStack.h: (JSC::MarkStack::shouldUnlinkCalls): (JSC::MarkStack::setShouldUnlinkCalls):
  • runtime/JSGlobalData.cpp: (JSC::JSGlobalData::recompileAllJSFunctions): (JSC::JSGlobalData::releaseExecutableMemory):
  • runtime/RegExp.cpp: (JSC::RegExp::compile): (JSC::RegExp::invalidateCode):
  • runtime/RegExp.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSBase.cpp

    r58115 r90415  
    9898
    9999    JSGlobalData& globalData = exec->globalData();
    100     if (!globalData.heap.isBusy())
    101         globalData.heap.collectAllGarbage();
     100    if (!globalData.heap.isBusy()) {
     101        // releaseExecutableMemory forces a full GC
     102        globalData.releaseExecutableMemory();
     103    }
    102104
    103105    // FIXME: Perhaps we should trigger a second mark and sweep
Note: See TracChangeset for help on using the changeset viewer.