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

Unified Diff: Source/core/inspector/InspectorMemoryAgent.cpp

Issue 16896019: Replace RenderArena with PartitionAlloc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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: Source/core/inspector/InspectorMemoryAgent.cpp
diff --git a/Source/core/inspector/InspectorMemoryAgent.cpp b/Source/core/inspector/InspectorMemoryAgent.cpp
index 017c3626fe3a17417d5c8fe7267c9143d41b6654..6fa13c554019f7298db1e597db1328cb1fbabe3f 100644
--- a/Source/core/inspector/InspectorMemoryAgent.cpp
+++ b/Source/core/inspector/InspectorMemoryAgent.cpp
@@ -46,6 +46,7 @@
#include "core/page/Frame.h"
#include "core/page/Page.h"
#include "core/platform/MemoryUsageSupport.h"
+#include "core/platform/Partitions.h"
#include <wtf/ArrayBufferView.h>
#include <wtf/HashSet.h>
#include <wtf/MemoryInstrumentationArrayBufferView.h>
@@ -74,7 +75,7 @@ public:
m_sizesMap = sizesMap;
// FIXME: We filter out Rendering type because the coverage is not good enough at the moment
- // and report RenderArena size instead.
+ // and report rendering partition size instead.
for (TypeNameToSizeMap::iterator i = m_sizesMap.begin(); i != m_sizesMap.end(); ++i) {
if (i->key == PlatformMemoryTypes::Rendering) {
m_sizesMap.remove(i);
@@ -201,12 +202,14 @@ static void reportJSHeapInfo(WTF::MemoryInstrumentationClient& memoryInstrumenta
memoryInstrumentationClient.countObjectSize(0, WebCoreMemoryTypes::JSHeapUnused, info.totalJSHeapSize - info.usedJSHeapSize);
}
-static void reportRenderTreeInfo(WTF::MemoryInstrumentationClient& memoryInstrumentationClient, Page* page)
+static void reportRenderTreeInfo(WTF::MemoryInstrumentationClient& memoryInstrumentationClient, Page*)
{
- ArenaSize arenaSize = page->renderTreeSize();
+ size_t renderTreeSize = 0;
+#if ENABLE(PARTITION_ALLOC)
+ renderTreeSize = partitionAllocGetUsedPagesSize(*Partitions::getRenderingPartition());
+#endif
- memoryInstrumentationClient.countObjectSize(0, WebCoreMemoryTypes::RenderTreeUsed, arenaSize.treeSize);
- memoryInstrumentationClient.countObjectSize(0, WebCoreMemoryTypes::RenderTreeUnused, arenaSize.allocated - arenaSize.treeSize);
+ memoryInstrumentationClient.countObjectSize(0, WebCoreMemoryTypes::RenderTreeUsed, renderTreeSize);
}
namespace {

Powered by Google App Engine
This is Rietveld 408576698