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

Unified Diff: Source/platform/PartitionAllocMemoryDumpProvider.cpp

Issue 1189173003: Adding thread id to PartitionAlloc memory dumps dumps for single process mode and bug fix. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@test
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/PartitionAllocMemoryDumpProvider.cpp
diff --git a/Source/platform/PartitionAllocMemoryDumpProvider.cpp b/Source/platform/PartitionAllocMemoryDumpProvider.cpp
index b85390454c8e74c2ff9f4c5a113ff61b436aa651..d0478aa694a46d8cb95ce9ec72e0a0562ba37cbf 100644
--- a/Source/platform/PartitionAllocMemoryDumpProvider.cpp
+++ b/Source/platform/PartitionAllocMemoryDumpProvider.cpp
@@ -8,6 +8,7 @@
#include "public/platform/WebMemoryAllocatorDump.h"
#include "public/platform/WebProcessMemoryDump.h"
#include "wtf/Partitions.h"
+#include "wtf/Threading.h"
namespace blink {
@@ -36,9 +37,9 @@ void PartitionStatsDumperImpl::partitionsDumpBucketStats(const char* partitionNa
ASSERT(memoryStats->isValid);
String dumpName;
if (memoryStats->isDirectMap)
- dumpName = String::format("partition_alloc/%s/directMap_%zu", partitionName, ++m_uid);
+ dumpName = String::format("partition_alloc/thread_%lu/%s/directMap_%lu", static_cast<unsigned long>(WTF::currentThread()), partitionName, ++m_uid);
haraken 2015/06/18 17:55:30 Instead of calling WTF::currentThread() here, can
ssid 2015/06/18 20:55:24 This module depends on Partitions.h, and Partition
else
- dumpName = String::format("partition_alloc/%s/bucket_%zu", partitionName, static_cast<size_t>(memoryStats->bucketSlotSize));
+ dumpName = String::format("partition_alloc/thread_%lu/%s/bucket_%u", static_cast<unsigned long>(WTF::currentThread()), partitionName, static_cast<unsigned>(memoryStats->bucketSlotSize));
WebMemoryAllocatorDump* allocatorDump = m_memoryDump->createMemoryAllocatorDump(dumpName);
allocatorDump->AddScalar("size", "bytes", memoryStats->residentBytes);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698