Bug 1637318 - Add GC_PRETENURE_COUNT_2 telemetry and mark GC_PRETENURE_COUNT for expiry r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 15 May 2020 17:00:26 +0000
changeset 531285 06a2edc40fb18ebba1b11508c5c52875c44d8192
parent 531284 9888d95d59ec4ea6ebb0a4988b5bb9ee3303b8b0
child 531286 bdaa296c4e6647e0e0e650a53e91c40cef1c13ff
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_PRETENURE_COUNT_2 telemetry and mark GC_PRETENURE_COUNT for expiry r=sfink Depends on D75524 Differential Revision: https://phabricator.services.mozilla.com/D75525
js/src/gc/Nursery.cpp
js/src/jsfriendapi.h
js/xpconnect/src/XPCJSRuntime.cpp
toolkit/components/telemetry/Histograms.json
--- a/js/src/gc/Nursery.cpp
+++ b/js/src/gc/Nursery.cpp
@@ -1271,16 +1271,17 @@ float js::Nursery::doPretenuring(JSRunti
                   numNurseryStringRealmsDisabled);
   stats().setStat(gcstats::STAT_STRINGS_TENURED, numStringsTenured);
   stats().setStat(gcstats::STAT_NURSERY_BIGINT_REALMS_DISABLED,
                   numNurseryBigIntRealmsDisabled);
   stats().setStat(gcstats::STAT_BIGINTS_TENURED, numBigIntsTenured);
   endProfile(ProfileKey::Pretenure);
 
   rt->addTelemetry(JS_TELEMETRY_GC_PRETENURE_COUNT, pretenureCount);
+  rt->addTelemetry(JS_TELEMETRY_GC_PRETENURE_COUNT_2, pretenureCount);
   rt->addTelemetry(JS_TELEMETRY_GC_NURSERY_PROMOTION_RATE, promotionRate * 100);
 
   return promotionRate;
 }
 
 bool js::Nursery::registerMallocedBuffer(void* buffer, size_t nbytes) {
   MOZ_ASSERT(buffer);
   MOZ_ASSERT(nbytes > 0);
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -166,16 +166,17 @@ enum {
   JS_TELEMETRY_GC_RESET_REASON,
   JS_TELEMETRY_GC_NON_INCREMENTAL,
   JS_TELEMETRY_GC_NON_INCREMENTAL_REASON,
   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_PRETENURE_COUNT_2,
   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,
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -2667,16 +2667,19 @@ static void AccumulateTelemetryCallback(
       Telemetry::Accumulate(Telemetry::GC_MINOR_US, sample);
       break;
     case JS_TELEMETRY_GC_NURSERY_BYTES:
       Telemetry::Accumulate(Telemetry::GC_NURSERY_BYTES_2, sample);
       break;
     case JS_TELEMETRY_GC_PRETENURE_COUNT:
       Telemetry::Accumulate(Telemetry::GC_PRETENURE_COUNT, sample);
       break;
+    case JS_TELEMETRY_GC_PRETENURE_COUNT_2:
+      Telemetry::Accumulate(Telemetry::GC_PRETENURE_COUNT_2, sample);
+      break;
     case JS_TELEMETRY_GC_NURSERY_PROMOTION_RATE:
       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);
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -935,22 +935,34 @@
     "n_buckets": 24,
     "bug_numbers": [1528867],
     "description": "Size of the GC nursery (bytes)"
   },
   "GC_PRETENURE_COUNT": {
     "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": "enumerated",
     "n_values": 32,
     "bug_numbers": [1293262],
     "description": "How many objects groups were selected for pretenuring by a minor GC"
   },
+  "GC_PRETENURE_COUNT_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": 100,
+    "n_buckets": 20,
+    "bug_numbers": [1293262, 1637318],
+    "description": "How many objects groups were selected for pretenuring by a minor GC"
+  },
   "GC_SLICE_DURING_IDLE": {
     "record_in_processes": ["main", "content"],
     "products": ["firefox", "fennec", "geckoview"],
     "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
     "expires_in_version": "never",
     "kind": "linear",
     "high": 100,
     "n_buckets": 50,