| OLD | NEW |
| 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/full-codegen/full-codegen.h" | 9 #include "src/full-codegen/full-codegen.h" |
| 10 #include "src/heap/slots-buffer.h" | 10 #include "src/heap/slots-buffer.h" |
| (...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1597 Address new_top = old_top + aligned_size_in_bytes; | 1597 Address new_top = old_top + aligned_size_in_bytes; |
| 1598 Address soon_object = old_top + filler_size; | 1598 Address soon_object = old_top + filler_size; |
| 1599 InlineAllocationStep(new_top, new_top, soon_object, size_in_bytes); | 1599 InlineAllocationStep(new_top, new_top, soon_object, size_in_bytes); |
| 1600 UpdateInlineAllocationLimit(aligned_size_in_bytes); | 1600 UpdateInlineAllocationLimit(aligned_size_in_bytes); |
| 1601 } | 1601 } |
| 1602 return true; | 1602 return true; |
| 1603 } | 1603 } |
| 1604 | 1604 |
| 1605 | 1605 |
| 1606 void NewSpace::StartNextInlineAllocationStep() { | 1606 void NewSpace::StartNextInlineAllocationStep() { |
| 1607 DCHECK(!inline_allocation_observers_paused_); | 1607 if (!inline_allocation_observers_paused_) { |
| 1608 top_on_previous_step_ = | 1608 top_on_previous_step_ = |
| 1609 inline_allocation_observers_.length() ? allocation_info_.top() : 0; | 1609 inline_allocation_observers_.length() ? allocation_info_.top() : 0; |
| 1610 UpdateInlineAllocationLimit(0); | 1610 UpdateInlineAllocationLimit(0); |
| 1611 } |
| 1611 } | 1612 } |
| 1612 | 1613 |
| 1613 | 1614 |
| 1614 intptr_t NewSpace::GetNextInlineAllocationStepSize() { | 1615 intptr_t NewSpace::GetNextInlineAllocationStepSize() { |
| 1615 intptr_t next_step = 0; | 1616 intptr_t next_step = 0; |
| 1616 for (int i = 0; i < inline_allocation_observers_.length(); ++i) { | 1617 for (int i = 0; i < inline_allocation_observers_.length(); ++i) { |
| 1617 InlineAllocationObserver* o = inline_allocation_observers_[i]; | 1618 InlineAllocationObserver* o = inline_allocation_observers_[i]; |
| 1618 next_step = next_step ? Min(next_step, o->bytes_to_next_step()) | 1619 next_step = next_step ? Min(next_step, o->bytes_to_next_step()) |
| 1619 : o->bytes_to_next_step(); | 1620 : o->bytes_to_next_step(); |
| 1620 } | 1621 } |
| (...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3322 object->ShortPrint(); | 3323 object->ShortPrint(); |
| 3323 PrintF("\n"); | 3324 PrintF("\n"); |
| 3324 } | 3325 } |
| 3325 printf(" --------------------------------------\n"); | 3326 printf(" --------------------------------------\n"); |
| 3326 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3327 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3327 } | 3328 } |
| 3328 | 3329 |
| 3329 #endif // DEBUG | 3330 #endif // DEBUG |
| 3330 } // namespace internal | 3331 } // namespace internal |
| 3331 } // namespace v8 | 3332 } // namespace v8 |
| OLD | NEW |