Commit 8930ad2b authored by Hannes Payer's avatar Hannes Payer Committed by Commit Bot

[heap] Flip between large object and new large object allocation mode based on...

[heap] Flip between large object and new large object allocation mode based on --young_generation_large_objects.

Bug: chromium:852420
Change-Id: I5bb03c6ab14b4e42988e917f7ca7d449d53723d8
Reviewed-on: https://chromium-review.googlesource.com/c/1350995Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57849}
parent a8673918
...@@ -177,21 +177,16 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space, ...@@ -177,21 +177,16 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
IncrementObjectCounters(); IncrementObjectCounters();
#endif #endif
bool large_object = !FLAG_young_generation_large_objects && bool large_object = size_in_bytes > kMaxRegularHeapObjectSize;
size_in_bytes > kMaxRegularHeapObjectSize;
bool new_large_object = FLAG_young_generation_large_objects &&
size_in_bytes > kMaxRegularHeapObjectSize;
HeapObject* object = nullptr; HeapObject* object = nullptr;
AllocationResult allocation; AllocationResult allocation;
if (NEW_SPACE == space) { if (NEW_SPACE == space) {
if (large_object) { if (large_object) {
space = LO_SPACE; // TODO(hpayer): Implement a LO tenuring strategy.
space = FLAG_young_generation_large_objects ? NEW_LO_SPACE : LO_SPACE;
} else { } else {
if (new_large_object) { allocation = new_space_->AllocateRaw(size_in_bytes, alignment);
allocation = new_lo_space_->AllocateRaw(size_in_bytes);
} else {
allocation = new_space_->AllocateRaw(size_in_bytes, alignment);
}
if (allocation.To(&object)) { if (allocation.To(&object)) {
OnAllocationEvent(object, size_in_bytes); OnAllocationEvent(object, size_in_bytes);
} }
......
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