Closed Bug 1621611 Opened 4 years ago Closed 4 years ago

Profiler preset for media troubleshooting

Categories

(DevTools :: Performance Tools (Profiler/Timeline), task)

task
Not set
normal

Tracking

(firefox76 fixed)

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: padenot, Assigned: padenot)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It could look like this:

  "media": {
    label: "Media profiling",
    description:
      "Recommended preset for diagnosing audio and video problems",
    entries: 10000000,
    interval: 1,
    features: ["js", "leaf", "stackwalk"],
    threads: ["GeckoMain","Compositor","Renderer","RenderBackend","AudioIPC","MediaPDecoder","MediaTimer","MediaPlayback","MediaDecoderStateMachine"],
    duration: 0,
  },

a few questions:

  • interval seems to be in ms, 1 is fine, is going lower at all possible in terms of performance? Increasingly frequently we have events that are shorter than that
  • In what configuration is "leaf" useful?

Greg, can you let me know when it's the right time to make a patch for this, if we're waiting for something (the current status of this feature is a bit fuzzy for me), or if you need anything to move this forward, thanks!

Flags: needinfo?(gtatum)
Depends on: about-profiling

(In reply to Paul Adenot (:padenot) from comment #0)

  • interval seems to be in ms, 1 is fine, is going lower at all possible in terms of performance? Increasingly frequently we have events that are shorter than that

The lower we currently support on Windows is sampling every 2ms (specifying 1ms is fine, you'll just get an actual sampling rate of 2ms on Windows). On other platforms it's possible to go lower, but with significantly increased profiler overhead.
If you are interested in seeing short events that happen every once in a while, adding profiler markers for them might be the best way.

  • In what configuration is "leaf" useful?

leaf is useful as a fallback when stackwalking isn't available (which is the case at least on release OS X builds).

Now is perfect, did you want to make the patch and I can review it? Everything you have there seems reasonable. The only thing I would point out is that I forgot to add "screenshots" to the features in the other presets, but maybe that would be too much latency for video/audio concerns.

label: "Media profiling",

The other presets capitalize the each word.

Flags: needinfo?(gtatum)
Blocks: 1621805
No longer depends on: about-profiling

Just to get consistent on naming, would "Firefox Media Playback" fit with the existing names?

I assume this covers Web Audio, audio and video streaming; but not WebRTC – correct?

(In reply to Greg Tatum [:gregtatum] from comment #3)

Now is perfect, did you want to make the patch and I can review it? Everything you have there seems reasonable. The only thing I would point out is that I forgot to add "screenshots" to the features in the other presets, but maybe that would be too much latency for video/audio concerns.

label: "Media profiling",

The other presets capitalize the each word.

This is is intentional, the screenshotter does readback calls unfortunately impact the profiling (especially when the workload being profiled is hard on the compositor).

Also it's not only playback, it profiles quite a of of things, including bits of WebRTC (not the network-y parts however, but a lot of the media part).

Assignee: nobody → padenot
Status: NEW → ASSIGNED
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/38e6d69b204a
Add a profiler presets to profile media workloads r=gregtatum
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: