OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/heap/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
6 | 6 |
7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3975 start_time = heap_->MonotonicallyIncreasingTimeInMs(); | 3975 start_time = heap_->MonotonicallyIncreasingTimeInMs(); |
3976 } | 3976 } |
3977 | 3977 |
3978 #ifdef DEBUG | 3978 #ifdef DEBUG |
3979 state_ = SWEEP_SPACES; | 3979 state_ = SWEEP_SPACES; |
3980 #endif | 3980 #endif |
3981 | 3981 |
3982 MoveEvacuationCandidatesToEndOfPagesList(); | 3982 MoveEvacuationCandidatesToEndOfPagesList(); |
3983 | 3983 |
3984 { | 3984 { |
3985 sweeping_in_progress_ = true; | |
Michael Lippautz
2016/01/11 09:49:56
This is not really needed as we sweep on the main
Hannes Payer (out of office)
2016/01/11 12:28:40
Acknowledged.
| |
3985 { | 3986 { |
3986 GCTracer::Scope sweep_scope(heap()->tracer(), | 3987 GCTracer::Scope sweep_scope(heap()->tracer(), |
3987 GCTracer::Scope::MC_SWEEP_OLD); | 3988 GCTracer::Scope::MC_SWEEP_OLD); |
3988 StartSweepSpace(heap()->old_space()); | 3989 StartSweepSpace(heap()->old_space()); |
3989 } | 3990 } |
3990 { | 3991 { |
3991 GCTracer::Scope sweep_scope(heap()->tracer(), | 3992 GCTracer::Scope sweep_scope(heap()->tracer(), |
3992 GCTracer::Scope::MC_SWEEP_CODE); | 3993 GCTracer::Scope::MC_SWEEP_CODE); |
3993 StartSweepSpace(heap()->code_space()); | 3994 StartSweepSpace(heap()->code_space()); |
3994 } | 3995 } |
3995 { | 3996 { |
3996 GCTracer::Scope sweep_scope(heap()->tracer(), | 3997 GCTracer::Scope sweep_scope(heap()->tracer(), |
3997 GCTracer::Scope::MC_SWEEP_MAP); | 3998 GCTracer::Scope::MC_SWEEP_MAP); |
3998 StartSweepSpace(heap()->map_space()); | 3999 StartSweepSpace(heap()->map_space()); |
3999 } | 4000 } |
4000 sweeping_in_progress_ = true; | |
4001 if (FLAG_concurrent_sweeping) { | 4001 if (FLAG_concurrent_sweeping) { |
4002 StartSweeperThreads(); | 4002 StartSweeperThreads(); |
4003 } | 4003 } |
4004 } | 4004 } |
4005 | 4005 |
4006 // Deallocate unmarked large objects. | 4006 // Deallocate unmarked large objects. |
4007 heap_->lo_space()->FreeUnmarkedObjects(); | 4007 heap_->lo_space()->FreeUnmarkedObjects(); |
4008 | 4008 |
4009 // Give pages that are queued to be freed back to the OS. Invalid store | 4009 // Give pages that are queued to be freed back to the OS. Invalid store |
4010 // buffer entries are already filter out. We can just release the memory. | 4010 // buffer entries are already filter out. We can just release the memory. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4105 MarkBit mark_bit = Marking::MarkBitFrom(host); | 4105 MarkBit mark_bit = Marking::MarkBitFrom(host); |
4106 if (Marking::IsBlack(mark_bit)) { | 4106 if (Marking::IsBlack(mark_bit)) { |
4107 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); | 4107 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); |
4108 RecordRelocSlot(&rinfo, target); | 4108 RecordRelocSlot(&rinfo, target); |
4109 } | 4109 } |
4110 } | 4110 } |
4111 } | 4111 } |
4112 | 4112 |
4113 } // namespace internal | 4113 } // namespace internal |
4114 } // namespace v8 | 4114 } // namespace v8 |
OLD | NEW |