Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/mark-compact.cc

Issue 362313002: Precisely sweep scan on scavenge pages and use heap iterator to iterate over them. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/store-buffer.cc » ('j') | src/store-buffer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/store-buffer.cc » ('j') | src/store-buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698