Bug 1545093 - Add telemetry about full GC cycle, including time between slices, r=jonco

Differential Revision: https://phabricator.services.mozilla.com/D27896

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Olli Pettay 2019-04-17 15:55:03 +00:00
Родитель 9bda39c108
Коммит 897fa17b45
2 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -168,6 +168,8 @@ static TimeStamp sLastCCEndTime;
static TimeStamp sLastForgetSkippableCycleEndTime;
static TimeStamp sCurrentGCStartTime;
static bool sCCLockedOut;
static PRTime sCCLockedOutTime;
@ -2173,6 +2175,7 @@ static void DOMGCSliceCallback(JSContext* aCx, JS::GCProgress aProgress,
case JS::GC_CYCLE_BEGIN: {
// Prevent cycle collections and shrinking during incremental GC.
sCCLockedOut = true;
sCurrentGCStartTime = TimeStamp::Now();
break;
}
@ -2239,6 +2242,8 @@ static void DOMGCSliceCallback(JSContext* aCx, JS::GCProgress aProgress,
sNeedsFullGC = false;
}
Telemetry::Accumulate(Telemetry::GC_IN_PROGRESS_MS,
TimeBetween(sCurrentGCStartTime, TimeStamp::Now()));
break;
}

Просмотреть файл

@ -646,6 +646,16 @@
"n_buckets": 50,
"description": "Time spent running JS GC (ms)"
},
"GC_IN_PROGRESS_MS": {
"record_in_processes": ["main", "content"],
"alert_emails": ["smaug@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
"high": 10000,
"n_buckets": 50,
"bug_numbers": [1545093],
"description": "Time from the beginning of the first slice to the end of the last slice (ms)"
},
"GC_BUDGET_MS": {
"record_in_processes": ["main", "content"],
"alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],