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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 346 |
347 bool IncrementalMarking::WorthActivating() { | 347 bool IncrementalMarking::WorthActivating() { |
348 #ifndef DEBUG | 348 #ifndef DEBUG |
349 static const intptr_t kActivationThreshold = 8 * MB; | 349 static const intptr_t kActivationThreshold = 8 * MB; |
350 #else | 350 #else |
351 // TODO(gc) consider setting this to some low level so that some | 351 // TODO(gc) consider setting this to some low level so that some |
352 // debug tests run with incremental marking and some without. | 352 // debug tests run with incremental marking and some without. |
353 static const intptr_t kActivationThreshold = 0; | 353 static const intptr_t kActivationThreshold = 0; |
354 #endif | 354 #endif |
355 | 355 |
356 return FLAG_incremental_marking && | 356 return !FLAG_expose_gc && |
| 357 FLAG_incremental_marking && |
357 !Serializer::enabled() && | 358 !Serializer::enabled() && |
358 heap_->PromotedSpaceSize() > kActivationThreshold; | 359 heap_->PromotedSpaceSize() > kActivationThreshold; |
359 } | 360 } |
360 | 361 |
361 | 362 |
362 void IncrementalMarking::ActivateGeneratedStub(Code* stub) { | 363 void IncrementalMarking::ActivateGeneratedStub(Code* stub) { |
363 ASSERT(RecordWriteStub::GetMode(stub) == | 364 ASSERT(RecordWriteStub::GetMode(stub) == |
364 RecordWriteStub::STORE_BUFFER_ONLY); | 365 RecordWriteStub::STORE_BUFFER_ONLY); |
365 | 366 |
366 if (!IsMarking()) { | 367 if (!IsMarking()) { |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 bytes_rescanned_ = 0; | 820 bytes_rescanned_ = 0; |
820 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 821 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
821 } | 822 } |
822 | 823 |
823 | 824 |
824 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 825 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
825 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 826 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
826 } | 827 } |
827 | 828 |
828 } } // namespace v8::internal | 829 } } // namespace v8::internal |
OLD | NEW |