[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}
This commit is contained in:
parent
2b1753ac94
commit
526f4dc676
@ -365,8 +365,6 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
|
||||
}
|
||||
if (allocation.To(&object)) {
|
||||
OnAllocationEvent(object, size_in_bytes);
|
||||
} else {
|
||||
old_gen_exhausted_ = true;
|
||||
}
|
||||
|
||||
return allocation;
|
||||
|
@ -112,7 +112,6 @@ Heap::Heap()
|
||||
allocation_timeout_(0),
|
||||
#endif // DEBUG
|
||||
old_generation_allocation_limit_(initial_old_generation_size_),
|
||||
old_gen_exhausted_(false),
|
||||
inline_allocation_disabled_(false),
|
||||
total_regexp_code_generated_(0),
|
||||
tracer_(nullptr),
|
||||
@ -282,15 +281,6 @@ GarbageCollector Heap::SelectGarbageCollector(AllocationSpace space,
|
||||
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
|
||||
// succeed?
|
||||
//
|
||||
@ -1341,7 +1331,6 @@ bool Heap::PerformGarbageCollection(
|
||||
UpdateOldGenerationAllocationCounter();
|
||||
// Perform mark-sweep with optional compaction.
|
||||
MarkCompact();
|
||||
old_gen_exhausted_ = false;
|
||||
old_generation_size_configured_ = true;
|
||||
// This should be updated before PostGarbageCollectionProcessing, which
|
||||
// can cause another GC. Take into account the objects promoted during GC.
|
||||
|
@ -2154,10 +2154,6 @@ class Heap {
|
||||
// generation and on every allocation in large object space.
|
||||
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
|
||||
// for all spaces. This is used to disable allocations in generated code.
|
||||
bool inline_allocation_disabled_;
|
||||
|
Loading…
Reference in New Issue
Block a user