Closed Bug 1765922 Opened 3 years ago Closed 3 years ago

Use single static buffer when capturing stacks for main-thread markers in child processes

Categories

(Core :: Gecko Profiler, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Bug 1734867 added a single static buffer for capturing stacks in main-thread markers, however it was only effectively enabled in the parent process, because that buffer must be allocated from the main thread, but in child processes that call is done from a non-main thread -- this should be improved.

In child processes, Gecko Profiler's profiler_start/stop are running OFF the main thread, so the calls to Ensure/ReleaseBufferForMainThreadAddMarker should be dispatched to the main thread for them to actually create/destroy the main-thread buffer.

Note that this is not done in the Base Profiler, because it should always run on the main thread, and if it wasn't there would be no way to dispatch a task to the main thread -- and it wouldn't be too much of an issue anyway, there are few markers running outside of Gecko Profiler sessions.

Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a5ff969a3d72 Ensure/ReleaseBufferForMainThreadAddMarker from main thread in profiler_start/stop - r=florian
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: