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

Unified Diff: Source/platform/heap/Heap.cpp

Issue 1143243006: Revert of Oilpan: Implement a GC to take a heap snapshot (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | « Source/platform/heap/Heap.h ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.cpp
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
index 60728378e427c204c2b887a37ef1a038cf61736f..5b22fc005fe02f671dabda31ac24c08980abb24e 100644
--- a/Source/platform/heap/Heap.cpp
+++ b/Source/platform/heap/Heap.cpp
@@ -299,28 +299,6 @@
ASSERT(!m_firstUnsweptPage);
}
-void BaseHeap::makeConsistentForMutator()
-{
- clearFreeLists();
- ASSERT(isConsistentForGC());
- ASSERT(!m_firstPage);
-
- // Drop marks from marked objects and rebuild free lists in preparation for
- // resuming the executions of mutators.
- BasePage* previousPage = nullptr;
- for (BasePage* page = m_firstUnsweptPage; page; previousPage = page, page = page->next()) {
- page->makeConsistentForMutator();
- page->markAsSwept();
- }
- if (previousPage) {
- ASSERT(m_firstUnsweptPage);
- previousPage->m_next = m_firstPage;
- m_firstPage = m_firstUnsweptPage;
- m_firstUnsweptPage = nullptr;
- }
- ASSERT(!m_firstUnsweptPage);
-}
-
size_t BaseHeap::objectPayloadSizeForTesting()
{
ASSERT(isConsistentForGC());
@@ -342,7 +320,7 @@
void BaseHeap::prepareForSweep()
{
- ASSERT(threadState()->isInGC());
+ ASSERT(!threadState()->isInGC());
ASSERT(!m_firstUnsweptPage);
// Move all pages to a list of unswept pages.
@@ -1201,37 +1179,6 @@
Heap::increaseMarkedObjectSize(markedObjectSize);
}
-void NormalPage::makeConsistentForMutator()
-{
- size_t markedObjectSize = 0;
- Address startOfGap = payload();
- for (Address headerAddress = payload(); headerAddress < payloadEnd();) {
- HeapObjectHeader* header = reinterpret_cast<HeapObjectHeader*>(headerAddress);
- ASSERT(header->size() < blinkPagePayloadSize());
- // Check if a free list entry first since we cannot call
- // isMarked on a free list entry.
- if (header->isFree()) {
- headerAddress += header->size();
- continue;
- }
- header->checkHeader();
-
- if (startOfGap != headerAddress)
- heapForNormalPage()->addToFreeList(startOfGap, headerAddress - startOfGap);
- if (header->isMarked()) {
- header->unmark();
- markedObjectSize += header->size();
- }
- headerAddress += header->size();
- startOfGap = headerAddress;
- }
- if (startOfGap != payloadEnd())
- heapForNormalPage()->addToFreeList(startOfGap, payloadEnd() - startOfGap);
-
- if (markedObjectSize)
- Heap::increaseMarkedObjectSize(markedObjectSize);
-}
-
#if defined(ADDRESS_SANITIZER)
void NormalPage::poisonUnmarkedObjects()
{
@@ -1518,15 +1465,6 @@
Heap::increaseMarkedObjectSize(size());
} else {
header->markDead();
- }
-}
-
-void LargeObjectPage::makeConsistentForMutator()
-{
- HeapObjectHeader* header = heapObjectHeader();
- if (header->isMarked()) {
- header->unmark();
- Heap::increaseMarkedObjectSize(size());
}
}
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698