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/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/compilation-cache.h" | 9 #include "src/compilation-cache.h" |
10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
(...skipping 4143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4154 case PARALLEL_CONSERVATIVE: { | 4154 case PARALLEL_CONSERVATIVE: { |
4155 if (!parallel_sweeping_active) { | 4155 if (!parallel_sweeping_active) { |
4156 if (FLAG_gc_verbose) { | 4156 if (FLAG_gc_verbose) { |
4157 PrintF("Sweeping 0x%" V8PRIxPTR " conservatively.\n", | 4157 PrintF("Sweeping 0x%" V8PRIxPTR " conservatively.\n", |
4158 reinterpret_cast<intptr_t>(p)); | 4158 reinterpret_cast<intptr_t>(p)); |
4159 } | 4159 } |
4160 SweepConservatively<SWEEP_ON_MAIN_THREAD>(space, NULL, p); | 4160 SweepConservatively<SWEEP_ON_MAIN_THREAD>(space, NULL, p); |
4161 pages_swept++; | 4161 pages_swept++; |
4162 parallel_sweeping_active = true; | 4162 parallel_sweeping_active = true; |
4163 } else { | 4163 } else { |
4164 if (p->scan_on_scavenge()) { | 4164 if (FLAG_gc_verbose) { |
4165 SweepPrecisely<SWEEP_ONLY, IGNORE_SKIP_LIST, IGNORE_FREE_SPACE>( | 4165 PrintF("Sweeping 0x%" V8PRIxPTR " conservatively in parallel.\n", |
4166 space, p, NULL); | 4166 reinterpret_cast<intptr_t>(p)); |
4167 pages_swept++; | |
4168 if (FLAG_gc_verbose) { | |
4169 PrintF("Sweeping 0x%" V8PRIxPTR | |
4170 " scan on scavenge page precisely.\n", | |
4171 reinterpret_cast<intptr_t>(p)); | |
4172 } | |
4173 } else { | |
4174 if (FLAG_gc_verbose) { | |
4175 PrintF("Sweeping 0x%" V8PRIxPTR " conservatively in parallel.\n", | |
4176 reinterpret_cast<intptr_t>(p)); | |
4177 } | |
4178 p->set_parallel_sweeping(MemoryChunk::PARALLEL_SWEEPING_PENDING); | |
4179 space->IncreaseUnsweptFreeBytes(p); | |
4180 } | 4167 } |
| 4168 p->set_parallel_sweeping(MemoryChunk::PARALLEL_SWEEPING_PENDING); |
| 4169 space->IncreaseUnsweptFreeBytes(p); |
4181 } | 4170 } |
4182 space->set_end_of_unswept_pages(p); | 4171 space->set_end_of_unswept_pages(p); |
4183 break; | 4172 break; |
4184 } | 4173 } |
4185 case PRECISE: { | 4174 case PRECISE: { |
4186 if (FLAG_gc_verbose) { | 4175 if (FLAG_gc_verbose) { |
4187 PrintF("Sweeping 0x%" V8PRIxPTR " precisely.\n", | 4176 PrintF("Sweeping 0x%" V8PRIxPTR " precisely.\n", |
4188 reinterpret_cast<intptr_t>(p)); | 4177 reinterpret_cast<intptr_t>(p)); |
4189 } | 4178 } |
4190 if (space->identity() == CODE_SPACE && FLAG_zap_code_space) { | 4179 if (space->identity() == CODE_SPACE && FLAG_zap_code_space) { |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4516 while (buffer != NULL) { | 4505 while (buffer != NULL) { |
4517 SlotsBuffer* next_buffer = buffer->next(); | 4506 SlotsBuffer* next_buffer = buffer->next(); |
4518 DeallocateBuffer(buffer); | 4507 DeallocateBuffer(buffer); |
4519 buffer = next_buffer; | 4508 buffer = next_buffer; |
4520 } | 4509 } |
4521 *buffer_address = NULL; | 4510 *buffer_address = NULL; |
4522 } | 4511 } |
4523 | 4512 |
4524 | 4513 |
4525 } } // namespace v8::internal | 4514 } } // namespace v8::internal |
OLD | NEW |