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

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

Issue 1192803003: Fixing blink gc dump provider to have thread id in path for single process mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing build Created 5 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
« no previous file with comments | « no previous file | Source/platform/heap/BlinkGCMemoryDumpProviderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
diff --git a/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp b/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
index 9878d7c1f370bac505c6f9c69a809dfe99295691..af8dbfe9d6e6fd2d9169c176875989545416ff3c 100644
--- a/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
+++ b/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
@@ -9,6 +9,7 @@
#include "public/platform/WebMemoryAllocatorDump.h"
#include "public/platform/WebProcessMemoryDump.h"
#include "wtf/StdLibExtras.h"
+#include "wtf/Threading.h"
namespace blink {
@@ -20,11 +21,13 @@ BlinkGCMemoryDumpProvider* BlinkGCMemoryDumpProvider::instance()
bool BlinkGCMemoryDumpProvider::onMemoryDump(blink::WebProcessMemoryDump* memoryDump)
{
- WebMemoryAllocatorDump* allocatorDump = memoryDump->createMemoryAllocatorDump("blink_gc");
+ String dumpName = String::format("blink_gc/thread_%lu", static_cast<unsigned long>(WTF::currentThread()));
+ WebMemoryAllocatorDump* allocatorDump = memoryDump->createMemoryAllocatorDump(dumpName);
allocatorDump->AddScalar("size", "bytes", Heap::allocatedSpace());
- WebMemoryAllocatorDump* objectsDump = memoryDump->createMemoryAllocatorDump("blink_gc/allocated_objects");
- objectsDump->AddScalar("size", "bytes", Heap::allocatedObjectSize());
+ dumpName.append("/allocated_objects");
+ WebMemoryAllocatorDump* objectsDump = memoryDump->createMemoryAllocatorDump(dumpName);
+ objectsDump->AddScalar("size", "bytes", Heap::allocatedObjectSize() + Heap::markedObjectSize());
objectsDump->AddScalar("estimated_live_object_size", "bytes", Heap::estimatedLiveObjectSize());
return true;
« no previous file with comments | « no previous file | Source/platform/heap/BlinkGCMemoryDumpProviderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698