Bug 206401 - [JSC] Eagerly purging JIT code when VM::deleteAllCode is executed
Summary: [JSC] Eagerly purging JIT code when VM::deleteAllCode is executed
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-17 00:02 PST by Yusuke Suzuki
Modified: 2020-01-17 00:37 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2020-01-17 00:02:43 PST
Is it worth trying?
Comment 1 Saam Barati 2020-01-17 00:08:49 PST
What do you mean by purging?
Comment 2 Yusuke Suzuki 2020-01-17 00:09:36 PST
(In reply to Saam Barati from comment #1)
> What do you mean by purging?

Destroying JITData / Baseline JIT code eagerly before collection and incremental sweeping happens.
Comment 3 Saam Barati 2020-01-17 00:11:35 PST
(In reply to Yusuke Suzuki from comment #2)
> (In reply to Saam Barati from comment #1)
> > What do you mean by purging?
> 
> Destroying JITData / Baseline JIT code eagerly before collection and
> incremental sweeping happens.

Sounds reasonable
Comment 4 Saam Barati 2020-01-17 00:12:17 PST
Why do we need to do it before collection? Maybe we can make it hook into the baseline throw away code I’m going to write?
Comment 5 Yusuke Suzuki 2020-01-17 00:37:40 PST
(In reply to Saam Barati from comment #4)
> Why do we need to do it before collection? Maybe we can make it hook into
> the baseline throw away code I’m going to write?

To quickly shrink the heap if memory-warning is emitted (memory-warning is emitted, then we should shrink size quickly. We are destroying code a bit indirectly, which means, clearing reference, and scheduling a GC. But we can gain memory more directly without waiting later GC & incremental sweeping.)