Commit 526f4dc6 authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Remove old_gen_exhausted_ state.

The AllocationResult already carries the information in which space the allocation failure happened.
BUG=

Review-Url: https://codereview.chromium.org/2333293002
Cr-Commit-Position: refs/heads/master@{#39387}
parent 2b1753ac
...@@ -365,8 +365,6 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space, ...@@ -365,8 +365,6 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
} }
if (allocation.To(&object)) { if (allocation.To(&object)) {
OnAllocationEvent(object, size_in_bytes); OnAllocationEvent(object, size_in_bytes);
} else {
old_gen_exhausted_ = true;
} }
return allocation; return allocation;
......
...@@ -112,7 +112,6 @@ Heap::Heap() ...@@ -112,7 +112,6 @@ Heap::Heap()
allocation_timeout_(0), allocation_timeout_(0),
#endif // DEBUG #endif // DEBUG
old_generation_allocation_limit_(initial_old_generation_size_), old_generation_allocation_limit_(initial_old_generation_size_),
old_gen_exhausted_(false),
inline_allocation_disabled_(false), inline_allocation_disabled_(false),
total_regexp_code_generated_(0), total_regexp_code_generated_(0),
tracer_(nullptr), tracer_(nullptr),
...@@ -282,15 +281,6 @@ GarbageCollector Heap::SelectGarbageCollector(AllocationSpace space, ...@@ -282,15 +281,6 @@ GarbageCollector Heap::SelectGarbageCollector(AllocationSpace space,
return MARK_COMPACTOR; return MARK_COMPACTOR;
} }
// Have allocation in OLD and LO failed?
if (old_gen_exhausted_) {
isolate_->counters()
->gc_compactor_caused_by_oldspace_exhaustion()
->Increment();
*reason = "old generations exhausted";
return MARK_COMPACTOR;
}
// Is there enough space left in OLD to guarantee that a scavenge can // Is there enough space left in OLD to guarantee that a scavenge can
// succeed? // succeed?
// //
...@@ -1341,7 +1331,6 @@ bool Heap::PerformGarbageCollection( ...@@ -1341,7 +1331,6 @@ bool Heap::PerformGarbageCollection(
UpdateOldGenerationAllocationCounter(); UpdateOldGenerationAllocationCounter();
// Perform mark-sweep with optional compaction. // Perform mark-sweep with optional compaction.
MarkCompact(); MarkCompact();
old_gen_exhausted_ = false;
old_generation_size_configured_ = true; old_generation_size_configured_ = true;
// This should be updated before PostGarbageCollectionProcessing, which // This should be updated before PostGarbageCollectionProcessing, which
// can cause another GC. Take into account the objects promoted during GC. // can cause another GC. Take into account the objects promoted during GC.
......
...@@ -2154,10 +2154,6 @@ class Heap { ...@@ -2154,10 +2154,6 @@ class Heap {
// generation and on every allocation in large object space. // generation and on every allocation in large object space.
intptr_t old_generation_allocation_limit_; intptr_t old_generation_allocation_limit_;
// Indicates that an allocation has failed in the old generation since the
// last GC.
bool old_gen_exhausted_;
// Indicates that inline bump-pointer allocation has been globally disabled // Indicates that inline bump-pointer allocation has been globally disabled
// for all spaces. This is used to disable allocations in generated code. // for all spaces. This is used to disable allocations in generated code.
bool inline_allocation_disabled_; bool inline_allocation_disabled_;
......
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