Chromium Code Reviews| Index: third_party/WebKit/Source/platform/heap/ThreadState.h |
| diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.h b/third_party/WebKit/Source/platform/heap/ThreadState.h |
| index d4ad238d2bfdb2a8a0e6bfa325e4ca729b3652a7..dc663b3e60291bc64ae805a4bb8da8e5490fcb5e 100644 |
| --- a/third_party/WebKit/Source/platform/heap/ThreadState.h |
| +++ b/third_party/WebKit/Source/platform/heap/ThreadState.h |
| @@ -520,6 +520,17 @@ public: |
| void leaveStaticReferenceRegistrationDisabledScope(); |
| #endif |
| + void adjustAmountOfMemory(); |
| + |
| + size_t heapSize(); |
| + size_t allocatedObjectSize() { return acquireLoad(&m_allocatedObjectSize); } |
| + size_t markedObjectSize() { return acquireLoad(&m_markedObjectSize); } |
|
haraken
2016/02/12 09:30:54
acquireLoad shouldn't be needed because m_allocate
peria
2016/02/15 04:16:59
Done.
|
| + |
| + void resetHeapSizes(); |
| + void increaseAllocatedObjectSize(size_t); |
| + void decreaseAllocatedObjectSize(size_t); |
| + void increaseMarkedObjectSize(size_t); |
| + |
| private: |
| enum SnapshotType { |
| HeapSnapshot, |
| @@ -678,6 +689,11 @@ private: |
| static const int likelyToBePromptlyFreedArraySize = (1 << 8); |
| static const int likelyToBePromptlyFreedArrayMask = likelyToBePromptlyFreedArraySize - 1; |
| OwnPtr<int[]> m_likelyToBePromptlyFreed; |
| + |
| + // Stats for heap memory of this thread. |
| + size_t m_allocatedObjectSize; |
| + size_t m_markedObjectSize; |
| + size_t m_prevReportedSize; |
| }; |
| template<ThreadAffinity affinity> class ThreadStateFor; |