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

Unified Diff: third_party/WebKit/Source/platform/heap/HeapPage.h

Issue 1700723002: Tidy heap snapshotting implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: zero initialize Created 4 years, 10 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 | third_party/WebKit/Source/platform/heap/HeapPage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/HeapPage.h
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.h b/third_party/WebKit/Source/platform/heap/HeapPage.h
index bea2e80660272ac676d24ae39822bf811891514f..683c3dae182954ba7fbe09f3e69e5f5850027c02 100644
--- a/third_party/WebKit/Source/platform/heap/HeapPage.h
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.h
@@ -129,7 +129,7 @@ class NormalPageHeap;
class OrphanedPagePool;
class PageMemory;
class PageMemoryRegion;
-class WebProcessMemoryDump;
+class WebMemoryAllocatorDump;
// HeapObjectHeader is 4 byte (32 bit) that has the following layout:
//
@@ -392,7 +392,14 @@ public:
virtual void checkAndMarkPointer(Visitor*, Address) = 0;
virtual void markOrphaned();
- virtual void takeSnapshot(String dumpBaseName, size_t pageIndex, ThreadState::GCSnapshotInfo&, size_t* outFreeSize, size_t* outFreeCount) = 0;
+ class HeapSnapshotInfo {
+ STACK_ALLOCATED();
+ public:
+ size_t freeCount = 0;
+ size_t freeSize = 0;
+ };
+
+ virtual void takeSnapshot(WebMemoryAllocatorDump*, ThreadState::GCSnapshotInfo&, HeapSnapshotInfo&) = 0;
#if ENABLE(ASSERT)
virtual bool contains(Address) = 0;
#endif
@@ -468,7 +475,7 @@ public:
void checkAndMarkPointer(Visitor*, Address) override;
void markOrphaned() override;
- void takeSnapshot(String dumpBaseName, size_t pageIndex, ThreadState::GCSnapshotInfo&, size_t* outFreeSize, size_t* outFreeCount) override;
+ void takeSnapshot(WebMemoryAllocatorDump*, ThreadState::GCSnapshotInfo&, HeapSnapshotInfo&) override;
#if ENABLE(ASSERT)
// Returns true for the whole blinkPageSize page that the page is on, even
// for the header, and the unmapped guard page at the start. That ensures
@@ -525,7 +532,7 @@ public:
void checkAndMarkPointer(Visitor*, Address) override;
void markOrphaned() override;
- void takeSnapshot(String dumpBaseName, size_t pageIndex, ThreadState::GCSnapshotInfo&, size_t* outFreeSize, size_t* outFreeCount) override;
+ void takeSnapshot(WebMemoryAllocatorDump*, ThreadState::GCSnapshotInfo&, HeapSnapshotInfo&) override;
#if ENABLE(ASSERT)
// Returns true for any address that is on one of the pages that this
// large object uses. That ensures that we can use a negative result to
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/HeapPage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698