| 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 4127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4138 case PARALLEL_CONSERVATIVE: { | 4138 case PARALLEL_CONSERVATIVE: { |
| 4139 if (!parallel_sweeping_active) { | 4139 if (!parallel_sweeping_active) { |
| 4140 if (FLAG_gc_verbose) { | 4140 if (FLAG_gc_verbose) { |
| 4141 PrintF("Sweeping 0x%" V8PRIxPTR " conservatively.\n", | 4141 PrintF("Sweeping 0x%" V8PRIxPTR " conservatively.\n", |
| 4142 reinterpret_cast<intptr_t>(p)); | 4142 reinterpret_cast<intptr_t>(p)); |
| 4143 } | 4143 } |
| 4144 SweepConservatively<SWEEP_SEQUENTIALLY>(space, NULL, p); | 4144 SweepConservatively<SWEEP_SEQUENTIALLY>(space, NULL, p); |
| 4145 pages_swept++; | 4145 pages_swept++; |
| 4146 parallel_sweeping_active = true; | 4146 parallel_sweeping_active = true; |
| 4147 } else { | 4147 } else { |
| 4148 if (FLAG_gc_verbose) { | 4148 if (p->scan_on_scavenge()) { |
| 4149 PrintF("Sweeping 0x%" V8PRIxPTR " conservatively in parallel.\n", | 4149 SweepPrecisely<SWEEP_ONLY, IGNORE_SKIP_LIST, IGNORE_FREE_SPACE>( |
| 4150 reinterpret_cast<intptr_t>(p)); | 4150 space, p, NULL); |
| 4151 pages_swept++; |
| 4152 if (FLAG_gc_verbose) { |
| 4153 PrintF("Sweeping 0x%" V8PRIxPTR |
| 4154 " scan on scavenge page precisely.\n", |
| 4155 reinterpret_cast<intptr_t>(p)); |
| 4156 } |
| 4157 } else { |
| 4158 if (FLAG_gc_verbose) { |
| 4159 PrintF("Sweeping 0x%" V8PRIxPTR " conservatively in parallel.\n", |
| 4160 reinterpret_cast<intptr_t>(p)); |
| 4161 } |
| 4162 p->set_parallel_sweeping(MemoryChunk::PARALLEL_SWEEPING_PENDING); |
| 4163 space->IncreaseUnsweptFreeBytes(p); |
| 4151 } | 4164 } |
| 4152 p->set_parallel_sweeping(MemoryChunk::PARALLEL_SWEEPING_PENDING); | |
| 4153 space->IncreaseUnsweptFreeBytes(p); | |
| 4154 } | 4165 } |
| 4155 space->set_end_of_unswept_pages(p); | 4166 space->set_end_of_unswept_pages(p); |
| 4156 break; | 4167 break; |
| 4157 } | 4168 } |
| 4158 case PRECISE: { | 4169 case PRECISE: { |
| 4159 if (FLAG_gc_verbose) { | 4170 if (FLAG_gc_verbose) { |
| 4160 PrintF("Sweeping 0x%" V8PRIxPTR " precisely.\n", | 4171 PrintF("Sweeping 0x%" V8PRIxPTR " precisely.\n", |
| 4161 reinterpret_cast<intptr_t>(p)); | 4172 reinterpret_cast<intptr_t>(p)); |
| 4162 } | 4173 } |
| 4163 if (space->identity() == CODE_SPACE && FLAG_zap_code_space) { | 4174 if (space->identity() == CODE_SPACE && FLAG_zap_code_space) { |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4489 while (buffer != NULL) { | 4500 while (buffer != NULL) { |
| 4490 SlotsBuffer* next_buffer = buffer->next(); | 4501 SlotsBuffer* next_buffer = buffer->next(); |
| 4491 DeallocateBuffer(buffer); | 4502 DeallocateBuffer(buffer); |
| 4492 buffer = next_buffer; | 4503 buffer = next_buffer; |
| 4493 } | 4504 } |
| 4494 *buffer_address = NULL; | 4505 *buffer_address = NULL; |
| 4495 } | 4506 } |
| 4496 | 4507 |
| 4497 | 4508 |
| 4498 } } // namespace v8::internal | 4509 } } // namespace v8::internal |
| OLD | NEW |