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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 486 |
487 bool IncrementalMarking::WorthActivating() { | 487 bool IncrementalMarking::WorthActivating() { |
488 #ifndef DEBUG | 488 #ifndef DEBUG |
489 static const intptr_t kActivationThreshold = 8 * MB; | 489 static const intptr_t kActivationThreshold = 8 * MB; |
490 #else | 490 #else |
491 // TODO(gc) consider setting this to some low level so that some | 491 // TODO(gc) consider setting this to some low level so that some |
492 // debug tests run with incremental marking and some without. | 492 // debug tests run with incremental marking and some without. |
493 static const intptr_t kActivationThreshold = 0; | 493 static const intptr_t kActivationThreshold = 0; |
494 #endif | 494 #endif |
495 | 495 |
496 return !FLAG_expose_gc && | 496 return FLAG_incremental_marking && |
497 FLAG_incremental_marking && | |
498 !Serializer::enabled() && | 497 !Serializer::enabled() && |
499 heap_->PromotedSpaceSizeOfObjects() > kActivationThreshold; | 498 heap_->PromotedSpaceSizeOfObjects() > kActivationThreshold; |
500 } | 499 } |
501 | 500 |
502 | 501 |
503 void IncrementalMarking::ActivateGeneratedStub(Code* stub) { | 502 void IncrementalMarking::ActivateGeneratedStub(Code* stub) { |
504 ASSERT(RecordWriteStub::GetMode(stub) == | 503 ASSERT(RecordWriteStub::GetMode(stub) == |
505 RecordWriteStub::STORE_BUFFER_ONLY); | 504 RecordWriteStub::STORE_BUFFER_ONLY); |
506 | 505 |
507 if (!IsMarking()) { | 506 if (!IsMarking()) { |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 bytes_scanned_ = 0; | 995 bytes_scanned_ = 0; |
997 write_barriers_invoked_since_last_step_ = 0; | 996 write_barriers_invoked_since_last_step_ = 0; |
998 } | 997 } |
999 | 998 |
1000 | 999 |
1001 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 1000 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
1002 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); | 1001 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); |
1003 } | 1002 } |
1004 | 1003 |
1005 } } // namespace v8::internal | 1004 } } // namespace v8::internal |
OLD | NEW |