Index: Source/platform/heap/ThreadState.cpp |
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp |
index 3971b8206bada4336caa2e1b62f5e4394600ca45..e099cb51b46942f006899e56c39b8c1dc0df7e3d 100644 |
--- a/Source/platform/heap/ThreadState.cpp |
+++ b/Source/platform/heap/ThreadState.cpp |
@@ -1470,18 +1470,18 @@ void ThreadState::takeSnapshot(SnapshotType type) |
size_t totalDeadCount = 0; |
size_t totalLiveSize = 0; |
size_t totalDeadSize = 0; |
- for (size_t i = 1; i <= GCInfoTable::gcInfoIndex(); ++i) { |
- String dumpName = classesDumpName + "/" + Heap::gcInfo(i)->className(); |
+ for (size_t gcInfoIndex = 1; gcInfoIndex <= GCInfoTable::gcInfoIndex(); ++gcInfoIndex) { |
+ String dumpName = classesDumpName + String::format("/%zu_", gcInfoIndex) + Heap::gcInfo(gcInfoIndex)->className(); |
WebMemoryAllocatorDump* classDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName); |
- classDump->AddScalar("live_count", "objects", info.liveCount[i]); |
- classDump->AddScalar("dead_count", "objects", info.deadCount[i]); |
- classDump->AddScalar("live_size", "bytes", info.liveSize[i]); |
- classDump->AddScalar("dead_size", "bytes", info.deadSize[i]); |
- |
- totalLiveCount += info.liveCount[i]; |
- totalDeadCount += info.deadCount[i]; |
- totalLiveSize += info.liveSize[i]; |
- totalDeadSize += info.deadSize[i]; |
+ classDump->AddScalar("live_count", "objects", info.liveCount[gcInfoIndex]); |
+ classDump->AddScalar("dead_count", "objects", info.deadCount[gcInfoIndex]); |
+ classDump->AddScalar("live_size", "bytes", info.liveSize[gcInfoIndex]); |
+ classDump->AddScalar("dead_size", "bytes", info.deadSize[gcInfoIndex]); |
+ |
+ totalLiveCount += info.liveCount[gcInfoIndex]; |
+ totalDeadCount += info.deadCount[gcInfoIndex]; |
+ totalLiveSize += info.liveSize[gcInfoIndex]; |
+ totalDeadSize += info.deadSize[gcInfoIndex]; |
} |
WebMemoryAllocatorDump* threadDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(threadDumpName); |