c59b81d7b8
This reverts commit 7a5a777c97
.
Reason for revert: crashing in test-api
Original change's description:
> [heap] Add mechanism for tracking invalidated slots per memory chunk.
>
> For correct slots recording in concurrent marker, we need to resolve
> the race that happens when
> 1) the mutator is invalidating slots for double unboxing or string
> conversions
> 2) and the concurrent marker is recording these slots.
>
> This patch adds a data-structure for tracking the invalidated objects.
> Thus we can allow the concurrent marker to record slots without
> worrying about clearing them. During old-to-old pointer updating phase
> we re-check all slots that belong to the invalidated objects.
>
> BUG=chromium:694255
>
> Change-Id: Ifc3d82918cd3b96e5a5fb7125691626a56f4ab83
> Reviewed-on: https://chromium-review.googlesource.com/591810
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47049}
TBR=ulan@chromium.org,mlippautz@chromium.org
Change-Id: I7f4f8e8cb027b921a82e9c0a0623536af02581fb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:694255
Reviewed-on: https://chromium-review.googlesource.com/595994
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47052}
81 lines
3.2 KiB
C++
81 lines
3.2 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/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(TestNewSpaceRefsInCopiedCode) \
|
|
V(GCFlags) \
|
|
V(MarkCompactCollector) \
|
|
V(NoPromotion) \
|
|
V(NumberStringCacheSize) \
|
|
V(ObjectGroups) \
|
|
V(Promotion) \
|
|
V(Regression39128) \
|
|
V(ResetWeakHandle) \
|
|
V(StressHandles) \
|
|
V(TestMemoryReducerSampleJsCalls) \
|
|
V(TestSizeOfObjects) \
|
|
V(Regress587004) \
|
|
V(Regress538257) \
|
|
V(Regress589413) \
|
|
V(Regress658718) \
|
|
V(Regress670675) \
|
|
V(Regress5831) \
|
|
V(RegressMissingWriteBarrierInAllocate) \
|
|
V(WriteBarriersInCopyJSObject)
|
|
|
|
#define HEAP_TEST(Name) \
|
|
CcTest register_test_##Name(v8::internal::HeapTester::Test##Name, __FILE__, \
|
|
#Name, true, true); \
|
|
void v8::internal::HeapTester::Test##Name()
|
|
|
|
#define UNINITIALIZED_HEAP_TEST(Name) \
|
|
CcTest register_test_##Name(v8::internal::HeapTester::Test##Name, __FILE__, \
|
|
#Name, true, false); \
|
|
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 {
|
|
|
|
template <typename T>
|
|
class Handle;
|
|
|
|
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_
|