Bug 142593

Summary: Many users of Heap::reportExtraMemory* are wrong, causing lots of memory growth
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: WebKit Misc.Assignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, fpizlo, kling, mhahnenb
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 142457    
Attachments:
Description Flags
Patch kling: review+

Description Geoffrey Garen 2015-03-11 14:14:00 PDT
These users are wrong:

JSReportExtraMemoryCost
SparseArrayValueMap
JSDocument
JSImageData
JSNodeList
collectionindex
canvas
imageloader
mediaelement
sourcebuffer
xmlhttprequest

They only report cost upon allocation, not upon visit. This can cause lots of memory growth, since it makes the heap thing that eden collection is constantly succeeding in reclaiming huge amounts of memory.
Comment 1 Geoffrey Garen 2015-03-11 15:03:23 PDT
Created attachment 248455 [details]
Patch
Comment 2 Andreas Kling 2015-03-11 15:25:15 PDT
Comment on attachment 248455 [details]
Patch

r=me
Comment 3 Geoffrey Garen 2015-03-11 15:32:47 PDT
Committed r181411: <http://trac.webkit.org/changeset/181411>