Bug 1637318 - Add GC_MARK_RATE_2 telemetry and mark GC_MARK_RATE for expiry r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 15 May 2020 15:49:31 +0000
changeset 531283 4f905a241359cbd5177b98121a4967581bba2832
parent 531282 c0389e13a6125c716f43652eaacc8601d5aa8cb2
child 531284 9888d95d59ec4ea6ebb0a4988b5bb9ee3303b8b0
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_RATE_2 telemetry and mark GC_MARK_RATE for expiry r=sfink Depends on D75522 Differential Revision: https://phabricator.services.mozilla.com/D75523
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
@@ -1069,16 +1069,17 @@ void Statistics::sendGCTelemetry() {
                                phaseTimes[Phase::SWEEP_MARK_GRAY_WEAK];
   TimeDuration markGrayTotal = phaseTimes[Phase::SWEEP_MARK_GRAY] +
                                phaseTimes[Phase::SWEEP_MARK_GRAY_WEAK];
   size_t markCount = gc->marker.getMarkCount();
   double markRate = markCount / t(markTotal);
   runtime->addTelemetry(JS_TELEMETRY_GC_PREPARE_MS, t(prepareTotal));
   runtime->addTelemetry(JS_TELEMETRY_GC_MARK_MS, t(markTotal));
   runtime->addTelemetry(JS_TELEMETRY_GC_MARK_RATE, markRate);
+  runtime->addTelemetry(JS_TELEMETRY_GC_MARK_RATE_2, markRate);
   runtime->addTelemetry(JS_TELEMETRY_GC_SWEEP_MS, t(phaseTimes[Phase::SWEEP]));
   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());
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -168,16 +168,17 @@ enum {
   JS_TELEMETRY_GC_MINOR_REASON,
   JS_TELEMETRY_GC_MINOR_REASON_LONG,
   JS_TELEMETRY_GC_MINOR_US,
   JS_TELEMETRY_GC_NURSERY_BYTES,
   JS_TELEMETRY_GC_PRETENURE_COUNT,
   JS_TELEMETRY_GC_NURSERY_PROMOTION_RATE,
   JS_TELEMETRY_GC_TENURED_SURVIVAL_RATE,
   JS_TELEMETRY_GC_MARK_RATE,
+  JS_TELEMETRY_GC_MARK_RATE_2,
   JS_TELEMETRY_GC_TIME_BETWEEN_S,
   JS_TELEMETRY_GC_TIME_BETWEEN_SLICES_MS,
   JS_TELEMETRY_GC_SLICE_COUNT,
   JS_TELEMETRY_GC_EFFECTIVENESS,
   JS_TELEMETRY_PRIVILEGED_PARSER_COMPILE_LAZY_AFTER_MS,
   JS_TELEMETRY_WEB_PARSER_COMPILE_LAZY_AFTER_MS,
   JS_TELEMETRY_END
 };
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -2673,16 +2673,19 @@ static void AccumulateTelemetryCallback(
       Telemetry::Accumulate(Telemetry::GC_NURSERY_PROMOTION_RATE, sample);
       break;
     case JS_TELEMETRY_GC_TENURED_SURVIVAL_RATE:
       Telemetry::Accumulate(Telemetry::GC_TENURED_SURVIVAL_RATE, sample);
       break;
     case JS_TELEMETRY_GC_MARK_RATE:
       Telemetry::Accumulate(Telemetry::GC_MARK_RATE, sample);
       break;
+    case JS_TELEMETRY_GC_MARK_RATE_2:
+      Telemetry::Accumulate(Telemetry::GC_MARK_RATE_2, sample);
+      break;
     case JS_TELEMETRY_GC_TIME_BETWEEN_S:
       Telemetry::Accumulate(Telemetry::GC_TIME_BETWEEN_S, sample);
       break;
     case JS_TELEMETRY_GC_TIME_BETWEEN_SLICES_MS:
       Telemetry::Accumulate(Telemetry::GC_TIME_BETWEEN_SLICES_MS, sample);
       break;
     case JS_TELEMETRY_GC_SLICE_COUNT:
       Telemetry::Accumulate(Telemetry::GC_SLICE_COUNT, sample);
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -978,24 +978,36 @@
     "releaseChannelCollection": "opt-out",
     "bug_numbers": [1563755],
     "description": "The percentage of tenured GC things that survived a collection."
   },
   "GC_MARK_RATE": {
     "record_in_processes": ["main", "content"],
     "products": ["firefox", "fennec", "geckoview"],
     "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org", "jcoppeard@mozilla.com"],
-    "expires_in_version": "never",
+    "expires_in_version": "81",
     "kind": "linear",
     "low": 1000,
     "high": 1000000,
     "n_buckets": 100,
     "bug_numbers": [1475896],
     "description": "The number of objects marked per ms during GC."
   },
+  "GC_MARK_RATE_2": {
+    "record_in_processes": ["main", "content"],
+    "products": ["firefox"],
+    "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org", "jcoppeard@mozilla.com"],
+    "expires_in_version": "never",
+    "kind": "exponential",
+    "low": 1000,
+    "high": 300000,
+    "n_buckets": 50,
+    "bug_numbers": [1475896, 1637318],
+    "description": "The number of objects marked per ms during GC."
+  },
   "GC_TIME_BETWEEN_S": {
     "record_in_processes": ["main", "content"],
     "products": ["firefox", "fennec", "geckoview"],
     "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org", "jcoppeard@mozilla.com"],
     "expires_in_version": "never",
     "kind": "exponential",
     "high": 120,
     "n_buckets": 50,