86dd673c2c
Reason for revert: Bisection results show that this was not the culprit. Original issue's description: > Revert of [heap] Simplify distribution of remaining memory during sweeping & compaction (patchset #2 id:80001 of https://codereview.chromium.org/1653973003/ ) > > Reason for revert: > Very likely blocking roll: https://codereview.chromium.org/1652413003/ > > Original issue's description: > > [heap] Simplify distribution of remaining memory during sweeping & compaction > > > > BUG=chromium:524425 > > LOG=N > > > > Committed: https://crrev.com/f72923526ccaa8faef5c977267b0c074c4a44dfa > > Cr-Commit-Position: refs/heads/master@{#33668} > > TBR=hpayer@chromium.org,mlippautz@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=chromium:524425 > > Committed: https://crrev.com/a9441b0e7a2a56c2047482a3cc66e3ca2255444b > Cr-Commit-Position: refs/heads/master@{#33695} TBR=hpayer@chromium.org,mlippautz@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:524425 Review URL: https://codereview.chromium.org/1663013002 Cr-Commit-Position: refs/heads/master@{#33696}
68 lines
2.5 KiB
C++
68 lines
2.5 KiB
C++
// Copyright 2015 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef HEAP_HEAP_TESTER_H_
|
|
#define HEAP_HEAP_TESTER_H_
|
|
|
|
#include "src/handles.h"
|
|
#include "src/heap/spaces.h"
|
|
|
|
// Tests that should have access to private methods of {v8::internal::Heap}.
|
|
// Those tests need to be defined using HEAP_TEST(Name) { ... }.
|
|
#define HEAP_TEST_METHODS(V) \
|
|
V(CompactionFullAbortedPage) \
|
|
V(CompactionPartiallyAbortedPage) \
|
|
V(CompactionPartiallyAbortedPageIntraAbortedPointers) \
|
|
V(CompactionPartiallyAbortedPageWithStoreBufferEntries) \
|
|
V(CompactionSpaceDivideMultiplePages) \
|
|
V(CompactionSpaceDivideSinglePage) \
|
|
V(GCFlags) \
|
|
V(MarkCompactCollector) \
|
|
V(NoPromotion) \
|
|
V(NumberStringCacheSize) \
|
|
V(ObjectGroups) \
|
|
V(Promotion) \
|
|
V(Regression39128) \
|
|
V(ResetWeakHandle) \
|
|
V(StressHandles) \
|
|
V(TestMemoryReducerSampleJsCalls) \
|
|
V(TestSizeOfObjects) \
|
|
V(WriteBarriersInCopyJSObject)
|
|
|
|
|
|
#define HEAP_TEST(Name) \
|
|
CcTest register_test_##Name(v8::internal::HeapTester::Test##Name, __FILE__, \
|
|
#Name, NULL, true, true); \
|
|
void v8::internal::HeapTester::Test##Name()
|
|
|
|
|
|
#define THREADED_HEAP_TEST(Name) \
|
|
RegisterThreadedTest register_##Name(v8::internal::HeapTester::Test##Name, \
|
|
#Name); \
|
|
/* */ HEAP_TEST(Name)
|
|
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
class HeapTester {
|
|
public:
|
|
#define DECLARE_STATIC(Name) static void Test##Name();
|
|
|
|
HEAP_TEST_METHODS(DECLARE_STATIC)
|
|
#undef HEAP_TEST_METHODS
|
|
|
|
/* test-alloc.cc */
|
|
static AllocationResult AllocateAfterFailures();
|
|
static Handle<Object> TestAllocateAfterFailures();
|
|
|
|
/* test-api.cc */
|
|
static void ResetWeakHandle(bool global_gc);
|
|
};
|
|
|
|
} // namespace internal
|
|
} // namespace v8
|
|
|
|
#endif // HEAP_HEAP_TESTER_H_
|