Bug 84817 - Add a logging channel and some ouput for compositing
: Add a logging channel and some ouput for compositing
Status: RESOLVED FIXED
: WebKit
New Bugs
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-04-24 18:54 PST by
Modified: 2012-04-24 21:30 PST (History)


Attachments
Patch (18.39 KB, patch)
2012-04-24 19:02 PST, Simon Fraser (smfr)
darin: review+
buildbot: commit‑queue-
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2012-04-24 18:54:40 PST
Add a logging channel and some ouput for compositing
------- Comment #1 From 2012-04-24 19:02:03 PST -------
Created an attachment (id=138716) [details]
Patch
------- Comment #2 From 2012-04-24 19:03:11 PST -------
Sample output (maps.google.com when zooming):


Update 26 of main frame
  Layer 0x124de87d8 1280x1280 1.638MP (animation) RenderBlock (positioned) DIV
  Layer 0x123a5ad28 0x0 0.000MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x123a5b1a8 0x0 0.000MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x123a5b628 0x0 0.000MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x123a5baa8 0x0 0.000MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x123a5bf28 0x0 0.000MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x123a5c3a8 0x0 0.000MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x123a5c828 0x0 0.000MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x123a5cca8 0x0 0.000MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x1108e72b8 83x152 0.013MP (overlap/stacking) RenderBlock (positioned) DIV 'views-control'
  Layer 0x1108f2e48 19x19 0.000MP (overlap/stacking) RenderBlock (positioned) DIV 'map_overview'
  Layer 0x122431f08 390x19 0.007MP (overlap/stacking) RenderBlock (positioned) DIV 'copyright'
  Layer 0x1229401c8 43x29 0.000MP (overlap/stacking) RenderBlock (positioned) DIV 'map_magnifyingglass'
  Layer 0x1224321b8 86x29 0.002MP (overlap/stacking) RenderBlock (positioned) DIV 'scalecontrol'
  Layer 0x1211f0a88 90x339 0.031MP (overlap/stacking) RenderBlock (positioned) DIV 'lmc3d'
  Layer 0x1108caab8 838x844 0.000MP (clips compositing descendants) RenderBlock (relative positioned) DIV 'map'
  Layer 0x1108f6238 1219x1 0.001MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x1108f6c78 1219x2 0.002MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x1108f76b8 1219x3 0.004MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x1108f80f8 1219x4 0.005MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x1108f8b38 1219x5 0.006MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x1108f9a88 1x842 0.001MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x1108fa538 2x842 0.002MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x1108fafe8 3x842 0.003MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x1108fba98 4x842 0.003MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x11d6f31b8 5x842 0.004MP (overlap/stacking) RenderBlock (positioned) DIV
  Layer 0x1108b9118 381x59 0.022MP (overlap/stacking) RenderBlock (relative positioned) DIV 'topbar'
  Layer 0x11d6baa08 381x787 0.300MP (overlap/stacking) RenderBlock (positioned) DIV 'panel'
  Layer 0x1216132c8 1219x102 0.124MP (overlap/stacking) RenderBlock (relative positioned) DIV
  Layer 0x110897b38 1219x0 0.000MP (overlap/stacking) RenderBlock (relative positioned) DIV 'infoarea'
  Layer 0x11d9eacf8 1219x13944 0.000MP (root) RenderView
31 layers (3 primary, 28 secondary), total backing area 2.17MP, update took 3.74ms,
------- Comment #3 From 2012-04-24 19:27:18 PST -------
(From update of attachment 138716 [details])
Attachment 138716 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/12529386
------- Comment #4 From 2012-04-24 19:56:42 PST -------
(From update of attachment 138716 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=138716&action=review

Looks fine, but please revise so it doesn’t break the Windows build.

> Source/WebCore/platform/graphics/GraphicsLayer.h:429
> +    // Return an estimate of how much memory is used for backing store. May be incorrect for tiled layers.

Maybe this should have the word “estimate” in its name too, not just the comment.

> Source/WebCore/rendering/RenderLayerBacking.h:162
> +    double backingStoreArea() const;

Probably needs a comment, and maybe the word “estimate” in its name.

> Source/WebCore/rendering/RenderLayerCompositor.cpp:154
> +#if !LOG_DISABLED
> +    return LogCompositing.state == WTFLogChannelOn;
> +#endif
> +    return false;

Should use #else here. I suspect this may be why the Windows build is failing.

> Source/WebCore/rendering/RenderLayerCompositor.cpp:374
> +        startTime = WTF::currentTime();

I’m surprised the WTF:: prefix is needed here.

> Source/WebCore/rendering/RenderLayerCompositor.cpp:439
> +#if !LOG_DISABLED
> +void RenderLayerCompositor::logCompositingInfo(const RenderLayer* layer)

One neat trick is to always compile logCompositingInfo but make it an inline function that does nothing in when LOG_DISABLED is set. This eliminates the need for #if at the call sites.
------- Comment #5 From 2012-04-24 21:27:10 PST -------
(In reply to comment #4)
> One neat trick is to always compile logCompositingInfo but make it an inline function that does nothing in when LOG_DISABLED is set. This eliminates the need for #if at the call sites.

That would require moving compositingLogEnabled() to the header, which I don't really want to do.
------- Comment #6 From 2012-04-24 21:30:43 PST -------
http://trac.webkit.org/changeset/115165