Bug 92259 - Web Inspector: add memory reporting routine to StyleResolver
Summary: Web Inspector: add memory reporting routine to StyleResolver
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: 87262
  Show dependency treegraph
 
Reported: 2012-07-25 08:38 PDT by Yury Semikhatsky
Modified: 2012-07-26 03:42 PDT (History)
15 users (show)

See Also:


Attachments
Patch (12.09 KB, patch)
2012-07-25 08:47 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (12.12 KB, patch)
2012-07-25 09:39 PDT, Yury Semikhatsky
no flags 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-07-25 08:38:47 PDT
Memory consumed by StyleResolver should be accounted as part of the CSS component.
Comment 1 Yury Semikhatsky 2012-07-25 08:47:34 PDT
Created attachment 154369 [details]
Patch
Comment 2 Early Warning System Bot 2012-07-25 09:28:08 PDT
Comment on attachment 154369 [details]
Patch

Attachment 154369 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/13348275
Comment 3 Yury Semikhatsky 2012-07-25 09:39:09 PDT
Created attachment 154374 [details]
Patch
Comment 4 Ilya Tikhonovsky 2012-07-25 09:54:02 PDT
Comment on attachment 154374 [details]
Patch

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

> Source/WebCore/css/StyleResolver.cpp:2516
> +        info->addInstrumentedVector(*it->second);

I'd expect that you report the key too.

> Source/WebCore/css/StyleResolver.cpp:5659
> +    // FIXME: move this to a place where it would be called only once?
> +    info.addInstrumentedMember(defaultStyle);
> +    info.addInstrumentedMember(defaultQuirksStyle);
> +    info.addInstrumentedMember(defaultPrintStyle);
> +    info.addInstrumentedMember(defaultViewSourceStyle);

What about other statics

static StyleSheetContents* simpleDefaultStyleSheet;
static StyleSheetContents* defaultStyleSheet;
static StyleSheetContents* quirksStyleSheet;
static StyleSheetContents* svgStyleSheet;
static StyleSheetContents* mathMLStyleSheet;
static StyleSheetContents* mediaControlsStyleSheet;
static StyleSheetContents* fullscreenStyleSheet;
Comment 5 Yury Semikhatsky 2012-07-25 10:17:19 PDT
(In reply to comment #4)
> (From update of attachment 154374 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=154374&action=review
> 
> What about other statics
> 
> static StyleSheetContents* simpleDefaultStyleSheet;
> static StyleSheetContents* defaultStyleSheet;
> static StyleSheetContents* quirksStyleSheet;
> static StyleSheetContents* svgStyleSheet;
> static StyleSheetContents* mathMLStyleSheet;
> static StyleSheetContents* mediaControlsStyleSheet;
> static StyleSheetContents* fullscreenStyleSheet;

StyleSheetContents is not instrumented yet. I'm going to take care of it in another patch.
Comment 6 Ilya Tikhonovsky 2012-07-26 01:18:48 PDT
Comment on attachment 154374 [details]
Patch

lgtm
Comment 7 WebKit Review Bot 2012-07-26 03:42:49 PDT
Comment on attachment 154374 [details]
Patch

Clearing flags on attachment: 154374

Committed r123726: <http://trac.webkit.org/changeset/123726>
Comment 8 WebKit Review Bot 2012-07-26 03:42:55 PDT
All reviewed patches have been landed.  Closing bug.