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

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

Issue 747363005: Oilpan: Introduce a state transition model for Oilpan GC states (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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.cpp ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/HeapTest.cpp
diff --git a/Source/platform/heap/HeapTest.cpp b/Source/platform/heap/HeapTest.cpp
index c14a8d8816d1df64ed7c4f5beddd62a5e00f9de8..30305a3f7027038edc6712f978a3791a4ba53ba5 100644
--- a/Source/platform/heap/HeapTest.cpp
+++ b/Source/platform/heap/HeapTest.cpp
@@ -198,7 +198,6 @@ public:
m_state->checkThread();
if (LIKELY(ThreadState::stopThreads())) {
Heap::enterGC();
- m_state->enterGC();
m_parkedAllThreads = true;
}
}
@@ -210,7 +209,6 @@ public:
// Only cleanup if we parked all threads in which case the GC happened
// and we need to resume the other threads.
if (LIKELY(m_parkedAllThreads)) {
- m_state->leaveGC();
Heap::leaveGC();
ThreadState::resumeThreads();
}
@@ -3353,7 +3351,7 @@ TEST(HeapTest, CheckAndMarkPointer)
{
TestGCScope scope(ThreadState::HeapPointersOnStack);
EXPECT_TRUE(scope.allThreadsParked()); // Fail the test if we could not park all threads.
- Heap::prepareForGC();
+ Heap::preGC();
Heap::flushHeapDoesNotContainCache();
for (size_t i = 0; i < objectAddresses.size(); i++) {
EXPECT_TRUE(Heap::checkAndMarkPointer(&visitor, objectAddresses[i]));
@@ -3365,6 +3363,7 @@ TEST(HeapTest, CheckAndMarkPointer)
EXPECT_TRUE(Heap::checkAndMarkPointer(&visitor, largeObjectEndAddress));
EXPECT_EQ(2ul, visitor.count());
visitor.reset();
+ Heap::postGC();
}
// This forces a GC without stack scanning which results in the objects
// being collected. This will also rebuild the above mentioned freelists,
@@ -3373,7 +3372,7 @@ TEST(HeapTest, CheckAndMarkPointer)
{
TestGCScope scope(ThreadState::HeapPointersOnStack);
EXPECT_TRUE(scope.allThreadsParked());
- Heap::prepareForGC();
+ Heap::preGC();
Heap::flushHeapDoesNotContainCache();
for (size_t i = 0; i < objectAddresses.size(); i++) {
// We would like to assert that checkAndMarkPointer returned false
@@ -3390,6 +3389,7 @@ TEST(HeapTest, CheckAndMarkPointer)
Heap::checkAndMarkPointer(&visitor, largeObjectAddress);
Heap::checkAndMarkPointer(&visitor, largeObjectEndAddress);
EXPECT_EQ(0ul, visitor.count());
+ Heap::postGC();
}
// This round of GC is important to make sure that the object start
// bitmap are cleared out and that the free lists are rebuild.
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698