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

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
« no previous file with comments | « src/crankshaft/x87/lithium-x87.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2479 owner_->heap()->incremental_marking()->IsMarkingIncomplete() && 2479 owner_->heap()->incremental_marking()->IsMarkingIncomplete() &&
2480 FLAG_incremental_marking) { 2480 FLAG_incremental_marking) {
2481 int linear_size = owner_->RoundSizeDownToObjectAlignment(kThreshold); 2481 int linear_size = owner_->RoundSizeDownToObjectAlignment(kThreshold);
2482 // We don't want to give too large linear areas to the allocator while 2482 // We don't want to give too large linear areas to the allocator while
2483 // incremental marking is going on, because we won't check again whether 2483 // incremental marking is going on, because we won't check again whether
2484 // we want to do another increment until the linear area is used up. 2484 // we want to do another increment until the linear area is used up.
2485 owner_->Free(new_node->address() + size_in_bytes + linear_size, 2485 owner_->Free(new_node->address() + size_in_bytes + linear_size,
2486 new_node_size - size_in_bytes - linear_size); 2486 new_node_size - size_in_bytes - linear_size);
2487 owner_->SetTopAndLimit(new_node->address() + size_in_bytes, 2487 owner_->SetTopAndLimit(new_node->address() + size_in_bytes,
2488 new_node->address() + size_in_bytes + linear_size); 2488 new_node->address() + size_in_bytes + linear_size);
2489 } else if (bytes_left >= 0) { 2489 } else {
2490 DCHECK(bytes_left >= 0);
2490 // Normally we give the rest of the node to the allocator as its new 2491 // Normally we give the rest of the node to the allocator as its new
2491 // linear allocation area. 2492 // linear allocation area.
2492 owner_->SetTopAndLimit(new_node->address() + size_in_bytes, 2493 owner_->SetTopAndLimit(new_node->address() + size_in_bytes,
2493 new_node->address() + new_node_size); 2494 new_node->address() + new_node_size);
2494 } 2495 }
2495 2496
2496 owner_->AllocationStep(new_node->address(), size_in_bytes); 2497 owner_->AllocationStep(new_node->address(), size_in_bytes);
2497 2498
2498 return new_node; 2499 return new_node;
2499 } 2500 }
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
3225 object->ShortPrint(); 3226 object->ShortPrint();
3226 PrintF("\n"); 3227 PrintF("\n");
3227 } 3228 }
3228 printf(" --------------------------------------\n"); 3229 printf(" --------------------------------------\n");
3229 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3230 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3230 } 3231 }
3231 3232
3232 #endif // DEBUG 3233 #endif // DEBUG
3233 } // namespace internal 3234 } // namespace internal
3234 } // namespace v8 3235 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-x87.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698