Bug 84477 - Heap should cancel GC timer at the start of the collection
Summary: Heap should cancel GC timer at the start of the collection
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-20 12:20 PDT by Mark Hahnenberg
Modified: 2012-04-20 12:55 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.33 KB, patch)
2012-04-20 12:47 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff
Patch (5.04 KB, patch)
2012-04-20 12:53 PDT, Mark Hahnenberg
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2012-04-20 12:20:04 PDT
Currently the Heap cancels the GC timer at the conclusion of a collection. We should change this to be at the beginning because something (e.g. a finalizer) could call didAbandonObjectGraph(), which will schedule the timer, but then we'll immediately unschedule the timer at the conclusion of the collection, thus potentially preventing large swaths of memory from being reclaimed in a timely manner.
Comment 1 Mark Hahnenberg 2012-04-20 12:47:48 PDT
Created attachment 138146 [details]
Patch
Comment 2 Geoffrey Garen 2012-04-20 12:49:28 PDT
Comment on attachment 138146 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=138146&action=review

> Source/JavaScriptCore/API/JSBase.cpp:104
>      if (!globalData.heap.isBusy())

We want to allow this during GC finalizers!
Comment 3 Mark Hahnenberg 2012-04-20 12:53:05 PDT
Created attachment 138147 [details]
Patch
Comment 4 Geoffrey Garen 2012-04-20 12:53:44 PDT
Comment on attachment 138147 [details]
Patch

r=me
Comment 5 Mark Hahnenberg 2012-04-20 12:55:39 PDT
Committed r114772: <http://trac.webkit.org/changeset/114772>