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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 bool IncrementalMarking::WorthActivating() { | 339 bool IncrementalMarking::WorthActivating() { |
340 #ifndef DEBUG | 340 #ifndef DEBUG |
341 static const intptr_t kActivationThreshold = 8 * MB; | 341 static const intptr_t kActivationThreshold = 8 * MB; |
342 #else | 342 #else |
343 // TODO(gc) consider setting this to some low level so that some | 343 // TODO(gc) consider setting this to some low level so that some |
344 // debug tests run with incremental marking and some without. | 344 // debug tests run with incremental marking and some without. |
345 static const intptr_t kActivationThreshold = 0; | 345 static const intptr_t kActivationThreshold = 0; |
346 #endif | 346 #endif |
347 | 347 |
348 return FLAG_incremental_marking && | 348 return FLAG_incremental_marking && |
| 349 !Serializer::enabled() && |
349 heap_->PromotedSpaceSize() > kActivationThreshold; | 350 heap_->PromotedSpaceSize() > kActivationThreshold; |
350 } | 351 } |
351 | 352 |
352 | 353 |
353 void IncrementalMarking::ActivateGeneratedStub(Code* stub) { | 354 void IncrementalMarking::ActivateGeneratedStub(Code* stub) { |
354 ASSERT(RecordWriteStub::GetMode(stub) == | 355 ASSERT(RecordWriteStub::GetMode(stub) == |
355 RecordWriteStub::STORE_BUFFER_ONLY); | 356 RecordWriteStub::STORE_BUFFER_ONLY); |
356 | 357 |
357 if (!IsMarking()) { | 358 if (!IsMarking()) { |
358 // Initially stub is generated in STORE_BUFFER_ONLY mode thus | 359 // Initially stub is generated in STORE_BUFFER_ONLY mode thus |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 bytes_rescanned_ = 0; | 803 bytes_rescanned_ = 0; |
803 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 804 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
804 } | 805 } |
805 | 806 |
806 | 807 |
807 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 808 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
808 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 809 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
809 } | 810 } |
810 | 811 |
811 } } // namespace v8::internal | 812 } } // namespace v8::internal |
OLD | NEW |