Commit 7dea0f7b authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

Revert "[heap] Make aborting compaction a fatal"

This reverts commit 3c04ee6d.

Reason for revert: Speculative revert for OOMs in:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/18563

Original change's description:
> [heap] Make aborting compaction a fatal
> 
> Last attempt failed because of too agressive growing and no proper GC
> scheduling.
> 
> Also refactor live object iteration on the way to avoid a branch when we
> know that we will succeed.
> 
> Bug: chromium:651354
> Change-Id: I8f52cbc79ac293989fb7c29c492d4ae4afe5ebe4
> Reviewed-on: https://chromium-review.googlesource.com/544829
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46245}

TBR=ulan@chromium.org,mlippautz@chromium.org

Change-Id: Ifb9fd0c873c4ec6d4bd895f2978849cc2a223a05
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:651354
Reviewed-on: https://chromium-review.googlesource.com/549324Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46247}
parent 7a02ba0d
......@@ -728,8 +728,6 @@ DEFINE_BOOL(manual_evacuation_candidates_selection, false,
"candidates pages (requires --stress_compaction).")
DEFINE_BOOL(fast_promotion_new_space, false,
"fast promote new space on high survival rates")
DEFINE_BOOL(oom_on_compaction_failure, true,
"compaction failure results in an OOM")
// assembler-ia32.cc / assembler-arm.cc / assembler-x64.cc
DEFINE_BOOL(debug_code, DEBUG_BOOL,
......
This diff is collapsed.
......@@ -230,38 +230,28 @@ class LiveObjectRange {
Address end_;
};
class LiveObjectVisitor : AllStatic {
class LiveObjectVisitor BASE_EMBEDDED {
public:
enum IterationMode {
kKeepMarking,
kClearMarkbits,
};
// Visits black objects on a MemoryChunk until the Visitor returns |false| for
// an object. If IterationMode::kClearMarkbits is passed the markbits and
// slots for visited objects are cleared for each successfully visited object.
// Visits black objects on a MemoryChunk until the Visitor returns for an
// object. If IterationMode::kClearMarkbits is passed the markbits and slots
// for visited objects are cleared for each successfully visited object.
template <class Visitor>
static bool VisitBlackObjects(MemoryChunk* chunk, const MarkingState& state,
Visitor* visitor, IterationMode iteration_mode,
HeapObject** failed_object);
bool VisitBlackObjects(MemoryChunk* chunk, const MarkingState& state,
Visitor* visitor, IterationMode iteration_mode);
// Visits black objects on a MemoryChunk. The visitor is not allowed to fail
// visitation for an object.
// Visits grey objects on a Memorychunk. Is not allowed to fail visitation
// for an object.
template <class Visitor>
static void VisitBlackObjectsNoFail(MemoryChunk* chunk,
const MarkingState& state,
Visitor* visitor,
IterationMode iteration_mode);
bool VisitGreyObjectsNoFail(MemoryChunk* chunk, const MarkingState& state,
Visitor* visitor, IterationMode iteration_mode);
// Visits black objects on a MemoryChunk. The visitor is not allowed to fail
// visitation for an object.
template <class Visitor>
static void VisitGreyObjectsNoFail(MemoryChunk* chunk,
const MarkingState& state,
Visitor* visitor,
IterationMode iteration_mode);
static void RecomputeLiveBytes(MemoryChunk* chunk, const MarkingState& state);
private:
void RecomputeLiveBytes(MemoryChunk* chunk, const MarkingState& state);
};
enum PageEvacuationMode { NEW_TO_NEW, NEW_TO_OLD };
......
......@@ -41,7 +41,6 @@ void CheckAllObjectsOnPage(std::vector<Handle<FixedArray>>& handles,
} // namespace
HEAP_TEST(CompactionFullAbortedPage) {
FLAG_oom_on_compaction_failure = false;
if (FLAG_never_compact) return;
// Test the scenario where we reach OOM during compaction and the whole page
// is aborted.
......@@ -87,7 +86,6 @@ HEAP_TEST(CompactionFullAbortedPage) {
HEAP_TEST(CompactionPartiallyAbortedPage) {
FLAG_oom_on_compaction_failure = false;
if (FLAG_never_compact) return;
// Test the scenario where we reach OOM during compaction and parts of the
// page have already been migrated to a new one.
......@@ -163,7 +161,6 @@ HEAP_TEST(CompactionPartiallyAbortedPage) {
HEAP_TEST(CompactionPartiallyAbortedPageIntraAbortedPointers) {
FLAG_oom_on_compaction_failure = false;
if (FLAG_never_compact) return;
// Test the scenario where we reach OOM during compaction and parts of the
// page have already been migrated to a new one. Objects on the aborted page
......@@ -251,7 +248,6 @@ HEAP_TEST(CompactionPartiallyAbortedPageIntraAbortedPointers) {
HEAP_TEST(CompactionPartiallyAbortedPageWithStoreBufferEntries) {
FLAG_oom_on_compaction_failure = false;
if (FLAG_never_compact) return;
// Test the scenario where we reach OOM during compaction and parts of the
// page have already been migrated to a new one. Objects on the aborted page
......
......@@ -4854,7 +4854,6 @@ static void RequestInterrupt(const v8::FunctionCallbackInfo<v8::Value>& args) {
}
HEAP_TEST(Regress538257) {
FLAG_oom_on_compaction_failure = false;
FLAG_concurrent_marking = false;
FLAG_manual_evacuation_candidates_selection = true;
v8::Isolate::CreateParams create_params;
......@@ -5693,7 +5692,6 @@ HEAP_TEST(Regress587004) {
}
HEAP_TEST(Regress589413) {
FLAG_oom_on_compaction_failure = false;
if (!FLAG_incremental_marking) return;
FLAG_stress_compaction = true;
FLAG_manual_evacuation_candidates_selection = true;
......
......@@ -14592,7 +14592,6 @@ static void event_handler(const v8::JitCodeEvent* event) {
UNINITIALIZED_TEST(SetJitCodeEventHandler) {
i::FLAG_oom_on_compaction_failure = false;
i::FLAG_stress_compaction = true;
i::FLAG_incremental_marking = false;
if (i::FLAG_never_compact) return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment