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

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

Issue 1375643002: [tracing] directly use memory-infra from blink -> base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
Index: third_party/WebKit/Source/platform/heap/ThreadState.cpp
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
index 4a91393bccf7902be634016cc1041ff86f795647..0221df4304a5ced3606d9cddb33ff666284c0b95 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -31,6 +31,8 @@
#include "config.h"
#include "platform/heap/ThreadState.h"
+#include "base/trace_event/memory_allocator_dump.h"
+#include "base/trace_event/process_memory_dump.h"
#include "platform/ScriptForbiddenScope.h"
#include "platform/TraceEvent.h"
#include "platform/heap/BlinkGCMemoryDumpProvider.h"
@@ -40,8 +42,6 @@
#include "platform/heap/MarkingVisitor.h"
#include "platform/heap/SafePoint.h"
#include "public/platform/Platform.h"
-#include "public/platform/WebMemoryAllocatorDump.h"
-#include "public/platform/WebProcessMemoryDump.h"
#include "public/platform/WebScheduler.h"
#include "public/platform/WebThread.h"
#include "public/platform/WebTraceLocation.h"
@@ -1548,7 +1548,7 @@ void ThreadState::takeSnapshot(SnapshotType type)
#if ENABLE(DETAILED_MEMORY_INFRA)
dumpName.append(Heap::gcInfo(gcInfoIndex)->className());
#endif
- WebMemoryAllocatorDump* classDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName);
+ base::trace_event::MemoryAllocatorDump* classDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName);
classDump->AddScalar("live_count", "objects", info.liveCount[gcInfoIndex]);
classDump->AddScalar("dead_count", "objects", info.deadCount[gcInfoIndex]);
classDump->AddScalar("live_size", "bytes", info.liveSize[gcInfoIndex]);
@@ -1560,14 +1560,14 @@ void ThreadState::takeSnapshot(SnapshotType type)
totalDeadSize += info.deadSize[gcInfoIndex];
}
- WebMemoryAllocatorDump* threadDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(threadDumpName);
+ base::trace_event::MemoryAllocatorDump* threadDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(threadDumpName);
threadDump->AddScalar("live_count", "objects", totalLiveCount);
threadDump->AddScalar("dead_count", "objects", totalDeadCount);
threadDump->AddScalar("live_size", "bytes", totalLiveSize);
threadDump->AddScalar("dead_size", "bytes", totalDeadSize);
- WebMemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(heapsDumpName);
- WebMemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(classesDumpName);
+ base::trace_event::MemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(heapsDumpName);
+ base::trace_event::MemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(classesDumpName);
BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->AddOwnershipEdge(classesDump->guid(), heapsDump->guid());
}

Powered by Google App Engine
This is Rietveld 408576698