| Index: Source/platform/heap/ThreadState.h
|
| diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
|
| index a5e834dd14f3c3e4c3282eae56cfdac53eefac0f..57cd0461b91eb51deaf415cfe897993089c77560 100644
|
| --- a/Source/platform/heap/ThreadState.h
|
| +++ b/Source/platform/heap/ThreadState.h
|
| @@ -479,10 +479,22 @@ public:
|
|
|
| // A region of PersistentNodes allocated on the given thread.
|
| PersistentRegion* persistentRegion() const { return m_persistentRegion.get(); }
|
| -
|
| // A region of PersistentNodes not owned by any particular thread.
|
| static CrossThreadPersistentRegion& crossThreadPersistentRegion();
|
|
|
| + // TODO(haraken): Currently CrossThreadPersistent handles are not counted.
|
| + // This wouldn't be a big deal because # of CrossThreadPersistents is small,
|
| + // but should be fixed.
|
| + void persistentAllocated()
|
| + {
|
| + ++m_persistentAllocated;
|
| + }
|
| + void persistentFreed()
|
| + {
|
| + ++m_persistentFreed;
|
| + }
|
| + void updatePersistentCounters();
|
| +
|
| // Visit local thread stack and trace all pointers conservatively.
|
| void visitStack(Visitor*);
|
|
|
| @@ -679,6 +691,8 @@ private:
|
| // Internal helper for GC policy handling code. Returns true if
|
| // an urgent conservative GC is now needed due to memory pressure.
|
| bool shouldForceMemoryPressureGC();
|
| + size_t estimatedLiveObjectSize();
|
| + size_t currentObjectSize();
|
|
|
| void runScheduledGC(StackState);
|
|
|
| @@ -738,6 +752,8 @@ private:
|
| bool m_sweepForbidden;
|
| size_t m_noAllocationCount;
|
| size_t m_gcForbiddenCount;
|
| + int m_persistentAllocated;
|
| + int m_persistentFreed;
|
| BaseHeap* m_heaps[NumberOfHeaps];
|
|
|
| int m_vectorBackingHeapIndex;
|
|
|