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/v8.h" | 5 #include "src/v8.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/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
(...skipping 4162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4173 GCTracer::Scope sweep_scope(heap()->tracer(), | 4173 GCTracer::Scope sweep_scope(heap()->tracer(), |
4174 GCTracer::Scope::MC_SWEEP_MAP); | 4174 GCTracer::Scope::MC_SWEEP_MAP); |
4175 SweepSpace(heap()->map_space(), SEQUENTIAL_SWEEPING); | 4175 SweepSpace(heap()->map_space(), SEQUENTIAL_SWEEPING); |
4176 } | 4176 } |
4177 | 4177 |
4178 // Deallocate unmarked objects and clear marked bits for marked objects. | 4178 // Deallocate unmarked objects and clear marked bits for marked objects. |
4179 heap_->lo_space()->FreeUnmarkedObjects(); | 4179 heap_->lo_space()->FreeUnmarkedObjects(); |
4180 | 4180 |
4181 // Deallocate evacuated candidate pages. | 4181 // Deallocate evacuated candidate pages. |
4182 ReleaseEvacuationCandidates(); | 4182 ReleaseEvacuationCandidates(); |
| 4183 CodeRange* code_range = heap()->isolate()->code_range(); |
| 4184 if (code_range != NULL && code_range->valid()) { |
| 4185 code_range->ReserveEmergencyBlock(); |
| 4186 } |
4183 | 4187 |
4184 if (FLAG_print_cumulative_gc_stat) { | 4188 if (FLAG_print_cumulative_gc_stat) { |
4185 heap_->tracer()->AddSweepingTime(base::OS::TimeCurrentMillis() - | 4189 heap_->tracer()->AddSweepingTime(base::OS::TimeCurrentMillis() - |
4186 start_time); | 4190 start_time); |
4187 } | 4191 } |
4188 } | 4192 } |
4189 | 4193 |
4190 | 4194 |
4191 void MarkCompactCollector::ParallelSweepSpaceComplete(PagedSpace* space) { | 4195 void MarkCompactCollector::ParallelSweepSpaceComplete(PagedSpace* space) { |
4192 PageIterator it(space); | 4196 PageIterator it(space); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4407 SlotsBuffer* buffer = *buffer_address; | 4411 SlotsBuffer* buffer = *buffer_address; |
4408 while (buffer != NULL) { | 4412 while (buffer != NULL) { |
4409 SlotsBuffer* next_buffer = buffer->next(); | 4413 SlotsBuffer* next_buffer = buffer->next(); |
4410 DeallocateBuffer(buffer); | 4414 DeallocateBuffer(buffer); |
4411 buffer = next_buffer; | 4415 buffer = next_buffer; |
4412 } | 4416 } |
4413 *buffer_address = NULL; | 4417 *buffer_address = NULL; |
4414 } | 4418 } |
4415 } | 4419 } |
4416 } // namespace v8::internal | 4420 } // namespace v8::internal |
OLD | NEW |