Closed Bug 1626918 Opened 5 years ago Closed 4 years ago

Allow capturing real-time traces in the Firefox Profiler

Categories

(Core :: Audio/Video: MediaStreamGraph, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: padenot, Assigned: padenot)

References

(Blocks 1 open bug, Regressed 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(14 files, 2 obsolete files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

Multiple steps for this:

  • Generalize the mpsc queue to have arbitrary data instead of just strings
  • Allow to have multiple backends for the macros: MOZ_LOG or profiler markers
Priority: -- → P2

You can already put all log messages into profiles with "profilermarkers" in MOZ_LOG

Yes, this can't be used for us, the marker API is too slow/not deterministic enough, so we need to use our custom code that does the minimum work possible, put that in a queue, bounce to another thread, and then use the marker API.

Assignee: nobody → padenot
Status: NEW → ASSIGNED

The allocation still needs to be a power of two so the ergonomics are not
amazing, but this will do until we replace with a buffer-based MPSC ringbuffer.

Depends on D78498

The profile now handles this.

Depends on D78505

Attachment #9142276 - Attachment is obsolete: true
Attachment #9154553 - Attachment is obsolete: true
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9a8a328a2482 Push the JSON serialization logic for MOZ_LOG output in AsyncLogger, prepare for another mode. r=achronop https://hg.mozilla.org/integration/autoland/rev/f42379fcffdc Push PID and TIP gathering to AsyncLogger. r=achronop https://hg.mozilla.org/integration/autoland/rev/c58446c7468a Split the MPSC queue in its own file, and generalize it for any type. r=achronop https://hg.mozilla.org/integration/autoland/rev/fca3a809b805 Teach AsyncLogger to output profiler markers. r=gerald https://hg.mozilla.org/integration/autoland/rev/32bc0f2b3a22 Add the native audio callback thread to the profiler. r=gregtatum https://hg.mozilla.org/integration/autoland/rev/68e0a73427bf Register the audio callback thread(s) to the Gecko profiler even when it changes. r=achronop https://hg.mozilla.org/integration/autoland/rev/6ffb58f1abad Don't start/stop the real-time tracing code from the objects they measure. r=achronop https://hg.mozilla.org/integration/autoland/rev/48f24a4445a1 Add two missing constructors to TracingMarkerPayload. r=gerald https://hg.mozilla.org/integration/autoland/rev/9f3bca4dedde Start and stop audio callback tracing when the profiler starts and stops. r=gerald https://hg.mozilla.org/integration/autoland/rev/c2f99008a2a0 Add categories for real-time media tracing. r=gerald https://hg.mozilla.org/integration/autoland/rev/b12a18558d42 Have a fixed size buffer for the message part of the tracing. r=achronop https://hg.mozilla.org/integration/autoland/rev/bd39e75bf891 Don't register the audio callback thread when using audioipc: it's already registered. r=achronop
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e88ca3b28a60 Don't require POT for queue items on windows/android for now, on a CLOSED TREE
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/066838d09929 Properly check thread id when running with cubeb not sandboxed on a CLOSED TREE.
Regressions: 1635619
Regressed by: 1645766
Has Regression Range: --- → yes
Keywords: regression
Regressions: 1645720
Regressions: 1650700
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: