Bug 148047 - Allow the garbage collector to clear code while compilation is in flight
Summary: Allow the garbage collector to clear code while compilation is in flight
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-14 16:57 PDT by Geoffrey Garen
Modified: 2015-08-19 18:12 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.03 KB, patch)
2015-08-14 17:00 PDT, Geoffrey Garen
ggaren: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2015-08-14 16:57:29 PDT
Allow the garbage collector to clear code while compilation is in flight
Comment 1 Geoffrey Garen 2015-08-14 17:00:16 PDT
Created attachment 259058 [details]
Patch
Comment 2 Geoffrey Garen 2015-08-14 17:03:46 PDT
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 3 Saam Barati 2015-08-18 13:53:51 PDT
Comment on attachment 259058 [details]
Patch

r=me
Comment 4 Geoffrey Garen 2015-08-19 18:12:16 PDT
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.