Closed Bug 1373755 Opened 7 years ago Closed 7 years ago

Make JS profiling work with cooperative threads

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: billm, Assigned: bhackett1024)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
This is Brian's patch to split the profiler per-context and per-runtime pieces. The profiler is enabled on a runtime-wide basis, but the profiling stack is per-context.
Attachment #8878596 - Flags: review?(jdemooij)
Comment on attachment 8878596 [details] [diff] [review]
patch

Review of attachment 8878596 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsgc.cpp
@@ +5980,5 @@
>  AutoTraceSession::AutoTraceSession(JSRuntime* rt, JS::HeapState heapState)
>    : lock(rt),
>      runtime(rt),
>      prevState(TlsContext.get()->heapState),
> +    pseudoFrame(TlsContext.get(), HeapStateToLabel(heapState), ProfileEntry::Category::GC)

Not for this bug, but it would be nice if we could just make AutoTraceSession take a JSContext* so we don't need all these TLS accesses. I've noticed the same thing elsewhere.
Attachment #8878596 - Flags: review?(jdemooij) → review+
Flags: needinfo?(wmccloskey)
Pushed by wmccloskey@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/579c0c00dfd5
Support profiling of cooperative threads (r=jandem)
https://hg.mozilla.org/mozilla-central/rev/579c0c00dfd5
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Flags: needinfo?(wmccloskey)
You need to log in before you can comment on or make changes to this bug.