| Index: Source/platform/heap/ThreadState.cpp
|
| diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp
|
| index 106c1c799bf7e811ad60b8e75f08e6a7595ae6a6..4cfc974c5ff7e034bebc0f62884121dde973c3b1 100644
|
| --- a/Source/platform/heap/ThreadState.cpp
|
| +++ b/Source/platform/heap/ThreadState.cpp
|
| @@ -959,11 +959,13 @@ void ThreadState::postGC(GCType gcType)
|
| } else if (gcType == GCWithoutSweep) {
|
| setGCState(LazySweepScheduled);
|
| } else {
|
| - takeSnapshot();
|
| + takeSnapshot(SnapshotType::HeapSnapshot);
|
|
|
| // This unmarks all marked objects and marks all unmarked objects dead.
|
| makeConsistentForMutator();
|
|
|
| + takeSnapshot(SnapshotType::FreelistSnapshot);
|
| +
|
| // Force setting NoGCScheduled to circumvent checkThread()
|
| // in setGCState().
|
| m_gcState = NoGCScheduled;
|
| @@ -1373,7 +1375,7 @@ void ThreadState::promptlyFreed(size_t gcInfoIndex)
|
| m_likelyToBePromptlyFreed[entryIndex] += 3;
|
| }
|
|
|
| -void ThreadState::takeSnapshot()
|
| +void ThreadState::takeSnapshot(SnapshotType type)
|
| {
|
| ASSERT(isInGC());
|
|
|
| @@ -1383,7 +1385,16 @@ void ThreadState::takeSnapshot()
|
| numberOfHeapsReported++; \
|
| String allocatorBaseName; \
|
| allocatorBaseName = String::format("blink_gc/thread_%lu/heaps/" #HeapType, (unsigned long)(m_thread)); \
|
| - m_heaps[HeapType##HeapIndex]->takeSnapshot(allocatorBaseName); \
|
| + switch (type) { \
|
| + case SnapshotType::HeapSnapshot: \
|
| + m_heaps[HeapType##HeapIndex]->takeSnapshot(allocatorBaseName); \
|
| + break; \
|
| + case SnapshotType::FreelistSnapshot: \
|
| + m_heaps[HeapType##HeapIndex]->takeFreelistSnapshot(allocatorBaseName); \
|
| + break; \
|
| + default: \
|
| + ASSERT_NOT_REACHED(); \
|
| + } \
|
| }
|
|
|
| SNAPSHOT_HEAP(NormalPage1);
|
|
|