OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 // marking is completed. | 539 // marking is completed. |
540 static inline void SimulateIncrementalMarking(i::Heap* heap, | 540 static inline void SimulateIncrementalMarking(i::Heap* heap, |
541 bool force_completion = true) { | 541 bool force_completion = true) { |
542 i::MarkCompactCollector* collector = heap->mark_compact_collector(); | 542 i::MarkCompactCollector* collector = heap->mark_compact_collector(); |
543 i::IncrementalMarking* marking = heap->incremental_marking(); | 543 i::IncrementalMarking* marking = heap->incremental_marking(); |
544 if (collector->sweeping_in_progress()) { | 544 if (collector->sweeping_in_progress()) { |
545 collector->EnsureSweepingCompleted(); | 545 collector->EnsureSweepingCompleted(); |
546 } | 546 } |
547 CHECK(marking->IsMarking() || marking->IsStopped()); | 547 CHECK(marking->IsMarking() || marking->IsStopped()); |
548 if (marking->IsStopped()) { | 548 if (marking->IsStopped()) { |
549 marking->Start(i::Heap::kNoGCFlags); | 549 heap->StartIncrementalMarking(); |
550 } | 550 } |
551 CHECK(marking->IsMarking()); | 551 CHECK(marking->IsMarking()); |
552 if (!force_completion) return; | 552 if (!force_completion) return; |
553 | 553 |
554 while (!marking->IsComplete()) { | 554 while (!marking->IsComplete()) { |
555 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 555 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
556 if (marking->IsReadyToOverApproximateWeakClosure()) { | 556 if (marking->IsReadyToOverApproximateWeakClosure()) { |
557 marking->MarkObjectGroups(); | 557 marking->MarkObjectGroups(); |
558 } | 558 } |
559 } | 559 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 HandleAndZoneScope() {} | 600 HandleAndZoneScope() {} |
601 | 601 |
602 // Prefixing the below with main_ reduces a lot of naming clashes. | 602 // Prefixing the below with main_ reduces a lot of naming clashes. |
603 i::Zone* main_zone() { return &main_zone_; } | 603 i::Zone* main_zone() { return &main_zone_; } |
604 | 604 |
605 private: | 605 private: |
606 i::Zone main_zone_; | 606 i::Zone main_zone_; |
607 }; | 607 }; |
608 | 608 |
609 #endif // ifndef CCTEST_H_ | 609 #endif // ifndef CCTEST_H_ |
OLD | NEW |