Chromium Code Reviews| 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(true); |
|
Erik Corry
2012/02/07 08:12:58
If we are going to have boolean arguments we shoul
| |
| 509 | 509 |
| 510 state_ = MARKING; | 510 state_ = MARKING; |
| 511 | 511 |
| 512 RecordWriteStub::Mode mode = is_compacting_ ? | 512 RecordWriteStub::Mode mode = is_compacting_ ? |
| 513 RecordWriteStub::INCREMENTAL_COMPACTION : RecordWriteStub::INCREMENTAL; | 513 RecordWriteStub::INCREMENTAL_COMPACTION : RecordWriteStub::INCREMENTAL; |
| 514 | 514 |
| 515 PatchIncrementalMarkingRecordWriteStubs(heap_, mode); | 515 PatchIncrementalMarkingRecordWriteStubs(heap_, mode); |
| 516 | 516 |
| 517 EnsureMarkingDequeIsCommitted(); | 517 EnsureMarkingDequeIsCommitted(); |
| 518 | 518 |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 916 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 916 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
| 917 bytes_scanned_ = 0; | 917 bytes_scanned_ = 0; |
| 918 } | 918 } |
| 919 | 919 |
| 920 | 920 |
| 921 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 921 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
| 922 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 922 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
| 923 } | 923 } |
| 924 | 924 |
| 925 } } // namespace v8::internal | 925 } } // namespace v8::internal |
| OLD | NEW |