Bug 131051

Summary: Deleting CodeBlocks should be lazy/incremental
Product: WebKit Reporter: Mark Hahnenberg <mhahnenberg>
Component: JavaScriptCoreAssignee: Mark Hahnenberg <mhahnenberg>
Status: NEW    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
work in progress
none
work in progress none

Mark Hahnenberg
Reported 2014-04-01 12:07:51 PDT
Deleting many CodeBlocks synchronously during GC can dramatically increase pause times. We should use a similar approach to JSCell sweeping instead to mitigate these costs.
Attachments
work in progress (19.59 KB, patch)
2014-04-02 17:28 PDT, Mark Hahnenberg
no flags
work in progress (32.70 KB, patch)
2014-04-03 14:07 PDT, Mark Hahnenberg
no flags
Mark Hahnenberg
Comment 1 2014-04-02 17:28:47 PDT
Created attachment 228450 [details] work in progress
Mark Hahnenberg
Comment 2 2014-04-03 14:07:31 PDT
Created attachment 228542 [details] work in progress Putting this on hold for the moment. To future me (or whomever picks this up): There's a couple of issues with this patch. (1) You need to make sure that no code assumes that m_alternative (and any other referenced CodeBlocks) is in a consistent state. For example, ProfiledCodeBlockJettisoningWatchpoint can fire after clearing the CodeBlock's m_alternative field but before the CodeBlock is fully destroyed (along with the Watchpoint itself). (2) You also need to make the ref-count of a CodeBlock and its notion of isLive is the same. deleteAllCompiledCode is a tricky thing to get right for this.
Note You need to log in before you can comment on or make changes to this bug.