Closed Bug 927954 Opened 11 years ago Closed 11 years ago

Resurrect the checkerboard visualization tool

Categories

(Core :: Panning and Zooming, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: kats, Assigned: kats)

References

Details

(Whiteboard: [release28])

Attachments

(1 file, 2 obsolete files)

Back when we were trying to reduce checkerboarding in Native Fennec, we had a tool that would help us visualize what was going on. The code from that is in my github repo at https://github.com/staktrace/andreasgal-checkviz Basically the way it worked is we would instrument the gecko code to print out various rectangles at various points (at frame composite time and at repaint time), and collect that output into a file. Then we could run the server.js file in Node, which would serve up the client.html/client.js files. Loading that file in the browser would show a nice animation of what was happening. It was very easy to see when the displayport was far away from the viewport and so you would have checkerboarding.
I'll have a look at this in the hope that it will be helpful for tracking down what we think are displayport issues on Metro.
Assignee: nobody → botond
Whiteboard: [release28]
Taking this from Botond. Also for future reference the old patch with Checkviz logging is at https://bugzilla.mozilla.org/page.cgi?id=splinter.html&bug=747528&attachment=618012
Assignee: botond → bugmail.mozilla
Attached patch Patch (obsolete) — Splinter Review
So in retrospect the tool I was actually thinking of was rendertrace (https://github.com/staktrace/rendertrace) rather than checkviz. I could have sworn we did rendertrace as an improvement on checkviz but the github commits say otherwise. Anyway, this patch adds the right logging for rendertrace, but I kept running into bug 937274. I'll apply the patch from that and re-test.
Attached patch Patch (obsolete) — Splinter Review
Fixed a colour and the size of the composition bounds.
Attachment #830863 - Attachment is obsolete: true
Attachment #830891 - Flags: review?(botond)
Comment on attachment 830891 [details] [diff] [review] Patch Review of attachment 830891 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/ipc/AsyncPanZoomController.cpp @@ +74,5 @@ > namespace mozilla { > namespace layers { > > +#ifdef APZC_ENABLE_RENDERTRACE > + static TimeStamp sRenderStart = TimeStamp::Now(); Will this ever be reset? If not, perhaps we make it const. @@ +79,5 @@ > + > + #define APZC_LOG_RENDERTRACE_RECT(prefix, color, rect) \ > + printf_stderr(prefix " RENDERTRACE %f rect " color " %f %f %f %f\n", \ > + (TimeStamp::Now() - sRenderStart).ToMilliseconds(), \ > + (rect).x, (rect).y, (rect).width, (rect).height); I would prefer keeping code out of macro bodies as much as possible. Can we do something like: static inline apzc_log_rendertrace_rect(const char* prefix, const char* color, const CSSRect& rect) { nsString msg(prefix); msg.AppendPrintf(" RENDERTRACE %f rect ", (TimeStamp::Now() - sRenderStart).ToMilliseconds()); msg.Append(color); msg.AppendPrintf(" %f %f %f %f\n", rect.x, rect.y, rect.width, rect.height)); printf_stderr(msg.get()); } #define APZC_LOG_RENDERTRACE_RECT apzc_log_rendertrace_rect instead? (In fact, APZC_LOG_FM could be refactored in a similar way as well.) @@ +540,5 @@ > } > > nsEventStatus AsyncPanZoomController::OnTouchEnd(const MultiTouchInput& aEvent) { > APZC_LOG("%p got a touch-end in state %d\n", this, mState); > + Stray newline? (Ok if intentional.)
Attached patch Patch v2Splinter Review
How about this? It's similar to yours but a bit more compact. Also I got rid of the stray newline, it was left over from a previous version of the patch.
Attachment #830891 - Attachment is obsolete: true
Attachment #830891 - Flags: review?(botond)
Attachment #830979 - Flags: review?(botond)
Comment on attachment 830979 [details] [diff] [review] Patch v2 Review of attachment 830979 [details] [diff] [review]: ----------------------------------------------------------------- Note that with this approach, the expression passed in for the rect will be evaluated even if APZC_LOG_RENDERTRACE is not defined. (A good optimizing compiler will eliminate that computation as dead code, but that's still work for the compiler to do.) Fine with me, just wanted to point it out.
Attachment #830979 - Flags: review?(botond) → review+
(In reply to Botond Ballo [:botond] from comment #7) > Note that with this approach, the expression passed in for the rect will be > evaluated even if APZC_LOG_RENDERTRACE is not defined. (A good optimizing > compiler will eliminate that computation as dead code, but that's still work > for the compiler to do.) Fine with me, just wanted to point it out. Hm, that's a good point that I hadn't considered. I'm ok with it though since as you said the compiler should kill off that code. At least it should once I land https://hg.mozilla.org/try/rev/ca49d069e36c
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #8) > At least it should > once I land https://hg.mozilla.org/try/rev/ca49d069e36c While we're on the topic of making things const, I think nsLayoutUtils::FindIDFor could take a const nsIContent* rather than an nsIContent* (and then so could your GetScrollIdentifiers).
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: