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

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

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 | « Source/platform/heap/Heap.h ('k') | Source/platform/testing/RunAllTests.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.cpp
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
index b3146ffbe154f8fc880f7f58f631165c294de1e5..95c12c8a66d5516e2c94055761c10b50c4af93dc 100644
--- a/Source/platform/heap/Heap.cpp
+++ b/Source/platform/heap/Heap.cpp
@@ -44,6 +44,7 @@
#include "wtf/LeakAnnotations.h"
#include "wtf/MainThread.h"
#include "wtf/PageAllocator.h"
+#include "wtf/Partitions.h"
#include "wtf/PassOwnPtr.h"
#if ENABLE(GC_PROFILING)
#include "platform/TracedValue.h"
@@ -2292,6 +2293,8 @@ void Heap::collectGarbage(ThreadState::StackState stackState, ThreadState::GCTyp
Platform::current()->histogramCustomCounts("BlinkGC.TotalObjectSpace", Heap::allocatedObjectSize() / 1024, 0, 4 * 1024 * 1024, 50);
Platform::current()->histogramCustomCounts("BlinkGC.TotalAllocatedSpace", Heap::allocatedSpace() / 1024, 0, 4 * 1024 * 1024, 50);
Platform::current()->histogramEnumeration("BlinkGC.GCReason", reason, NumberOfGCReason);
+ Heap::reportMemoryUsageHistogram();
+ WTF::Partitions::reportMemoryUsageHistogram();
}
if (state->isMainThread())
@@ -2412,7 +2415,7 @@ double Heap::estimatedMarkingTime()
return s_estimatedMarkingTimePerByte * (Heap::allocatedObjectSize() + Heap::markedObjectSize());
}
-void Heap::reportMemoryUsage()
+void Heap::reportMemoryUsageHistogram()
{
static size_t supportedMaxSizeInMB = 4 * 1024;
static size_t observedMaxSizeInMB = 0;
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | Source/platform/testing/RunAllTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698