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

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

Issue 1317563005: Fix binary size increase because of class name loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix build. Created 5 years, 3 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/GCInfo.h ('k') | Source/platform/heap/Visitor.h » ('j') | 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 f7bee8ce16c2d34cb1f0cb8b76b983f3f05619c8..2864812a95a58e718f9de079e71b7f44214cf213 100644
--- a/Source/platform/heap/ThreadState.cpp
+++ b/Source/platform/heap/ThreadState.cpp
@@ -1493,7 +1493,10 @@ void ThreadState::takeSnapshot(SnapshotType type)
size_t totalLiveSize = 0;
size_t totalDeadSize = 0;
for (size_t gcInfoIndex = 1; gcInfoIndex <= GCInfoTable::gcInfoIndex(); ++gcInfoIndex) {
- String dumpName = classesDumpName + String::format("/%zu_", gcInfoIndex) + Heap::gcInfo(gcInfoIndex)->className();
+ String dumpName = classesDumpName + String::format("/%lu_", static_cast<unsigned long>(gcInfoIndex));
+#if ENABLE(GC_PROFILING)
+ dumpName += Heap::gcInfo(gcInfoIndex)->className();
sof 2015/09/03 07:14:20 Did this compile? We don't provide += over String,
+#endif
WebMemoryAllocatorDump* classDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName);
classDump->AddScalar("live_count", "objects", info.liveCount[gcInfoIndex]);
classDump->AddScalar("dead_count", "objects", info.deadCount[gcInfoIndex]);
« no previous file with comments | « Source/platform/heap/GCInfo.h ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698