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

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

Issue 1053793004: Add a UseCounter that measures the amount of memory used in PartitionAlloc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | « no previous file | 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 830a19bd69aa9c76d270eea8da03dabe42cb5360..aff253c5129de83312d42db8d762fbda2b159952 100644
--- a/Source/platform/heap/Heap.h
+++ b/Source/platform/heap/Heap.h
@@ -1018,23 +1018,14 @@ public:
static size_t allocatedObjectSize() { return acquireLoad(&s_allocatedObjectSize); }
static void increaseMarkedObjectSize(size_t delta) { atomicAdd(&s_markedObjectSize, static_cast<long>(delta)); }
static size_t markedObjectSize() { return acquireLoad(&s_markedObjectSize); }
- static void increaseAllocatedSpace(size_t delta)
- {
- atomicAdd(&s_allocatedSpace, static_cast<long>(delta));
- Heap::reportMemoryUsage();
- }
- static void decreaseAllocatedSpace(size_t delta)
- {
- atomicSubtract(&s_allocatedSpace, static_cast<long>(delta));
- // We don't need to report memory usage here because we report the usage
- // only when we see the highest memory usage we've ever seen.
- }
+ 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 double estimatedMarkingTime();
- static void reportMemoryUsage();
+ static void reportMemoryUsageHistogram();
// On object allocation, register the object's externally allocated memory.
static void increaseExternallyAllocatedBytes(size_t);
« no previous file with comments | « no previous file | Source/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698