| Index: third_party/WebKit/Source/platform/heap/ThreadState.cpp
|
| diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
|
| index 2b953d83646578b3e9c5c7f0e7d59d4642783a4a..7649f2f24aa2bde04ca28a192c2685cea493f0b4 100644
|
| --- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
|
| @@ -45,6 +45,7 @@
|
| #include "public/platform/WebScheduler.h"
|
| #include "public/platform/WebThread.h"
|
| #include "public/platform/WebTraceLocation.h"
|
| +#include "wtf/CurrentTime.h"
|
| #include "wtf/DataLog.h"
|
| #include "wtf/Partitions.h"
|
| #include "wtf/ThreadingPrimitives.h"
|
| @@ -728,7 +729,7 @@ void ThreadState::performIdleGC(double deadlineSeconds)
|
| if (gcState() != IdleGCScheduled)
|
| return;
|
|
|
| - double idleDeltaInSeconds = deadlineSeconds - Platform::current()->monotonicallyIncreasingTimeSeconds();
|
| + double idleDeltaInSeconds = deadlineSeconds - monotonicallyIncreasingTime();
|
| TRACE_EVENT2("blink_gc", "ThreadState::performIdleGC", "idleDeltaInSeconds", idleDeltaInSeconds, "estimatedMarkingTime", Heap::estimatedMarkingTime());
|
| if (idleDeltaInSeconds <= Heap::estimatedMarkingTime() && !Platform::current()->currentThread()->scheduler()->canExceedIdleDeadlineIfRequired()) {
|
| // If marking is estimated to take longer than the deadline and we can't
|
| @@ -755,7 +756,7 @@ void ThreadState::performIdleLazySweep(double deadlineSeconds)
|
| if (sweepForbidden())
|
| return;
|
|
|
| - TRACE_EVENT1("blink_gc", "ThreadState::performIdleLazySweep", "idleDeltaInSeconds", deadlineSeconds - Platform::current()->monotonicallyIncreasingTimeSeconds());
|
| + TRACE_EVENT1("blink_gc", "ThreadState::performIdleLazySweep", "idleDeltaInSeconds", deadlineSeconds - monotonicallyIncreasingTime());
|
|
|
| bool sweepCompleted = true;
|
| SweepForbiddenScope scope(this);
|
| @@ -767,7 +768,7 @@ void ThreadState::performIdleLazySweep(double deadlineSeconds)
|
| // lazySweepWithDeadline() won't check the deadline until it sweeps
|
| // 10 pages. So we give a small slack for safety.
|
| double slack = 0.001;
|
| - double remainingBudget = deadlineSeconds - slack - Platform::current()->monotonicallyIncreasingTimeSeconds();
|
| + double remainingBudget = deadlineSeconds - slack - monotonicallyIncreasingTime();
|
| if (remainingBudget <= 0 || !m_heaps[i]->lazySweepWithDeadline(deadlineSeconds)) {
|
| // We couldn't finish the sweeping within the deadline.
|
| // We request another idle task for the remaining sweeping.
|
|
|