Bug 1247955 - Add telemetry for compacting GC r=terrence

This commit is contained in:
Jon Coppeard 2016-02-15 10:37:58 +00:00
parent fd636314d9
commit 0019e9c596
4 changed files with 13 additions and 0 deletions

View File

@ -933,6 +933,7 @@ Statistics::endGC()
int64_t markRootsTotal = SumPhase(PHASE_MARK_ROOTS, phaseTimes); int64_t markRootsTotal = SumPhase(PHASE_MARK_ROOTS, phaseTimes);
runtime->addTelemetry(JS_TELEMETRY_GC_MARK_MS, t(markTotal)); runtime->addTelemetry(JS_TELEMETRY_GC_MARK_MS, t(markTotal));
runtime->addTelemetry(JS_TELEMETRY_GC_SWEEP_MS, t(phaseTimes[PHASE_DAG_NONE][PHASE_SWEEP])); runtime->addTelemetry(JS_TELEMETRY_GC_SWEEP_MS, t(phaseTimes[PHASE_DAG_NONE][PHASE_SWEEP]));
runtime->addTelemetry(JS_TELEMETRY_GC_COMPACT_MS, t(phaseTimes[PHASE_DAG_NONE][PHASE_COMPACT]));
runtime->addTelemetry(JS_TELEMETRY_GC_MARK_ROOTS_MS, t(markRootsTotal)); runtime->addTelemetry(JS_TELEMETRY_GC_MARK_ROOTS_MS, t(markRootsTotal));
runtime->addTelemetry(JS_TELEMETRY_GC_MARK_GRAY_MS, t(phaseTimes[PHASE_DAG_NONE][PHASE_SWEEP_MARK_GRAY])); runtime->addTelemetry(JS_TELEMETRY_GC_MARK_GRAY_MS, t(phaseTimes[PHASE_DAG_NONE][PHASE_SWEEP_MARK_GRAY]));
runtime->addTelemetry(JS_TELEMETRY_GC_NON_INCREMENTAL, !!nonincrementalReason_); runtime->addTelemetry(JS_TELEMETRY_GC_NON_INCREMENTAL, !!nonincrementalReason_);

View File

@ -115,6 +115,7 @@ enum {
JS_TELEMETRY_GC_MAX_PAUSE_MS, JS_TELEMETRY_GC_MAX_PAUSE_MS,
JS_TELEMETRY_GC_MARK_MS, JS_TELEMETRY_GC_MARK_MS,
JS_TELEMETRY_GC_SWEEP_MS, JS_TELEMETRY_GC_SWEEP_MS,
JS_TELEMETRY_GC_COMPACT_MS,
JS_TELEMETRY_GC_MARK_ROOTS_MS, JS_TELEMETRY_GC_MARK_ROOTS_MS,
JS_TELEMETRY_GC_MARK_GRAY_MS, JS_TELEMETRY_GC_MARK_GRAY_MS,
JS_TELEMETRY_GC_SLICE_MS, JS_TELEMETRY_GC_SLICE_MS,

View File

@ -3148,6 +3148,9 @@ AccumulateTelemetryCallback(int id, uint32_t sample, const char* key)
case JS_TELEMETRY_GC_SWEEP_MS: case JS_TELEMETRY_GC_SWEEP_MS:
Telemetry::Accumulate(Telemetry::GC_SWEEP_MS, sample); Telemetry::Accumulate(Telemetry::GC_SWEEP_MS, sample);
break; break;
case JS_TELEMETRY_GC_COMPACT_MS:
Telemetry::Accumulate(Telemetry::GC_COMPACT_MS, sample);
break;
case JS_TELEMETRY_GC_MARK_ROOTS_MS: case JS_TELEMETRY_GC_MARK_ROOTS_MS:
Telemetry::Accumulate(Telemetry::GC_MARK_ROOTS_MS, sample); Telemetry::Accumulate(Telemetry::GC_MARK_ROOTS_MS, sample);
break; break;

View File

@ -364,6 +364,14 @@
"n_buckets": 50, "n_buckets": 50,
"description": "Time spent running JS GC sweep phase (ms)" "description": "Time spent running JS GC sweep phase (ms)"
}, },
"GC_COMPACT_MS": {
"alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
"expires_in_version": "never",
"kind": "exponential",
"high": "10000",
"n_buckets": 50,
"description": "Time spent running JS GC compact phase (ms)"
},
"GC_MARK_ROOTS_MS": { "GC_MARK_ROOTS_MS": {
"alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"], "alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
"expires_in_version": "never", "expires_in_version": "never",