Bug 1322560 - Inject detailed GC timing info into profiles, r=mstange
This commit is contained in:
@@ -828,6 +828,22 @@ CycleCollectedJSRuntime::GCSliceCallback(JSContext* aContext,
|
||||
CycleCollectedJSRuntime* self = CycleCollectedJSRuntime::Get();
|
||||
MOZ_ASSERT(CycleCollectedJSContext::Get()->Context() == aContext);
|
||||
|
||||
#ifdef MOZ_GECKO_PROFILER
|
||||
if (profiler_is_active()) {
|
||||
if (aProgress == JS::GC_CYCLE_END) {
|
||||
auto payload = new GCSliceMarkerPayload(aDesc.lastSliceStart(aContext),
|
||||
aDesc.lastSliceEnd(aContext),
|
||||
aDesc.sliceToJSON(aContext));
|
||||
PROFILER_MARKER_PAYLOAD("GCSlice", payload);
|
||||
} else if (aProgress == JS::GC_SLICE_END) {
|
||||
auto payload = new GCMajorMarkerPayload(aDesc.startTime(aContext),
|
||||
aDesc.endTime(aContext),
|
||||
aDesc.summaryToJSON(aContext));
|
||||
PROFILER_MARKER_PAYLOAD("GCMajor", payload);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (aProgress == JS::GC_CYCLE_END) {
|
||||
JS::gcreason::Reason reason = aDesc.reason_;
|
||||
Unused <<
|
||||
|
||||
Reference in New Issue
Block a user