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

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: Build fix. 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 fcd4eb8d5afbcab08df0a8c4fa1ed3c1e6bd14b5..ada0f794fca4fbe83e3413c331016717fbd7d652 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, static_cast<unsigned long>(++m_uid));
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