RESOLVED FIXED Bug 81431
[chromium] Allow us to disable overdraw metrics when tracing is off
https://bugs.webkit.org/show_bug.cgi?id=81431
Summary [chromium] Allow us to disable overdraw metrics when tracing is off
Dana Jansens
Reported 2012-03-16 17:06:31 PDT
[chromium] Throttle overdraw metrics
Attachments
Patch (29.38 KB, patch)
2012-03-16 17:16 PDT, Dana Jansens
no flags
Patch (30.50 KB, patch)
2012-03-16 17:23 PDT, Dana Jansens
no flags
Patch (16.18 KB, patch)
2012-03-16 19:18 PDT, Dana Jansens
no flags
Patch (16.32 KB, patch)
2012-03-20 11:16 PDT, Dana Jansens
no flags
Patch (16.29 KB, patch)
2012-03-20 13:02 PDT, Dana Jansens
no flags
Dana Jansens
Comment 1 2012-03-16 17:16:19 PDT
Dana Jansens
Comment 2 2012-03-16 17:23:48 PDT
Created attachment 132423 [details] Patch - Need to override the overdraw metrics for the TiledLayerChromiumTest's TestCCOcclusionTracker
James Robinson
Comment 3 2012-03-16 17:33:58 PDT
What is the perf delta from this?
James Robinson
Comment 4 2012-03-16 17:57:44 PDT
Comment on attachment 132423 [details] Patch This seems like crazy overkill. There are only two callers to overdrawMetrics - TiledLayerChromium and CCQuadCuller. Just keep a counter in CCQuadCuller as a static local and for TiledLayerChromium stash a frame # somewhere and key off of that. This should not be a 30kb+ patch that touches tons of files and has a whole pile of new tests.
Dana Jansens
Comment 5 2012-03-16 18:02:59 PDT
ok! (touching all the tests was avoiding holding pointers to things that were freed, there's just 1 new test)
Dana Jansens
Comment 6 2012-03-16 19:17:42 PDT
- Make the decision in CCLTH(Impl) to record the frame or not (since it also uses the metrics class). - I can test that metrics do/don't record when you tell occlusion tracker what you like. But not sure how to test that the LTH is recording metrics at the desired rate in a sane way.
Dana Jansens
Comment 7 2012-03-16 19:18:02 PDT
Dana Jansens
Comment 8 2012-03-16 19:36:06 PDT
Perf delta seems to be somewhere between 0.05ms and 0.1ms per frame out of a 16-30ms frame. So about 0.3% of a frame.
Dana Jansens
Comment 9 2012-03-18 17:08:09 PDT
Is 0.3% of the frame on each thread worth having this code? Or should we just record every frame?
Nat Duca
Comment 10 2012-03-19 12:09:58 PDT
(In reply to comment #9) > Is 0.3% of the frame on each thread worth having this code? Or should we just record every frame? What about recording every frame, but conditional to tracing being on? @jbates can help you make some code conditional on tracing being on. The idea of having histograms on this is useful but thats only useful when someone posts a patch to src/tools/histograms/histograms.xml and pings jar@ to get them activated. We should decide if we want to get from-the-field data about overdraw --- if we do, we should turn on the histogram briefly for a canary or two, then turn it off again and revert to the "only on when tracing is on."
Dana Jansens
Comment 11 2012-03-20 11:16:30 PDT
Created attachment 132859 [details] Patch This stops throttling, and record every frame. But still puts code in place to easily disable overdraw metrics when about:tracing is off in the future.
Adrienne Walker
Comment 12 2012-03-20 11:27:26 PDT
Comment on attachment 132859 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=132859&action=review > Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:279 > + bool recordMetricsForFrame = true; // FIXME: In the future, disable this when about:tracing is off. Can the future be now? Is it hard to resolve this FIXME?
Dana Jansens
Comment 13 2012-03-20 11:41:31 PDT
Comment on attachment 132859 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=132859&action=review >> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:279 >> + bool recordMetricsForFrame = true; // FIXME: In the future, disable this when about:tracing is off. > > Can the future be now? Is it hard to resolve this FIXME? We don't want it now. I think we would like to collect some histograms in the wild for a while before we flip this off. There is also no interface AIUI to check if tracing is on, but I think that won't be too bad.
Adrienne Walker
Comment 14 2012-03-20 11:52:39 PDT
(In reply to comment #13) > (From update of attachment 132859 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=132859&action=review > > >> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:279 > >> + bool recordMetricsForFrame = true; // FIXME: In the future, disable this when about:tracing is off. > > > > Can the future be now? Is it hard to resolve this FIXME? > > We don't want it now. I think we would like to collect some histograms in the wild for a while before we flip this off. > > There is also no interface AIUI to check if tracing is on, but I think that won't be too bad. Maybe I misunderstood. It sounded like Nat was saying there was some work to get histograms enabled, so I was thinking you would only turn on overdraw metrics when tracing was on for now and would force the flag to always on once the histograms were enabled.
Dana Jansens
Comment 15 2012-03-20 11:58:21 PDT
Comment on attachment 132859 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=132859&action=review >>>> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:279 >>>> + bool recordMetricsForFrame = true; // FIXME: In the future, disable this when about:tracing is off. >>> >>> Can the future be now? Is it hard to resolve this FIXME? >> >> We don't want it now. I think we would like to collect some histograms in the wild for a while before we flip this off. >> >> There is also no interface AIUI to check if tracing is on, but I think that won't be too bad. > > Maybe I misunderstood. It sounded like Nat was saying there was some work to get histograms enabled, so I was thinking you would only turn on overdraw metrics when tracing was on for now and would force the flag to always on once the histograms were enabled. There is some work to do server side to store the histograms that we can do at any point, and a flag to flip in chromium. But otherwise, they are good to go.
Adrienne Walker
Comment 16 2012-03-20 12:40:31 PDT
Comment on attachment 132859 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=132859&action=review Ok, thanks for the explanation. > Source/WebCore/platform/graphics/chromium/cc/CCOverdrawMetrics.h:53 > + CCOverdrawMetrics(bool recordMetricsForFrame); nit: explicit.
WebKit Review Bot
Comment 17 2012-03-20 12:53:31 PDT
Comment on attachment 132859 [details] Patch Attachment 132859 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12002434
Dana Jansens
Comment 18 2012-03-20 13:02:18 PDT
Created attachment 132882 [details] Patch Woops, thanks. Also, rebased.
WebKit Review Bot
Comment 19 2012-03-20 14:36:15 PDT
Comment on attachment 132882 [details] Patch Clearing flags on attachment: 132882 Committed r111441: <http://trac.webkit.org/changeset/111441>
WebKit Review Bot
Comment 20 2012-03-20 14:36:21 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.