Bug 85543 - Heap::reportAbandonedObjectGraph should not hasten an allocation-triggered collection
Summary: Heap::reportAbandonedObjectGraph should not hasten an allocation-triggered co...
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-05-03 14:16 PDT by Mark Hahnenberg
Modified: 2012-05-08 09:25 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.11 KB, patch)
2012-05-03 14:52 PDT, Mark Hahnenberg
fpizlo: 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-05-03 14:16:48 PDT
Currently reportAbandonedObjectGraph causes the Heap to think it is closer to its allocation limit for the current cycle, thus hastening an allocation-triggered collection. In reality, it should just affect the opportunistic GC timer. We should track the bytes we think have been abandoned and the bytes that have been allocated separately.
Comment 1 Mark Hahnenberg 2012-05-03 14:52:32 PDT
Created attachment 140098 [details]
Patch
Comment 2 Mark Hahnenberg 2012-05-03 15:30:57 PDT
Committed r116025: <http://trac.webkit.org/changeset/116025>
Comment 3 Mark Hahnenberg 2012-05-03 15:37:18 PDT
<rdar://problem/11377509>
Comment 4 Geoffrey Garen 2012-05-08 09:25:38 PDT
Comment on attachment 140098 [details]
Patch

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

> Source/JavaScriptCore/heap/Heap.cpp:795
> +        m_bytesAbandoned = 0;

Why do you only reset m_bytesAbandoned to 0 during a forced sweep? Even without a forced sweep, a normal GC, followed by allocation, will reclaim / recycle abandoned bytes.