Open Bug 1549735 Opened 5 years ago Updated 2 years ago

Profiler shouldn't call JS::GetProfiledFrames off-thread

Categories

(Core :: Gecko Profiler, defect, P2)

defect

Tracking

()

People

(Reporter: jandem, Unassigned)

References

(Blocks 1 open bug)

Details

JSON streaming calls JS::GetProfiledFrames:

https://searchfox.org/mozilla-central/rev/e7d9a8749303b39dadcc0e18ea0d60a570a68145/tools/profiler/core/ProfileBufferEntry.cpp#674

However this seems bad because it can race with the main thread or DOM Worker threads updating the JIT code map. (JS::GetProfiledFrames should probably have a CHECK_THREAD(cx) to assert this.)

For bug 1548775 I need a similar mechanism to run code on-thread before streaming..

Oh dear, this is unfortunate. We really need this to happen off-thread because we want to be able to grab profiles from content processes whose main thread is unresponsive or even hung.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.