Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Unified Diff: third_party/WebKit/Source/platform/heap/ThreadState.h

Issue 1670463002: [Oilpan] Unify memory usage reporters of Oilpan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove atomic operations Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..c5e76cfd4e47824f357c7a615979e9c78415a9ec 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.h
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.h
@@ -520,6 +520,13 @@ public:
void leaveStaticReferenceRegistrationDisabledScope();
#endif
+ void reportMemoryToV8();
sof 2016/02/16 09:14:38 can be private (=> clearly delineating the ThreadS
peria 2016/02/17 02:31:26 Agree. Done.
+
+ void resetHeapCounters();
+ void increaseAllocatedObjectSize(size_t);
+ void decreaseAllocatedObjectSize(size_t);
+ void increaseMarkedObjectSize(size_t);
+
private:
enum SnapshotType {
HeapSnapshot,
@@ -678,6 +685,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_reportedMemoryToV8;
};
template<ThreadAffinity affinity> class ThreadStateFor;

Powered by Google App Engine
This is Rietveld 408576698