Bug 1637318 - Add GC_MARK_GRAY_MS_2 telemetry and mark GC_MARK_GRAY_MS for expiry r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 15 May 2020 15:48:46 +0000
changeset 531282 c0389e13a6125c716f43652eaacc8601d5aa8cb2
parent 531281 639c7c4c355ccc54dce376eca33f34c43871f11c
child 531283 4f905a241359cbd5177b98121a4967581bba2832
push id37436
push userncsoregi@mozilla.com
push dateWed, 20 May 2020 21:30:50 +0000
treeherdermozilla-central@6c10970490f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1637318
milestone78.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 1637318 - Add GC_MARK_GRAY_MS_2 telemetry and mark GC_MARK_GRAY_MS for expiry r=sfink Depends on D75520 Differential Revision: https://phabricator.services.mozilla.com/D75522
js/src/gc/Statistics.cpp
js/src/jsfriendapi.h
js/xpconnect/src/XPCJSRuntime.cpp
toolkit/components/telemetry/Histograms.json
--- a/js/src/gc/Statistics.cpp
+++ b/js/src/gc/Statistics.cpp
@@ -1078,16 +1078,17 @@ void Statistics::sendGCTelemetry() {
   if (gc->didCompactZones()) {
     runtime->addTelemetry(JS_TELEMETRY_GC_COMPACT_MS,
                           t(phaseTimes[Phase::COMPACT]));
   }
   runtime->addTelemetry(JS_TELEMETRY_GC_MARK_ROOTS_MS, t(markRootsTotal));
   runtime->addTelemetry(JS_TELEMETRY_GC_MARK_ROOTS_US,
                         markRootsTotal.ToMicroseconds());
   runtime->addTelemetry(JS_TELEMETRY_GC_MARK_GRAY_MS, t(markGrayTotal));
+  runtime->addTelemetry(JS_TELEMETRY_GC_MARK_GRAY_MS_2, t(markGrayTotal));
   runtime->addTelemetry(JS_TELEMETRY_GC_MARK_WEAK_MS, t(markWeakTotal));
   runtime->addTelemetry(JS_TELEMETRY_GC_NON_INCREMENTAL, nonincremental());
   if (nonincremental()) {
     runtime->addTelemetry(JS_TELEMETRY_GC_NON_INCREMENTAL_REASON,
                           uint32_t(nonincrementalReason_));
   }
 
 #ifdef DEBUG
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -150,16 +150,17 @@ enum {
   JS_TELEMETRY_GC_MAX_PAUSE_MS_2,
   JS_TELEMETRY_GC_PREPARE_MS,
   JS_TELEMETRY_GC_MARK_MS,
   JS_TELEMETRY_GC_SWEEP_MS,
   JS_TELEMETRY_GC_COMPACT_MS,
   JS_TELEMETRY_GC_MARK_ROOTS_MS,
   JS_TELEMETRY_GC_MARK_ROOTS_US,
   JS_TELEMETRY_GC_MARK_GRAY_MS,
+  JS_TELEMETRY_GC_MARK_GRAY_MS_2,
   JS_TELEMETRY_GC_MARK_WEAK_MS,
   JS_TELEMETRY_GC_SLICE_MS,
   JS_TELEMETRY_GC_SLOW_PHASE,
   JS_TELEMETRY_GC_SLOW_TASK,
   JS_TELEMETRY_GC_MMU_50,
   JS_TELEMETRY_GC_RESET,
   JS_TELEMETRY_GC_RESET_REASON,
   JS_TELEMETRY_GC_NON_INCREMENTAL,
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -2619,16 +2619,19 @@ static void AccumulateTelemetryCallback(
       Telemetry::Accumulate(Telemetry::GC_MARK_ROOTS_MS, sample);
       break;
     case JS_TELEMETRY_GC_MARK_ROOTS_US:
       Telemetry::Accumulate(Telemetry::GC_MARK_ROOTS_US, sample);
       break;
     case JS_TELEMETRY_GC_MARK_GRAY_MS:
       Telemetry::Accumulate(Telemetry::GC_MARK_GRAY_MS, sample);
       break;
+    case JS_TELEMETRY_GC_MARK_GRAY_MS_2:
+      Telemetry::Accumulate(Telemetry::GC_MARK_GRAY_MS_2, sample);
+      break;
     case JS_TELEMETRY_GC_MARK_WEAK_MS:
       Telemetry::Accumulate(Telemetry::GC_MARK_WEAK_MS, sample);
       break;
     case JS_TELEMETRY_GC_SLICE_MS:
       Telemetry::Accumulate(Telemetry::GC_SLICE_MS, sample);
       break;
     case JS_TELEMETRY_GC_SLOW_PHASE:
       Telemetry::Accumulate(Telemetry::GC_SLOW_PHASE, sample);
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -774,22 +774,34 @@
     "n_buckets": 50,
     "description": "Time spent marking GC roots (us)",
     "bug_numbers": [1637318]
   },
   "GC_MARK_GRAY_MS": {
     "record_in_processes": ["main", "content"],
     "products": ["firefox", "fennec", "geckoview"],
     "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
-    "expires_in_version": "never",
+    "expires_in_version": "81",
     "kind": "linear",
     "high": 200,
     "n_buckets": 50,
     "description": "Time spent marking gray GC objects (ms)"
   },
+  "GC_MARK_GRAY_MS_2": {
+    "record_in_processes": ["main", "content"],
+    "products": ["firefox"],
+    "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org", "jcoppeard@mozilla.com"],
+    "expires_in_version": "never",
+    "releaseChannelCollection": "opt-out",
+    "kind": "exponential",
+    "high": 10000,
+    "n_buckets": 50,
+    "description": "Time spent marking gray GC objects (ms)",
+    "bug_numbers": [1637318]
+  },
   "GC_MARK_WEAK_MS": {
     "record_in_processes": ["main", "content"],
     "products": ["firefox"],
     "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org", "jcoppeard@mozilla.com"],
     "expires_in_version": "never",
     "releaseChannelCollection": "opt-out",
     "kind": "exponential",
     "high": 10000,