Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: src/heap/spaces.cc

Issue 1899813003: [crankshaft] Fragmentation-free allocation folding. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/spaces.h" 5 #include "src/heap/spaces.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/base/platform/semaphore.h" 9 #include "src/base/platform/semaphore.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2476 owner_->heap()->incremental_marking()->IsMarkingIncomplete() && 2476 owner_->heap()->incremental_marking()->IsMarkingIncomplete() &&
2477 FLAG_incremental_marking) { 2477 FLAG_incremental_marking) {
2478 int linear_size = owner_->RoundSizeDownToObjectAlignment(kThreshold); 2478 int linear_size = owner_->RoundSizeDownToObjectAlignment(kThreshold);
2479 // We don't want to give too large linear areas to the allocator while 2479 // We don't want to give too large linear areas to the allocator while
2480 // incremental marking is going on, because we won't check again whether 2480 // incremental marking is going on, because we won't check again whether
2481 // we want to do another increment until the linear area is used up. 2481 // we want to do another increment until the linear area is used up.
2482 owner_->Free(new_node->address() + size_in_bytes + linear_size, 2482 owner_->Free(new_node->address() + size_in_bytes + linear_size,
2483 new_node_size - size_in_bytes - linear_size); 2483 new_node_size - size_in_bytes - linear_size);
2484 owner_->SetTopAndLimit(new_node->address() + size_in_bytes, 2484 owner_->SetTopAndLimit(new_node->address() + size_in_bytes,
2485 new_node->address() + size_in_bytes + linear_size); 2485 new_node->address() + size_in_bytes + linear_size);
2486 } else if (bytes_left > 0) { 2486 } else if (bytes_left >= 0) {
Michael Lippautz 2016/05/10 08:32:58 Still would rather see the else followed by a DCHE
Hannes Payer (out of office) 2016/05/10 09:04:44 Done.
2487 // Normally we give the rest of the node to the allocator as its new 2487 // Normally we give the rest of the node to the allocator as its new
2488 // linear allocation area. 2488 // linear allocation area.
2489 owner_->SetTopAndLimit(new_node->address() + size_in_bytes, 2489 owner_->SetTopAndLimit(new_node->address() + size_in_bytes,
2490 new_node->address() + new_node_size); 2490 new_node->address() + new_node_size);
2491 } 2491 }
2492 2492
2493 owner_->AllocationStep(new_node->address(), size_in_bytes); 2493 owner_->AllocationStep(new_node->address(), size_in_bytes);
2494 2494
2495 return new_node; 2495 return new_node;
2496 } 2496 }
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
3222 object->ShortPrint(); 3222 object->ShortPrint();
3223 PrintF("\n"); 3223 PrintF("\n");
3224 } 3224 }
3225 printf(" --------------------------------------\n"); 3225 printf(" --------------------------------------\n");
3226 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3226 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3227 } 3227 }
3228 3228
3229 #endif // DEBUG 3229 #endif // DEBUG
3230 } // namespace internal 3230 } // namespace internal
3231 } // namespace v8 3231 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698