Bug 93130

Summary: Web Inspector: add memory instrumentation for CSSValue and its descendants
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: Web Inspector (Deprecated)Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: alph, apavlov, bweinstein, cmarcelo, eric.carlson, feature-media-reviews, gustavo, joepeck, keishi, koivisto, loislo, macpherson, menard, pfeldman, philn, pmuellr, rik, timothy, webkit.review.bot, xan.lopez, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 92748    
Bug Blocks: 87262    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch pfeldman: review+

Description Yury Semikhatsky 2012-08-03 09:21:18 PDT
It is the next step required for reporting memory footprint for CSSStyleSheet and related objects.
Comment 1 Yury Semikhatsky 2012-08-03 09:32:53 PDT
Created attachment 156398 [details]
Patch
Comment 2 Early Warning System Bot 2012-08-03 10:04:49 PDT
Comment on attachment 156398 [details]
Patch

Attachment 156398 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/13434081
Comment 3 Build Bot 2012-08-03 10:14:43 PDT
Comment on attachment 156398 [details]
Patch

Attachment 156398 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/13423861
Comment 4 Early Warning System Bot 2012-08-03 10:43:50 PDT
Comment on attachment 156398 [details]
Patch

Attachment 156398 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/13426670
Comment 5 Build Bot 2012-08-03 14:05:03 PDT
Comment on attachment 156398 [details]
Patch

Attachment 156398 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13428711
Comment 6 Yury Semikhatsky 2012-08-06 02:12:19 PDT
Created attachment 156629 [details]
Patch
Comment 7 Yury Semikhatsky 2012-08-06 02:27:25 PDT
Created attachment 156631 [details]
Patch
Comment 8 Ilya Tikhonovsky 2012-08-06 02:44:42 PDT
Comment on attachment 156631 [details]
Patch

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

> Source/WebCore/css/CSSCrossfadeValue.cpp:147
> +    MemoryClassInfo<CSSCrossfadeValue> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
> +    info.addInstrumentedMember(m_fromValue);
> +    info.addInstrumentedMember(m_toValue);
> +    info.addInstrumentedMember(m_percentageValue);
> +    // FIXME: add instrumentation for
> +    // m_cachedFromImage
> +    // m_cachedToImage
> +    // m_generatedImage

looks like you missed to call CSSImageGeneratorValue::reportDescendantMemoryUsage
Comment 9 Build Bot 2012-08-06 02:59:11 PDT
Comment on attachment 156631 [details]
Patch

Attachment 156631 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/13438638
Comment 10 Yury Semikhatsky 2012-08-06 03:05:33 PDT
Created attachment 156643 [details]
Patch
Comment 11 Yury Semikhatsky 2012-08-06 03:06:14 PDT
(In reply to comment #8)
> (From update of attachment 156631 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=156631&action=review
> 
> > Source/WebCore/css/CSSCrossfadeValue.cpp:147
> > +    MemoryClassInfo<CSSCrossfadeValue> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
> > +    info.addInstrumentedMember(m_fromValue);
> > +    info.addInstrumentedMember(m_toValue);
> > +    info.addInstrumentedMember(m_percentageValue);
> > +    // FIXME: add instrumentation for
> > +    // m_cachedFromImage
> > +    // m_cachedToImage
> > +    // m_generatedImage
> 
> looks like you missed to call CSSImageGeneratorValue::reportDescendantMemoryUsage

Added CSSImageGeneratorValue::reportBaseClassMemoryUsage call
Comment 12 Ilya Tikhonovsky 2012-08-06 04:30:13 PDT
Comment on attachment 156643 [details]
Patch

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

> Source/WebCore/css/CSSCursorImageValue.cpp:139
> +    MemoryClassInfo<CSSCursorImageValue> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
> +#if ENABLE(SVG)

CSSImageValue::reportBaseClassMemoryUsage ?
Comment 13 Yury Semikhatsky 2012-08-06 04:37:29 PDT
(In reply to comment #11)
> (In reply to comment #8)
> > (From update of attachment 156631 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=156631&action=review
> > 
> > > Source/WebCore/css/CSSCrossfadeValue.cpp:147
> > > +    MemoryClassInfo<CSSCrossfadeValue> info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
> > > +    info.addInstrumentedMember(m_fromValue);
> > > +    info.addInstrumentedMember(m_toValue);
> > > +    info.addInstrumentedMember(m_percentageValue);
> > > +    // FIXME: add instrumentation for
> > > +    // m_cachedFromImage
> > > +    // m_cachedToImage
> > > +    // m_generatedImage
> > 
> > looks like you missed to call CSSImageGeneratorValue::reportDescendantMemoryUsage
> 
> Added CSSImageGeneratorValue::reportBaseClassMemoryUsage call

Done.
Comment 14 Yury Semikhatsky 2012-08-06 04:51:17 PDT
Created attachment 156661 [details]
Patch
Comment 15 Ilya Tikhonovsky 2012-08-06 06:25:02 PDT
lgtm
Comment 16 Yury Semikhatsky 2012-08-06 07:10:36 PDT
Committed r124768: <http://trac.webkit.org/changeset/124768>