OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 bool success = marking_deque_memory_->Uncommit( | 555 bool success = marking_deque_memory_->Uncommit( |
556 reinterpret_cast<Address>(marking_deque_memory_->address()), | 556 reinterpret_cast<Address>(marking_deque_memory_->address()), |
557 marking_deque_memory_->size()); | 557 marking_deque_memory_->size()); |
558 CHECK(success); | 558 CHECK(success); |
559 marking_deque_memory_committed_ = false; | 559 marking_deque_memory_committed_ = false; |
560 } | 560 } |
561 } | 561 } |
562 | 562 |
563 | 563 |
564 void IncrementalMarking::Start() { | 564 void IncrementalMarking::Start() { |
| 565 ASSERT(!heap_->mark_compact_collector()->IsConcurrentSweepingInProgress()); |
565 if (FLAG_trace_incremental_marking) { | 566 if (FLAG_trace_incremental_marking) { |
566 PrintF("[IncrementalMarking] Start\n"); | 567 PrintF("[IncrementalMarking] Start\n"); |
567 } | 568 } |
568 ASSERT(FLAG_incremental_marking); | 569 ASSERT(FLAG_incremental_marking); |
569 ASSERT(state_ == STOPPED); | 570 ASSERT(state_ == STOPPED); |
570 | 571 |
571 ResetStepCounters(); | 572 ResetStepCounters(); |
572 | 573 |
573 if (heap_->old_pointer_space()->IsSweepingComplete() && | 574 if (heap_->IsSweepingComplete()) { |
574 heap_->old_data_space()->IsSweepingComplete()) { | |
575 StartMarking(ALLOW_COMPACTION); | 575 StartMarking(ALLOW_COMPACTION); |
576 } else { | 576 } else { |
577 if (FLAG_trace_incremental_marking) { | 577 if (FLAG_trace_incremental_marking) { |
578 PrintF("[IncrementalMarking] Start sweeping.\n"); | 578 PrintF("[IncrementalMarking] Start sweeping.\n"); |
579 } | 579 } |
580 state_ = SWEEPING; | 580 state_ = SWEEPING; |
581 } | 581 } |
582 | 582 |
583 heap_->new_space()->LowerInlineAllocationLimit(kAllocatedThreshold); | 583 heap_->new_space()->LowerInlineAllocationLimit(kAllocatedThreshold); |
584 } | 584 } |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 bytes_scanned_ = 0; | 1003 bytes_scanned_ = 0; |
1004 write_barriers_invoked_since_last_step_ = 0; | 1004 write_barriers_invoked_since_last_step_ = 0; |
1005 } | 1005 } |
1006 | 1006 |
1007 | 1007 |
1008 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 1008 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
1009 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); | 1009 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); |
1010 } | 1010 } |
1011 | 1011 |
1012 } } // namespace v8::internal | 1012 } } // namespace v8::internal |
OLD | NEW |