Allow the garbage collector to clear code while compilation is in flight
Created attachment 259058 [details] Patch
Updated ChangeLog: 2015-08-14 Geoffrey Garen <ggaren@apple.com> Allow the garbage collector to clear code while compilation is in flight https://bugs.webkit.org/show_bug.cgi?id=148047 Reviewed by NOBODY (OOPS!). Anecdotal evidence shows that a burst of activity can run the GC before all compilation completes. So, our rule that GC can't clear code during compilation means that GC almost never gets an opportunity to clear code. Refine this rule to be per-executable rather than global. * dfg/DFGWorklist.cpp: (JSC::DFG::Worklist::gatherActiveCompilations): * dfg/DFGWorklist.h: Added a helper for identifying active compilations. * heap/Heap.cpp: (JSC::Heap::deleteAllCompiledCode): We can honor the rule that we don't clear while compiling by checking each executable individually.
Comment on attachment 259058 [details] Patch r=me
Comment on attachment 259058 [details] Patch This patch is wrong because it is not safe in our current design to throw away one CodeBlock if you do not throw away all CodeBlocks. Residual links through OSR exit will become stale.