Bug 1364161 - Emit a major GC marker for the end of a major GC, and a slice marker for the end of a slice, instead of the other way around, r=mstange
authorSteve Fink <sfink@mozilla.com>
Fri, 12 May 2017 17:42:43 -0700
changeset 358414 8755d3eb143b65c66330f9f4d3c4473ef893545e
parent 358413 ef32458f11b8d1d9e6b0eb5a5ee815dd4fcb653f
child 358415 06dc57c171c8060a59fde3fa8d736a24b09168c0
push id90320
push usersfink@mozilla.com
push dateMon, 15 May 2017 15:15:55 +0000
treeherdermozilla-inbound@8755d3eb143b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1364161
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1364161 - Emit a major GC marker for the end of a major GC, and a slice marker for the end of a slice, instead of the other way around, r=mstange MozReview-Commit-ID: 337I7TeN8tQ
xpcom/base/CycleCollectedJSRuntime.cpp
--- a/xpcom/base/CycleCollectedJSRuntime.cpp
+++ b/xpcom/base/CycleCollectedJSRuntime.cpp
@@ -828,25 +828,25 @@ CycleCollectedJSRuntime::GCSliceCallback
                                          const JS::GCDescription& aDesc)
 {
   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 GCMajorMarkerPayload(aDesc.startTime(aContext),
+                                              aDesc.endTime(aContext),
+                                              aDesc.summaryToJSON(aContext));
+      PROFILER_MARKER_PAYLOAD("GCMajor", payload);
+    } else if (aProgress == JS::GC_SLICE_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 <<
       NS_WARN_IF(NS_FAILED(DebuggerOnGCRunnable::Enqueue(aContext, aDesc)) &&