Commit 9790e494 authored by hpayer's avatar hpayer Committed by Commit bot

Revert of [heap] Decrease large object limit for regular heap objects....

Revert of [heap] Decrease large object limit for regular heap objects. (patchset #3 id:40001 of https://codereview.chromium.org/1392823003/ )

Reason for revert:
broken tests

Original issue's description:
> [heap] Decrease large object limit for regular heap objects.
>
> Committed: https://crrev.com/e887d42342b3449f64fb6078f84f6c55bae3978d
> Cr-Commit-Position: refs/heads/master@{#31217}

TBR=mlippautz@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1402823002

Cr-Commit-Position: refs/heads/master@{#31219}
parent 18534dff
......@@ -133,12 +133,7 @@ HeapObject* HeapObjectIterator::FromCurrentPage() {
}
if (!obj->IsFiller()) {
if (obj->IsCode()) {
DCHECK_EQ(space_, space_->heap()->code_space());
DCHECK_CODEOBJECT_SIZE(obj_size, space_);
} else {
DCHECK_OBJECT_SIZE(obj_size);
}
return obj;
}
}
......
......@@ -86,9 +86,6 @@ class Isolate;
#define DCHECK_OBJECT_SIZE(size) \
DCHECK((0 < size) && (size <= Page::kMaxRegularHeapObjectSize))
#define DCHECK_CODEOBJECT_SIZE(size, code_space) \
DCHECK((0 < size) && (size <= code_space->AreaSize()))
#define DCHECK_PAGE_OFFSET(offset) \
DCHECK((Page::kObjectStartOffset <= offset) && (offset <= Page::kPageSize))
......@@ -843,7 +840,7 @@ class Page : public MemoryChunk {
// memory. This also applies to new space allocation, since objects are never
// migrated from new space to large object space. Takes double alignment into
// account.
static const int kMaxRegularHeapObjectSize = 128 * KB * (i::kPointerSize / 4);
static const int kMaxRegularHeapObjectSize = kPageSize - kObjectStartOffset;
static const int kAllocatableMemory = kPageSize - kObjectStartOffset;
......
......@@ -10048,14 +10048,9 @@ class JSArray: public JSObject {
static const int kLengthOffset = JSObject::kHeaderSize;
static const int kSize = kLengthOffset + kPointerSize;
// 128 * KB is the Page::kMaxRegularHeapObjectSize defined in spaces.h which
// we do not want to include in objects.h
// Note that Page::kMaxRegularHeapObjectSize has to be in sync with
// kInitialMaxFastElementArray which is checked in a DCHECK in heap.cc.
static const int kInitialMaxFastElementArray =
(128 * KB * (i::kPointerSize / 4) - FixedArray::kHeaderSize - kSize -
AllocationMemento::kSize) /
kPointerSize;
// Note that Page::kMaxRegularHeapObjectSize puts a limit on
// permissible values (see the DCHECK in heap.cc).
static const int kInitialMaxFastElementArray = 100000;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray);
......
......@@ -1223,15 +1223,15 @@ TEST(SerializeToplevelThreeBigStrings) {
CompileRun("a")
->ToString(CcTest::isolate()->GetCurrentContext())
.ToLocalChecked();
CHECK(heap->InSpace(*v8::Utils::OpenHandle(*result_str), LO_SPACE));
CHECK(heap->InSpace(*v8::Utils::OpenHandle(*result_str), OLD_SPACE));
result_str = CompileRun("b")
->ToString(CcTest::isolate()->GetCurrentContext())
.ToLocalChecked();
CHECK(heap->InSpace(*v8::Utils::OpenHandle(*result_str), LO_SPACE));
CHECK(heap->InSpace(*v8::Utils::OpenHandle(*result_str), OLD_SPACE));
result_str = CompileRun("c")
->ToString(CcTest::isolate()->GetCurrentContext())
.ToLocalChecked();
CHECK(heap->InSpace(*v8::Utils::OpenHandle(*result_str), LO_SPACE));
CHECK(heap->InSpace(*v8::Utils::OpenHandle(*result_str), OLD_SPACE));
delete cache;
source_a.Dispose();
......
......@@ -430,8 +430,7 @@ TEST(CompactionSpace) {
// and would thus neither grow, nor be able to allocate an object.
const int kNumObjects = 100;
const int kExpectedPages = (kNumObjects / (compaction_space->AreaSize() /
Page::kMaxRegularHeapObjectSize)) +
1;
Page::kMaxRegularHeapObjectSize));
for (int i = 0; i < kNumObjects; i++) {
compaction_space->AllocateRawUnaligned(Page::kMaxRegularHeapObjectSize)
.ToObjectChecked();
......
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