OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 329 |
330 void performIdleGC(double deadlineSeconds); | 330 void performIdleGC(double deadlineSeconds); |
331 void performIdleLazySweep(double deadlineSeconds); | 331 void performIdleLazySweep(double deadlineSeconds); |
332 | 332 |
333 void scheduleIdleGC(); | 333 void scheduleIdleGC(); |
334 void scheduleIdleLazySweep(); | 334 void scheduleIdleLazySweep(); |
335 void schedulePreciseGC(); | 335 void schedulePreciseGC(); |
336 void scheduleV8FollowupGCIfNeeded(V8GCType); | 336 void scheduleV8FollowupGCIfNeeded(V8GCType); |
337 void schedulePageNavigationGCIfNeeded(float estimatedRemovalRatio); | 337 void schedulePageNavigationGCIfNeeded(float estimatedRemovalRatio); |
338 void schedulePageNavigationGC(); | 338 void schedulePageNavigationGC(); |
| 339 void v8ContextCreated(); |
| 340 void v8ContextDisposed(); |
| 341 |
339 void scheduleGCIfNeeded(); | 342 void scheduleGCIfNeeded(); |
340 void setGCState(GCState); | 343 void setGCState(GCState); |
341 GCState gcState() const; | 344 GCState gcState() const; |
342 bool isInGC() const { return gcState() == GCRunning; } | 345 bool isInGC() const { return gcState() == GCRunning; } |
343 bool isSweepingInProgress() const | 346 bool isSweepingInProgress() const |
344 { | 347 { |
345 return gcState() == Sweeping || gcState() == SweepingAndPreciseGCSchedul
ed || gcState() == SweepingAndIdleGCScheduled; | 348 return gcState() == Sweeping || gcState() == SweepingAndPreciseGCSchedul
ed || gcState() == SweepingAndIdleGCScheduled; |
346 } | 349 } |
347 | 350 |
348 // A GC runs in the following sequence. | 351 // A GC runs in the following sequence. |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 intptr_t* m_endOfStack; | 783 intptr_t* m_endOfStack; |
781 void* m_safePointScopeMarker; | 784 void* m_safePointScopeMarker; |
782 Vector<Address> m_safePointStackCopy; | 785 Vector<Address> m_safePointStackCopy; |
783 bool m_atSafePoint; | 786 bool m_atSafePoint; |
784 InterruptorVector m_interruptors; | 787 InterruptorVector m_interruptors; |
785 bool m_sweepForbidden; | 788 bool m_sweepForbidden; |
786 size_t m_noAllocationCount; | 789 size_t m_noAllocationCount; |
787 size_t m_gcForbiddenCount; | 790 size_t m_gcForbiddenCount; |
788 int m_persistentAllocated; | 791 int m_persistentAllocated; |
789 int m_persistentFreed; | 792 int m_persistentFreed; |
| 793 int m_disposedV8ContextCount; |
790 BaseHeap* m_heaps[NumberOfHeaps]; | 794 BaseHeap* m_heaps[NumberOfHeaps]; |
791 | 795 |
792 int m_vectorBackingHeapIndex; | 796 int m_vectorBackingHeapIndex; |
793 size_t m_heapAges[NumberOfHeaps]; | 797 size_t m_heapAges[NumberOfHeaps]; |
794 size_t m_currentHeapAges; | 798 size_t m_currentHeapAges; |
795 | 799 |
796 bool m_isTerminating; | 800 bool m_isTerminating; |
797 GarbageCollectedMixinConstructorMarker* m_gcMixinMarker; | 801 GarbageCollectedMixinConstructorMarker* m_gcMixinMarker; |
798 | 802 |
799 bool m_shouldFlushHeapDoesNotContainCache; | 803 bool m_shouldFlushHeapDoesNotContainCache; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 }; | 842 }; |
839 | 843 |
840 template<> class ThreadStateFor<AnyThread> { | 844 template<> class ThreadStateFor<AnyThread> { |
841 public: | 845 public: |
842 static ThreadState* state() { return ThreadState::current(); } | 846 static ThreadState* state() { return ThreadState::current(); } |
843 }; | 847 }; |
844 | 848 |
845 } // namespace blink | 849 } // namespace blink |
846 | 850 |
847 #endif // ThreadState_h | 851 #endif // ThreadState_h |
OLD | NEW |