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

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

Issue 723513002: Oilpan: Refactor the way we calculate heap statistics (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 b0cc938c0a1af8471e22baafffd763ddeb8635b0..79e7d01e641633b71237bd57032f72528d1d4c4a 100644
--- a/Source/platform/heap/HeapTest.cpp
+++ b/Source/platform/heap/HeapTest.cpp
@@ -222,11 +222,11 @@ private:
bool m_parkedAllThreads; // False if we fail to park all threads
};
-static void getHeapStats(HeapStats* stats)
+static size_t objectPayloadSize()
{
TestGCScope scope(ThreadState::NoHeapPointersOnStack);
EXPECT_TRUE(scope.allThreadsParked());
- Heap::getStatsForTesting(stats);
+ return Heap::objectPayloadSizeForTesting();
}
#define DEFINE_VISITOR_METHODS(Type) \
@@ -369,14 +369,12 @@ private:
// Do several GCs to make sure that later GCs don't free up old memory from
// previously run tests in this process.
-static void clearOutOldGarbage(HeapStats* heapStats)
+static void clearOutOldGarbage()
{
while (true) {
- getHeapStats(heapStats);
- size_t used = heapStats->totalObjectSpace();
+ size_t used = objectPayloadSize();
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
- getHeapStats(heapStats);
- if (heapStats->totalObjectSpace() >= used)
+ if (objectPayloadSize() >= used)
break;
}
}
@@ -1515,17 +1513,17 @@ TEST(HeapTest, ThreadedWeakness)
TEST(HeapTest, BasicFunctionality)
{
- HeapStats heapStats;
- clearOutOldGarbage(&heapStats);
+ clearOutOldGarbage();
+ size_t initialObjectPayloadSize = objectPayloadSize();
{
size_t slack = 0;
// When the test starts there may already have been leaked some memory
// on the heap, so we establish a base line.
- size_t baseLevel = heapStats.totalObjectSpace();
+ size_t baseLevel = initialObjectPayloadSize;
bool testPagesAllocated = !baseLevel;
if (testPagesAllocated)
- EXPECT_EQ(heapStats.totalAllocatedSpace(), 0ul);
+ EXPECT_EQ(Heap::allocatedSpace(), 0ul);
// This allocates objects on the general heap which should add a page of memory.
DynamicallySizedObject* alloc32 = DynamicallySizedObject::create(32);
@@ -1537,10 +1535,9 @@ TEST(HeapTest, BasicFunctionality)
size_t total = 96;
- getHeapStats(&heapStats);
- CheckWithSlack(baseLevel + total, heapStats.totalObjectSpace(), slack);
+ CheckWithSlack(baseLevel + total, objectPayloadSize(), slack);
if (testPagesAllocated)
- EXPECT_EQ(heapStats.totalAllocatedSpace(), 2 * blinkPageSize);
+ EXPECT_EQ(Heap::allocatedSpace(), 2 * blinkPageSize);
EXPECT_EQ(alloc32->get(0), 40);
EXPECT_EQ(alloc32->get(31), 40);
@@ -1555,13 +1552,13 @@ TEST(HeapTest, BasicFunctionality)
EXPECT_EQ(alloc64->get(63), 27);
}
- clearOutOldGarbage(&heapStats);
+ clearOutOldGarbage();
size_t total = 0;
size_t slack = 0;
- size_t baseLevel = heapStats.totalObjectSpace();
+ size_t baseLevel = objectPayloadSize();
bool testPagesAllocated = !baseLevel;
if (testPagesAllocated)
- EXPECT_EQ(heapStats.totalAllocatedSpace(), 0ul);
+ EXPECT_EQ(Heap::allocatedSpace(), 0ul);
size_t big = 1008;
Persistent<DynamicallySizedObject> bigArea = DynamicallySizedObject::create(big);
@@ -1577,10 +1574,9 @@ TEST(HeapTest, BasicFunctionality)
total += size;
persistents[persistentCount++] = new Persistent<DynamicallySizedObject>(DynamicallySizedObject::create(size));
slack += 4;
- getHeapStats(&heapStats);
- CheckWithSlack(baseLevel + total, heapStats.totalObjectSpace(), slack);
+ CheckWithSlack(baseLevel + total, objectPayloadSize(), slack);
if (testPagesAllocated)
- EXPECT_EQ(0ul, heapStats.totalAllocatedSpace() & (blinkPageSize - 1));
+ EXPECT_EQ(0ul, Heap::allocatedSpace() & (blinkPageSize - 1));
}
{
@@ -1593,33 +1589,30 @@ TEST(HeapTest, BasicFunctionality)
EXPECT_TRUE(alloc32b != alloc64b);
total += 96;
- getHeapStats(&heapStats);
- CheckWithSlack(baseLevel + total, heapStats.totalObjectSpace(), slack);
+ CheckWithSlack(baseLevel + total, objectPayloadSize(), slack);
if (testPagesAllocated)
- EXPECT_EQ(0ul, heapStats.totalAllocatedSpace() & (blinkPageSize - 1));
+ EXPECT_EQ(0ul, Heap::allocatedSpace() & (blinkPageSize - 1));
}
- clearOutOldGarbage(&heapStats);
+ clearOutOldGarbage();
total -= 96;
slack -= 8;
if (testPagesAllocated)
- EXPECT_EQ(0ul, heapStats.totalAllocatedSpace() & (blinkPageSize - 1));
+ EXPECT_EQ(0ul, Heap::allocatedSpace() & (blinkPageSize - 1));
// Clear the persistent, so that the big area will be garbage collected.
bigArea.release();
- clearOutOldGarbage(&heapStats);
+ clearOutOldGarbage();
total -= big;
slack -= 4;
- getHeapStats(&heapStats);
- CheckWithSlack(baseLevel + total, heapStats.totalObjectSpace(), slack);
+ CheckWithSlack(baseLevel + total, objectPayloadSize(), slack);
if (testPagesAllocated)
- EXPECT_EQ(0ul, heapStats.totalAllocatedSpace() & (blinkPageSize - 1));
+ EXPECT_EQ(0ul, Heap::allocatedSpace() & (blinkPageSize - 1));
- getHeapStats(&heapStats);
- CheckWithSlack(baseLevel + total, heapStats.totalObjectSpace(), slack);
+ CheckWithSlack(baseLevel + total, objectPayloadSize(), slack);
if (testPagesAllocated)
- EXPECT_EQ(0ul, heapStats.totalAllocatedSpace() & (blinkPageSize - 1));
+ EXPECT_EQ(0ul, Heap::allocatedSpace() & (blinkPageSize - 1));
for (size_t i = 0; i < persistentCount; i++) {
delete persistents[i];
@@ -1643,15 +1636,12 @@ TEST(HeapTest, BasicFunctionality)
TEST(HeapTest, SimpleAllocation)
{
- HeapStats initialHeapStats;
- clearOutOldGarbage(&initialHeapStats);
- EXPECT_EQ(0ul, initialHeapStats.totalObjectSpace());
+ clearOutOldGarbage();
+ EXPECT_EQ(0ul, objectPayloadSize());
// Allocate an object in the heap.
HeapAllocatedArray* array = new HeapAllocatedArray();
- HeapStats statsAfterAllocation;
- getHeapStats(&statsAfterAllocation);
- EXPECT_TRUE(statsAfterAllocation.totalObjectSpace() >= sizeof(HeapAllocatedArray));
+ EXPECT_TRUE(objectPayloadSize() >= sizeof(HeapAllocatedArray));
// Sanity check of the contents in the heap.
EXPECT_EQ(0, array->at(0));
@@ -1822,10 +1812,10 @@ TEST(HeapTest, WideTest)
TEST(HeapTest, HashMapOfMembers)
{
- HeapStats initialHeapSize;
IntWrapper::s_destructorCalls = 0;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
+ size_t initialObjectPayloadSize = objectPayloadSize();
{
typedef HeapHashMap<
Member<IntWrapper>,
@@ -1837,14 +1827,12 @@ TEST(HeapTest, HashMapOfMembers)
Persistent<HeapObjectIdentityMap> map = new HeapObjectIdentityMap();
map->clear();
- HeapStats afterSetWasCreated;
- getHeapStats(&afterSetWasCreated);
- EXPECT_TRUE(afterSetWasCreated.totalObjectSpace() > initialHeapSize.totalObjectSpace());
+ size_t afterSetWasCreated = objectPayloadSize();
+ EXPECT_TRUE(afterSetWasCreated > initialObjectPayloadSize);
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
- HeapStats afterGC;
- getHeapStats(&afterGC);
- EXPECT_EQ(afterGC.totalObjectSpace(), afterSetWasCreated.totalObjectSpace());
+ size_t afterGC = objectPayloadSize();
+ EXPECT_EQ(afterGC, afterSetWasCreated);
// If the additions below cause garbage collections, these
// pointers should be found by conservative stack scanning.
@@ -1853,9 +1841,8 @@ TEST(HeapTest, HashMapOfMembers)
map->add(one, one);
- HeapStats afterOneAdd;
- getHeapStats(&afterOneAdd);
- EXPECT_TRUE(afterOneAdd.totalObjectSpace() > afterGC.totalObjectSpace());
+ size_t afterOneAdd = objectPayloadSize();
+ EXPECT_TRUE(afterOneAdd > afterGC);
HeapObjectIdentityMap::iterator it(map->begin());
HeapObjectIdentityMap::iterator it2(map->begin());
@@ -1871,9 +1858,8 @@ TEST(HeapTest, HashMapOfMembers)
// stack scanning as that could find a pointer to the
// old backing.
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
- HeapStats afterAddAndGC;
- getHeapStats(&afterAddAndGC);
- EXPECT_TRUE(afterAddAndGC.totalObjectSpace() >= afterOneAdd.totalObjectSpace());
+ size_t afterAddAndGC = objectPayloadSize();
+ EXPECT_TRUE(afterAddAndGC >= afterOneAdd);
EXPECT_EQ(map->size(), 2u); // Two different wrappings of '1' are distinct.
@@ -1885,9 +1871,8 @@ TEST(HeapTest, HashMapOfMembers)
EXPECT_EQ(gotten->value(), one->value());
EXPECT_EQ(gotten, one);
- HeapStats afterGC2;
- getHeapStats(&afterGC2);
- EXPECT_EQ(afterGC2.totalObjectSpace(), afterAddAndGC.totalObjectSpace());
+ size_t afterGC2 = objectPayloadSize();
+ EXPECT_EQ(afterGC2, afterAddAndGC);
IntWrapper* dozen = 0;
@@ -1898,44 +1883,42 @@ TEST(HeapTest, HashMapOfMembers)
if (i == 12)
dozen = iWrapper;
}
- HeapStats afterAdding1000;
- getHeapStats(&afterAdding1000);
- EXPECT_TRUE(afterAdding1000.totalObjectSpace() > afterGC2.totalObjectSpace());
+ size_t afterAdding1000 = objectPayloadSize();
+ EXPECT_TRUE(afterAdding1000 > afterGC2);
IntWrapper* gross(map->get(dozen));
EXPECT_EQ(gross->value(), 144);
// This should clear out any junk backings created by all the adds.
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
- HeapStats afterGC3;
- getHeapStats(&afterGC3);
- EXPECT_TRUE(afterGC3.totalObjectSpace() <= afterAdding1000.totalObjectSpace());
+ size_t afterGC3 = objectPayloadSize();
+ EXPECT_TRUE(afterGC3 <= afterAdding1000);
}
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
// The objects 'one', anotherOne, and the 999 other pairs.
EXPECT_EQ(IntWrapper::s_destructorCalls, 2000);
- HeapStats afterGC4;
- getHeapStats(&afterGC4);
- EXPECT_EQ(afterGC4.totalObjectSpace(), initialHeapSize.totalObjectSpace());
+ size_t afterGC4 = objectPayloadSize();
+ EXPECT_EQ(afterGC4, initialObjectPayloadSize);
}
TEST(HeapTest, NestedAllocation)
{
- HeapStats initialHeapSize;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
+ size_t initialObjectPayloadSize = objectPayloadSize();
{
Persistent<ConstructorAllocation> constructorAllocation = ConstructorAllocation::create();
}
- HeapStats afterFree;
- clearOutOldGarbage(&afterFree);
- EXPECT_TRUE(initialHeapSize == afterFree);
+ clearOutOldGarbage();
+ size_t afterFree = objectPayloadSize();
+ EXPECT_TRUE(initialObjectPayloadSize == afterFree);
}
TEST(HeapTest, LargeObjects)
{
- HeapStats initialHeapSize;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
+ size_t initialObjectPayloadSize = objectPayloadSize();
+ size_t initialAllocatedSpace = Heap::allocatedSpace();
IntWrapper::s_destructorCalls = 0;
LargeObject::s_destructorCalls = 0;
{
@@ -1950,41 +1933,38 @@ TEST(HeapTest, LargeObjects)
EXPECT_NE(info, ThreadState::current()->findGCInfo(reinterpret_cast<Address>(object.get()) + sizeof(LargeObject)));
EXPECT_NE(info, ThreadState::current()->findGCInfo(reinterpret_cast<Address>(object.get()) - 1));
#endif
- HeapStats afterAllocation;
- clearOutOldGarbage(&afterAllocation);
+ clearOutOldGarbage();
+ size_t afterAllocation = Heap::allocatedSpace();
{
object->set(0, 'a');
EXPECT_EQ('a', object->get(0));
object->set(object->length() - 1, 'b');
EXPECT_EQ('b', object->get(object->length() - 1));
- size_t expectedObjectSpace = sizeof(LargeObject) + sizeof(IntWrapper);
- size_t actualObjectSpace =
- afterAllocation.totalObjectSpace() - initialHeapSize.totalObjectSpace();
- CheckWithSlack(expectedObjectSpace, actualObjectSpace, slack);
+ size_t expectedObjectPayloadSize = sizeof(LargeObject) + sizeof(IntWrapper);
+ size_t actualObjectPayloadSize = objectPayloadSize() - initialObjectPayloadSize;
+ CheckWithSlack(expectedObjectPayloadSize, actualObjectPayloadSize, slack);
// There is probably space for the IntWrapper in a heap page without
// allocating extra pages. However, the IntWrapper allocation might cause
// the addition of a heap page.
size_t largeObjectAllocationSize =
sizeof(LargeObject) + sizeof(LargeHeapObject<FinalizedHeapObjectHeader>) + sizeof(FinalizedHeapObjectHeader);
- size_t allocatedSpaceLowerBound =
- initialHeapSize.totalAllocatedSpace() + largeObjectAllocationSize;
+ size_t allocatedSpaceLowerBound = initialAllocatedSpace + largeObjectAllocationSize;
size_t allocatedSpaceUpperBound = allocatedSpaceLowerBound + slack + blinkPageSize;
- EXPECT_LE(allocatedSpaceLowerBound, afterAllocation.totalAllocatedSpace());
- EXPECT_LE(afterAllocation.totalAllocatedSpace(), allocatedSpaceUpperBound);
+ EXPECT_LE(allocatedSpaceLowerBound, afterAllocation);
+ EXPECT_LE(afterAllocation, allocatedSpaceUpperBound);
EXPECT_EQ(0, IntWrapper::s_destructorCalls);
EXPECT_EQ(0, LargeObject::s_destructorCalls);
for (int i = 0; i < 10; i++)
object = LargeObject::create();
}
- HeapStats oneLargeObject;
- clearOutOldGarbage(&oneLargeObject);
- EXPECT_TRUE(oneLargeObject == afterAllocation);
+ clearOutOldGarbage();
+ EXPECT_TRUE(Heap::allocatedSpace() == afterAllocation);
EXPECT_EQ(10, IntWrapper::s_destructorCalls);
EXPECT_EQ(10, LargeObject::s_destructorCalls);
}
- HeapStats backToInitial;
- clearOutOldGarbage(&backToInitial);
- EXPECT_TRUE(initialHeapSize == backToInitial);
+ clearOutOldGarbage();
+ EXPECT_TRUE(initialObjectPayloadSize == objectPayloadSize());
+ EXPECT_TRUE(initialAllocatedSpace == Heap::allocatedSpace());
EXPECT_EQ(11, IntWrapper::s_destructorCalls);
EXPECT_EQ(11, LargeObject::s_destructorCalls);
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
@@ -2184,7 +2164,6 @@ bool dequeContains(HeapDeque<T, inlineCapacity>& deque, U u)
TEST(HeapTest, HeapCollectionTypes)
{
- HeapStats initialHeapSize;
IntWrapper::s_destructorCalls = 0;
typedef HeapHashMap<Member<IntWrapper>, Member<IntWrapper> > MemberMember;
@@ -2224,7 +2203,7 @@ TEST(HeapTest, HeapCollectionTypes)
Persistent<DequeUW> dequeUW2 = new DequeUW();
Persistent<Container> container = Container::create();
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
{
Persistent<IntWrapper> one(IntWrapper::create(1));
Persistent<IntWrapper> two(IntWrapper::create(2));
@@ -2507,8 +2486,7 @@ void SetIteratorCheck(T& it, const T& end, int expected)
TEST(HeapTest, HeapWeakCollectionSimple)
{
- HeapStats initialHeapStats;
- clearOutOldGarbage(&initialHeapStats);
+ clearOutOldGarbage();
IntWrapper::s_destructorCalls = 0;
PersistentHeapVector<Member<IntWrapper> > keepNumbersAlive;
@@ -2569,8 +2547,7 @@ TEST(HeapTest, HeapWeakCollectionSimple)
template<typename Set>
void orderedSetHelper(bool strong)
{
- HeapStats initialHeapStats;
- clearOutOldGarbage(&initialHeapStats);
+ clearOutOldGarbage();
IntWrapper::s_destructorCalls = 0;
PersistentHeapVector<Member<IntWrapper> > keepNumbersAlive;
@@ -2729,8 +2706,7 @@ struct ThingWithDestructorTraits : public HashTraits<ThingWithDestructor> {
static void heapMapDestructorHelper(bool clearMaps)
{
- HeapStats initialHeapStats;
- clearOutOldGarbage(&initialHeapStats);
+ clearOutOldGarbage();
ThingWithDestructor::s_liveThingsWithDestructor = 0;
typedef HeapHashMap<WeakMember<IntWrapper>, Member<RefCountedAndGarbageCollected> > RefMap;
@@ -2954,7 +2930,6 @@ TEST(HeapTest, HeapWeakPairs)
TEST(HeapTest, HeapWeakCollectionTypes)
{
- HeapStats initialHeapSize;
IntWrapper::s_destructorCalls = 0;
typedef HeapHashMap<WeakMember<IntWrapper>, Member<IntWrapper> > WeakStrong;
@@ -2963,7 +2938,7 @@ TEST(HeapTest, HeapWeakCollectionTypes)
typedef HeapHashSet<WeakMember<IntWrapper> > WeakSet;
typedef HeapLinkedHashSet<WeakMember<IntWrapper> > WeakOrderedSet;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
const int weakStrongIndex = 0;
const int strongWeakIndex = 1;
@@ -3349,8 +3324,7 @@ TEST(HeapTest, Comparisons)
TEST(HeapTest, CheckAndMarkPointer)
{
- HeapStats initialHeapStats;
- clearOutOldGarbage(&initialHeapStats);
+ clearOutOldGarbage();
Vector<Address> objectAddresses;
Vector<Address> endAddresses;
@@ -3393,7 +3367,7 @@ TEST(HeapTest, CheckAndMarkPointer)
// This forces a GC without stack scanning which results in the objects
// being collected. This will also rebuild the above mentioned freelists,
// however we don't rely on that below since we don't have any allocations.
- clearOutOldGarbage(&initialHeapStats);
+ clearOutOldGarbage();
{
TestGCScope scope(ThreadState::HeapPointersOnStack);
EXPECT_TRUE(scope.allThreadsParked());
@@ -3417,13 +3391,12 @@ TEST(HeapTest, CheckAndMarkPointer)
}
// This round of GC is important to make sure that the object start
// bitmap are cleared out and that the free lists are rebuild.
- clearOutOldGarbage(&initialHeapStats);
+ clearOutOldGarbage();
}
TEST(HeapTest, VisitOffHeapCollections)
{
- HeapStats initialHeapStats;
- clearOutOldGarbage(&initialHeapStats);
+ clearOutOldGarbage();
IntWrapper::s_destructorCalls = 0;
Persistent<OffHeapContainer> container = OffHeapContainer::create();
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
@@ -3435,7 +3408,6 @@ TEST(HeapTest, VisitOffHeapCollections)
TEST(HeapTest, PersistentHeapCollectionTypes)
{
- HeapStats initialHeapSize;
IntWrapper::s_destructorCalls = 0;
typedef HeapVector<Member<IntWrapper> > Vec;
@@ -3447,7 +3419,7 @@ TEST(HeapTest, PersistentHeapCollectionTypes)
typedef PersistentHeapHashMap<WeakMember<IntWrapper>, Member<IntWrapper> > WeakPMap;
typedef PersistentHeapDeque<Member<IntWrapper> > PDeque;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
{
PVec pVec;
PDeque pDeque;
@@ -3529,8 +3501,7 @@ TEST(HeapTest, PersistentHeapCollectionTypes)
TEST(HeapTest, CollectionNesting)
{
- HeapStats initialStats;
- clearOutOldGarbage(&initialStats);
+ clearOutOldGarbage();
int* key = &IntWrapper::s_destructorCalls;
IntWrapper::s_destructorCalls = 0;
typedef HeapVector<Member<IntWrapper> > IntVector;
@@ -3574,8 +3545,7 @@ TEST(HeapTest, CollectionNesting)
TEST(HeapTest, GarbageCollectedMixin)
{
- HeapStats initialHeapStats;
- clearOutOldGarbage(&initialHeapStats);
+ clearOutOldGarbage();
Persistent<UseMixin> usemixin = UseMixin::create();
EXPECT_EQ(0, UseMixin::s_traceCount);
@@ -3595,8 +3565,7 @@ TEST(HeapTest, GarbageCollectedMixin)
TEST(HeapTest, CollectionNesting2)
{
- HeapStats initialStats;
- clearOutOldGarbage(&initialStats);
+ clearOutOldGarbage();
void* key = &IntWrapper::s_destructorCalls;
IntWrapper::s_destructorCalls = 0;
typedef HeapHashSet<Member<IntWrapper> > IntSet;
@@ -3618,8 +3587,7 @@ TEST(HeapTest, CollectionNesting2)
TEST(HeapTest, CollectionNesting3)
{
- HeapStats initialStats;
- clearOutOldGarbage(&initialStats);
+ clearOutOldGarbage();
IntWrapper::s_destructorCalls = 0;
typedef HeapVector<Member<IntWrapper> > IntVector;
typedef HeapDeque<Member<IntWrapper> > IntDeque;
@@ -3649,8 +3617,7 @@ TEST(HeapTest, CollectionNesting3)
TEST(HeapTest, EmbeddedInVector)
{
- HeapStats initialStats;
- clearOutOldGarbage(&initialStats);
+ clearOutOldGarbage();
SimpleFinalizedObject::s_destructorCalls = 0;
{
PersistentHeapVector<VectorObject, 2> inlineVector;
@@ -3689,8 +3656,7 @@ TEST(HeapTest, EmbeddedInVector)
TEST(HeapTest, EmbeddedInDeque)
{
- HeapStats initialStats;
- clearOutOldGarbage(&initialStats);
+ clearOutOldGarbage();
SimpleFinalizedObject::s_destructorCalls = 0;
{
PersistentHeapDeque<VectorObject, 2> inlineDeque;
@@ -3749,8 +3715,7 @@ TEST(HeapTest, RawPtrInHash)
TEST(HeapTest, HeapTerminatedArray)
{
- HeapStats initialHeapSize;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
IntWrapper::s_destructorCalls = 0;
HeapTerminatedArray<TerminatedArrayItem>* arr = 0;
@@ -3804,8 +3769,7 @@ TEST(HeapTest, HeapTerminatedArray)
TEST(HeapTest, HeapLinkedStack)
{
- HeapStats initialHeapSize;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
IntWrapper::s_destructorCalls = 0;
HeapLinkedStack<TerminatedArrayItem>* stack = new HeapLinkedStack<TerminatedArrayItem>();
@@ -3832,8 +3796,7 @@ TEST(HeapTest, HeapLinkedStack)
TEST(HeapTest, AllocationDuringFinalization)
{
- HeapStats initialHeapSize;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
IntWrapper::s_destructorCalls = 0;
OneKiloByteObject::s_destructorCalls = 0;
@@ -3989,8 +3952,7 @@ TEST(HeapTest, MultipleMixins)
EXPECT_TRUE(s_isMixinTrue);
EXPECT_FALSE(s_isMixinFalse);
- HeapStats initialHeapSize;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
IntWrapper::s_destructorCalls = 0;
MultipleMixins* obj = new MultipleMixins();
{
@@ -4145,8 +4107,7 @@ TEST(HeapTest, MapWithCustomWeaknessHandling)
{
typedef HeapHashMap<PairWithWeakHandling, RefPtr<OffHeapInt> > Map;
typedef Map::iterator Iterator;
- HeapStats initialHeapSize;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
OffHeapInt::s_destructorCalls = 0;
Persistent<Map> map1(new Map());
@@ -4215,8 +4176,7 @@ TEST(HeapTest, MapWithCustomWeaknessHandling2)
{
typedef HeapHashMap<RefPtr<OffHeapInt>, PairWithWeakHandling> Map;
typedef Map::iterator Iterator;
- HeapStats initialHeapSize;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
OffHeapInt::s_destructorCalls = 0;
Persistent<Map> map1(new Map());
@@ -4360,8 +4320,7 @@ struct EmptyClearingHashSetTraits : HashTraits<WeakSet> {
// HeapHashSet.
TEST(HeapTest, RemoveEmptySets)
{
- HeapStats initialHeapSize;
- clearOutOldGarbage(&initialHeapSize);
+ clearOutOldGarbage();
OffHeapInt::s_destructorCalls = 0;
Persistent<IntWrapper> livingInt(IntWrapper::create(42));
« 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