Index: Source/platform/heap/ThreadState.cpp |
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp |
index c47c92bac6ba45ffcd42d4f139cde1877a0bc354..32e99e3b0ddd2d41608d02255369556e186d4d5b 100644 |
--- a/Source/platform/heap/ThreadState.cpp |
+++ b/Source/platform/heap/ThreadState.cpp |
@@ -379,6 +379,36 @@ void ThreadState::visitPersistents(Visitor* visitor) |
} |
} |
+void ThreadState::dumpMemory() |
+{ |
+#define SNAPSHOT_HEAP(HeapType) \ |
+ { \ |
+ String allocatorBaseName; \ |
+ if (isMainThread()) { \ |
+ allocatorBaseName = String("blink_gc/thread_main/heaps/" #HeapType); \ |
+ } \ |
+ else { \ |
+ allocatorBaseName = String::format("blink_gc/thread_%ld/heaps/" #HeapType, m_thread); \ |
+ } \ |
+ m_heaps[HeapType##HeapIndex]->dumpMemory(allocatorBaseName); \ |
+ } |
+ |
+ SNAPSHOT_HEAP(NormalPage1); |
+ SNAPSHOT_HEAP(NormalPage2); |
+ SNAPSHOT_HEAP(NormalPage3); |
+ SNAPSHOT_HEAP(NormalPage4); |
haraken
2015/05/26 12:21:59
We recently added "EagerSweep" :) Please just add
ssid
2015/05/27 13:15:06
Done.
|
+ SNAPSHOT_HEAP(Vector1); |
+ SNAPSHOT_HEAP(Vector2); |
+ SNAPSHOT_HEAP(Vector3); |
+ SNAPSHOT_HEAP(Vector4); |
+ SNAPSHOT_HEAP(InlineVector); |
+ SNAPSHOT_HEAP(HashTable); |
+ SNAPSHOT_HEAP(LargeObject); |
+ FOR_EACH_TYPED_HEAP(SNAPSHOT_HEAP); |
+ |
+#undef SNAPSHOT_HEAP |
+} |
+ |
#if ENABLE(GC_PROFILING) |
const GCInfo* ThreadState::findGCInfo(Address address) |
{ |