| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 } | 498 } |
| 499 } | 499 } |
| 500 | 500 |
| 501 | 501 |
| 502 void IncrementalMarking::StartMarking(CompactionFlag flag) { | 502 void IncrementalMarking::StartMarking(CompactionFlag flag) { |
| 503 if (FLAG_trace_incremental_marking) { | 503 if (FLAG_trace_incremental_marking) { |
| 504 PrintF("[IncrementalMarking] Start marking\n"); | 504 PrintF("[IncrementalMarking] Start marking\n"); |
| 505 } | 505 } |
| 506 | 506 |
| 507 is_compacting_ = !FLAG_never_compact && (flag == ALLOW_COMPACTION) && | 507 is_compacting_ = !FLAG_never_compact && (flag == ALLOW_COMPACTION) && |
| 508 heap_->mark_compact_collector()->StartCompaction(); | 508 heap_->mark_compact_collector()->StartCompaction( |
| 509 MarkCompactCollector::INCREMENTAL_COMPACTION); |
| 509 | 510 |
| 510 state_ = MARKING; | 511 state_ = MARKING; |
| 511 | 512 |
| 512 RecordWriteStub::Mode mode = is_compacting_ ? | 513 RecordWriteStub::Mode mode = is_compacting_ ? |
| 513 RecordWriteStub::INCREMENTAL_COMPACTION : RecordWriteStub::INCREMENTAL; | 514 RecordWriteStub::INCREMENTAL_COMPACTION : RecordWriteStub::INCREMENTAL; |
| 514 | 515 |
| 515 PatchIncrementalMarkingRecordWriteStubs(heap_, mode); | 516 PatchIncrementalMarkingRecordWriteStubs(heap_, mode); |
| 516 | 517 |
| 517 EnsureMarkingDequeIsCommitted(); | 518 EnsureMarkingDequeIsCommitted(); |
| 518 | 519 |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 917 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
| 917 bytes_scanned_ = 0; | 918 bytes_scanned_ = 0; |
| 918 } | 919 } |
| 919 | 920 |
| 920 | 921 |
| 921 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 922 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
| 922 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 923 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
| 923 } | 924 } |
| 924 | 925 |
| 925 } } // namespace v8::internal | 926 } } // namespace v8::internal |
| OLD | NEW |