Closed Bug 1352520 Opened 7 years ago Closed 7 years ago

Add GeckoProfiler Labels for WebVR

Categories

(Core :: WebVR, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: kip, Assigned: daoshengmu)

References

()

Details

Attachments

(1 file)

GeckoProfiler could help more with identifying WebVR performance issues if we had some labels.

We can use the macros in GeckoProfiler.h to identify the events occurring during the VR render loop.
See Also: → 1353080
Not completely related but wanted to make you aware of the work happening in bug 1326572
See Also: → 1326572
We can consider use AutoProfilerTracing for adding markers and AUTO_PROFILER_LABEL for pseudo stack.
I don't quite understand what AUTO_PROFILER_LABEL works for because I didn't see any related information about the labels in perf-html.io. In terms of AutoProfilerTracing, it can show a block in perf-html.io and list the timestamp of it. I think it could cover all of our requirements.
We can add markers at

VRDisplayHost::SubmitFrame()
VRManagerChild::RunFrameRequestCallbacks()

All of the above is what I get currently for our performance critical path.
:kip, do you think if there are other parts we should add?
Flags: needinfo?(kgilbert)
(In reply to Daosheng Mu[:daoshengmu] from comment #4)
> We can add markers at
> 
> VRDisplayHost::SubmitFrame()
> VRManagerChild::RunFrameRequestCallbacks()
> 
> All of the above is what I get currently for our performance critical path.
> :kip, do you think if there are other parts we should add?

It would be beneficial to have markers at both the start and end of VRDisplayHost::SubmitFrame, as there are some blocking calls such as WaitGetPoses that can make this run for a significant time.  I would like to see how long we are blocking the thread.

Also, it would be nice to see a separate marker for when content calls submitframe, in dom/vr/VRDisplay.  Any latency added from queues, IPC, etc would then be visible.

Thanks Daosheng!
Flags: needinfo?(kgilbert)
(In reply to Daosheng Mu[:daoshengmu] from comment #6)
> Created attachment 8904904 [details]
> Bug 1352520 - Add GeckoProfiler markers for WebVR;
> 
> Review commit: https://reviewboard.mozilla.org/r/176696/diff/#index_header
> See other reviews: https://reviewboard.mozilla.org/r/176696/

I have to say that it is super useful for profiling WebVR performance. I am so excited to see it and can't wait for it landed!
Currently, HandleInput() at OpenVR and Oculus almost take no time. We can consider to remove "HandleInputAtOculus" and "HandleInputAtOpenVR" markers if we don't want to have too many markers.
Comment on attachment 8904904 [details]
Bug 1352520 - Add GeckoProfiler markers for WebVR;

https://reviewboard.mozilla.org/r/176696/#review182476

LGTM, Thanks!
Attachment #8904904 - Flags: review?(kgilbert) → review+
Pushed by dmu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ff5c2f80df51
Add GeckoProfiler markers for WebVR; r=kip
https://hg.mozilla.org/mozilla-central/rev/ff5c2f80df51
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Assignee: kgilbert → dmu
You need to log in before you can comment on or make changes to this bug.