mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1778014 - Handle perfstats/telemetry case where GC starts after its deadline has passed r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D152661
This commit is contained in:
parent
194e762e3c
commit
860bbb00d6
@ -249,10 +249,13 @@ void CCGCScheduler::NoteGCSliceEnd(TimeStamp aStart, TimeStamp aEnd) {
|
||||
TimeDuration sliceDuration = aEnd - aStart;
|
||||
PerfStats::RecordMeasurement(PerfStats::Metric::MajorGC, sliceDuration);
|
||||
|
||||
// Compute how much GC time was spent in predicted-to-be-idle time.
|
||||
// Compute how much GC time was spent in predicted-to-be-idle time. In the
|
||||
// unlikely event that the slice started after the deadline had already
|
||||
// passed, treat the entire slice as non-idle.
|
||||
TimeDuration nonIdleDuration;
|
||||
bool startedIdle =
|
||||
mTriggeredGCDeadline.isSome() && !mTriggeredGCDeadline->IsNull();
|
||||
bool startedIdle = mTriggeredGCDeadline.isSome() &&
|
||||
!mTriggeredGCDeadline->IsNull() &&
|
||||
*mTriggeredGCDeadline > aStart;
|
||||
if (!startedIdle) {
|
||||
nonIdleDuration = sliceDuration;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user