Commit 1abc28e3 authored by Hannes Payer's avatar Hannes Payer Committed by Commit Bot

[heap] Remove large object tenure limit for now.

Bug: chromium:852420
Change-Id: Ie0a6eeb42b57db2309403acd23e986f73cb33afe
Reviewed-on: https://chromium-review.googlesource.com/c/1350123
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57824}
parent 4a97d533
......@@ -234,10 +234,6 @@ constexpr int kExternalAllocationSoftLimit =
// Current value: Page::kAllocatableMemory (on 32-bit arch) - 512 (slack).
constexpr int kMaxRegularHeapObjectSize = 507136;
// Objects smaller or equal kMaxNewSpaceHeapObjectSize are allocated in the
// new large object space.
constexpr int kMaxNewSpaceHeapObjectSize = 32 * KB;
constexpr int kBitsPerByte = 8;
constexpr int kBitsPerByteLog2 = 3;
constexpr int kBitsPerSystemPointer = kSystemPointerSize * kBitsPerByte;
......
......@@ -177,9 +177,10 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
IncrementObjectCounters();
#endif
bool large_object = size_in_bytes > kMaxRegularHeapObjectSize;
bool large_object = !FLAG_young_generation_large_objects &&
size_in_bytes > kMaxRegularHeapObjectSize;
bool new_large_object = FLAG_young_generation_large_objects &&
size_in_bytes > kMaxNewSpaceHeapObjectSize;
size_in_bytes > kMaxRegularHeapObjectSize;
HeapObject* object = nullptr;
AllocationResult allocation;
if (NEW_SPACE == space) {
......
......@@ -220,7 +220,7 @@ SlotCallbackResult Scavenger::RememberedSetEntryNeeded(
bool Scavenger::HandleLargeObject(Map map, HeapObject* object,
int object_size) {
if (V8_UNLIKELY(FLAG_young_generation_large_objects &&
object_size > kMaxNewSpaceHeapObjectSize)) {
object_size > kMaxRegularHeapObjectSize)) {
DCHECK_EQ(NEW_LO_SPACE,
MemoryChunk::FromHeapObject(object)->owner()->identity());
if (object->map_slot().Release_CompareAndSwap(
......
......@@ -60,7 +60,7 @@ class EmbedderDataArray : public HeapObjectPtr {
class BodyDescriptor;
static const int kMaxSize = kMaxNewSpaceHeapObjectSize;
static const int kMaxSize = kMaxRegularHeapObjectSize;
static constexpr int kMaxLength =
(kMaxSize - kHeaderSize) / kEmbedderDataSlotSize;
......
......@@ -5735,13 +5735,9 @@ TEST(YoungGenerationLargeObjectAllocationScavenge) {
Isolate* isolate = heap->isolate();
if (!isolate->serializer_enabled()) return;
Handle<FixedArray> array = isolate->factory()->NewFixedArray(200000);
MemoryChunk* chunk = MemoryChunk::FromAddress(array->address());
CHECK_EQ(LO_SPACE, chunk->owner()->identity());
CHECK(!chunk->IsFlagSet(MemoryChunk::IN_TO_SPACE));
Handle<FixedArray> array_small = isolate->factory()->NewFixedArray(20000);
chunk = MemoryChunk::FromAddress(array_small->address());
// TODO(hpayer): Update the test as soon as we have a tenure limit for LO.
Handle<FixedArray> array_small = isolate->factory()->NewFixedArray(200000);
MemoryChunk* chunk = MemoryChunk::FromAddress(array_small->address());
CHECK_EQ(NEW_LO_SPACE, chunk->owner()->identity());
CHECK(chunk->IsFlagSet(MemoryChunk::IN_TO_SPACE));
......@@ -5766,14 +5762,11 @@ TEST(YoungGenerationLargeObjectAllocationMarkCompact) {
v8::HandleScope scope(CcTest::isolate());
Heap* heap = CcTest::heap();
Isolate* isolate = heap->isolate();
if (!isolate->serializer_enabled()) return;
Handle<FixedArray> array = isolate->factory()->NewFixedArray(200000);
MemoryChunk* chunk = MemoryChunk::FromAddress(array->address());
CHECK_EQ(LO_SPACE, chunk->owner()->identity());
CHECK(!chunk->IsFlagSet(MemoryChunk::IN_TO_SPACE));
Handle<FixedArray> array_small = isolate->factory()->NewFixedArray(20000);
chunk = MemoryChunk::FromAddress(array_small->address());
// TODO(hpayer): Update the test as soon as we have a tenure limit for LO.
Handle<FixedArray> array_small = isolate->factory()->NewFixedArray(200000);
MemoryChunk* chunk = MemoryChunk::FromAddress(array_small->address());
CHECK_EQ(NEW_LO_SPACE, chunk->owner()->identity());
CHECK(chunk->IsFlagSet(MemoryChunk::IN_TO_SPACE));
......
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