Bug 100824 - Memory instrumentation: do not report memory occupied by objects referenced using client interfaces
Summary: Memory instrumentation: do not report memory occupied by objects referenced u...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-31 00:40 PDT by Yury Semikhatsky
Modified: 2012-10-31 01:36 PDT (History)
8 users (show)

See Also:


Attachments
Patch (6.32 KB, patch)
2012-10-31 00:44 PDT, Yury Semikhatsky
apavlov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2012-10-31 00:40:42 PDT
In many classes we have pointer to a client object. These references should be reported as weak pointers and the client's memory usage should be reported when the client is reached from its instrumented owner where we know exact type of the client. Otherwise we would need to add reportMemoryUsage to all client interfaces which place additional burden on the client implementers and blur the instrumentation boundaries.
Comment 1 Yury Semikhatsky 2012-10-31 00:44:54 PDT
Created attachment 171592 [details]
Patch
Comment 2 Yury Semikhatsky 2012-10-31 00:46:14 PDT
(In reply to comment #1)
> Created an attachment (id=171592) [details]
> Patch

After these change number of objects counted by the memory instrumentation that haven't been allocated on the heap using malloc drops to 0 on nytimes.com in Chromium.
Comment 3 Alexander Pavlov (apavlov) 2012-10-31 01:28:25 PDT
Comment on attachment 171592 [details]
Patch

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

> Source/WebCore/ChangeLog:12
> +        interfaces which place additional burden on the client implementers and blur

place -> places, blur -> blurs
Comment 4 Yury Semikhatsky 2012-10-31 01:35:42 PDT
(In reply to comment #3)
> (From update of attachment 171592 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=171592&action=review
> 
> > Source/WebCore/ChangeLog:12
> > +        interfaces which place additional burden on the client implementers and blur
> 
> place -> places, blur -> blurs

Done.
Comment 5 Yury Semikhatsky 2012-10-31 01:36:34 PDT
Committed r132998: <http://trac.webkit.org/changeset/132998>