| Index: third_party/WebKit/Source/platform/heap/SafePoint.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/SafePoint.h b/third_party/WebKit/Source/platform/heap/SafePoint.h
|
| index 727b8cfca5cceef52e7da84e496784eb18f68831..4b1bfcd12243ebf1167ba2c9534a3678eaf74101 100644
|
| --- a/third_party/WebKit/Source/platform/heap/SafePoint.h
|
| +++ b/third_party/WebKit/Source/platform/heap/SafePoint.h
|
| @@ -96,65 +96,18 @@ class SafePointBarrier final {
|
| SafePointBarrier();
|
| ~SafePointBarrier();
|
|
|
| - // Request other attached threads that are not at safe points to park
|
| - // themselves on safepoints.
|
| - bool parkOthers();
|
| -
|
| - // Resume executions of other attached threads that are parked at
|
| - // the safe points.
|
| - void resumeOthers(bool barrierLocked = false);
|
| -
|
| - // Park this thread if there exists a request to park attached threads.
|
| - // This method must be called at a safe point.
|
| - void checkAndPark(ThreadState*, SafePointAwareMutexLocker* = nullptr);
|
| -
|
| void enterSafePoint(ThreadState*);
|
| void leaveSafePoint(ThreadState*, SafePointAwareMutexLocker* = nullptr);
|
|
|
| private:
|
| void doPark(ThreadState*, intptr_t* stackEnd);
|
| - static void parkAfterPushRegisters(SafePointBarrier* barrier,
|
| - ThreadState* state,
|
| - intptr_t* stackEnd) {
|
| - barrier->doPark(state, stackEnd);
|
| - }
|
| void doEnterSafePoint(ThreadState*, intptr_t* stackEnd);
|
| static void enterSafePointAfterPushRegisters(SafePointBarrier* barrier,
|
| ThreadState* state,
|
| intptr_t* stackEnd) {
|
| barrier->doEnterSafePoint(state, stackEnd);
|
| }
|
| -
|
| - // |m_unparkedThreadCount| tracks amount of unparked threads. It is
|
| - // positive if and only if a thread has requested the other threads
|
| - // to park themselves at safe-points in preparation for a GC.
|
| - //
|
| - // The last thread to park itself will make the counter hit zero
|
| - // and should notify GC-requesting thread that it is safe to proceed.
|
| - //
|
| - // If no other thread is waiting for other threads to park then
|
| - // this counter can be negative: if N threads are at safe-points
|
| - // the counter will be -N.
|
| - volatile int m_unparkedThreadCount;
|
| -
|
| - // |m_parkingRequested| is used to control the transition of threads parked
|
| - // at a safepoint back to running state. In the event a thread requests
|
| - // another GC, threads that have yet to leave their safepoint (due to lock
|
| - // contention, scheduling etc), shouldn't be allowed to leave, but continue
|
| - // being parked when they do end up getting to run.
|
| - //
|
| - // |m_parkingRequested| is set when parkOthers() runs, and cleared by
|
| - // resumeOthers(), when the global GC steps have completed.
|
| - //
|
| - // Threads that were parked after they were requested to and then signalled,
|
| - // check that no other thread has made another parking request when attempting
|
| - // to resume in doPark().
|
| - volatile int m_parkingRequested;
|
| -
|
| Mutex m_mutex;
|
| -
|
| - ThreadCondition m_parked;
|
| - ThreadCondition m_resume;
|
| };
|
|
|
| } // namespace blink
|
|
|