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

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

Issue 1149673002: Adding blink gc memory dump infrastructure for thread specific dumps. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing nits. Created 5 years, 7 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
« Source/platform/heap/Heap.cpp ('K') | « Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
{
« Source/platform/heap/Heap.cpp ('K') | « Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698