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

Unified Diff: Source/platform/heap/Heap.h

Issue 1211573006: Oilpan: Count # of collected Persistent handles and use it to estimate the live object size (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/platform/heap/Handle.h ('k') | Source/platform/heap/Heap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.h
diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h
index 9ec099c2be51383cbfba67ff642858e096f63ddb..8eff54df56db192fb5a52cd3b30fd76e26df05c1 100644
--- a/Source/platform/heap/Heap.h
+++ b/Source/platform/heap/Heap.h
@@ -1015,9 +1015,16 @@ public:
static void increaseAllocatedSpace(size_t delta) { atomicAdd(&s_allocatedSpace, static_cast<long>(delta)); }
static void decreaseAllocatedSpace(size_t delta) { atomicSubtract(&s_allocatedSpace, static_cast<long>(delta)); }
static size_t allocatedSpace() { return acquireLoad(&s_allocatedSpace); }
- static size_t estimatedLiveObjectSize() { return acquireLoad(&s_estimatedLiveObjectSize); }
- static void setEstimatedLiveObjectSize(size_t size) { releaseStore(&s_estimatedLiveObjectSize, size); }
- static size_t externalObjectSizeAtLastGC() { return acquireLoad(&s_externalObjectSizeAtLastGC); }
+ static void increasePersistentCount(size_t delta) { atomicAdd(&s_persistentCount, static_cast<long>(delta)); }
+ static void decreasePersistentCount(size_t delta) { atomicSubtract(&s_persistentCount, static_cast<long>(delta)); }
+ static size_t persistentCount() { return acquireLoad(&s_persistentCount); }
+ static size_t persistentCountAtLastGC() { return acquireLoad(&s_persistentCountAtLastGC); }
+ static void increaseCollectedPersistentCount(size_t delta) { atomicAdd(&s_collectedPersistentCount, static_cast<long>(delta)); }
+ static size_t collectedPersistentCount() { return acquireLoad(&s_collectedPersistentCount); }
+ static size_t liveObjectSizeAtLastSweep() { return acquireLoad(&s_liveObjectSizeAtLastSweep); }
+ static void setLiveObjectSizeAtLastSweep(size_t size) { releaseStore(&s_liveObjectSizeAtLastSweep, size); }
+ static size_t heapSizePerPersistent() { return acquireLoad(&s_heapSizePerPersistent); }
+ static void setHeapSizePerPersistent(size_t size) { releaseStore(&s_heapSizePerPersistent, size); }
static double estimatedMarkingTime();
static void reportMemoryUsageHistogram();
@@ -1066,8 +1073,11 @@ private:
static size_t s_allocatedSpace;
static size_t s_allocatedObjectSize;
static size_t s_markedObjectSize;
- static size_t s_estimatedLiveObjectSize;
- static size_t s_externalObjectSizeAtLastGC;
+ static size_t s_persistentCount;
+ static size_t s_persistentCountAtLastGC;
+ static size_t s_collectedPersistentCount;
+ static size_t s_liveObjectSizeAtLastSweep;
+ static size_t s_heapSizePerPersistent;
static double s_estimatedMarkingTimePerByte;
friend class ThreadState;
« no previous file with comments | « Source/platform/heap/Handle.h ('k') | Source/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698