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

Side by Side Diff: src/heap/incremental-marking.cc

Issue 1073133002: Reland "Merge cellspace into old pointer space" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/heap/heap-inl.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »
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/heap/incremental-marking.h" 7 #include "src/heap/incremental-marking.h"
8 8
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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 bool is_compacting) { 294 bool is_compacting) {
295 if (is_marking) { 295 if (is_marking) {
296 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 296 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
297 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); 297 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
298 298
299 // It's difficult to filter out slots recorded for large objects. 299 // It's difficult to filter out slots recorded for large objects.
300 if (chunk->owner()->identity() == LO_SPACE && 300 if (chunk->owner()->identity() == LO_SPACE &&
301 chunk->size() > static_cast<size_t>(Page::kPageSize) && is_compacting) { 301 chunk->size() > static_cast<size_t>(Page::kPageSize) && is_compacting) {
302 chunk->SetFlag(MemoryChunk::RESCAN_ON_EVACUATION); 302 chunk->SetFlag(MemoryChunk::RESCAN_ON_EVACUATION);
303 } 303 }
304 } else if (chunk->owner()->identity() == CELL_SPACE ||
305 chunk->scan_on_scavenge()) {
306 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
307 chunk->ClearFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
308 } else { 304 } else {
309 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 305 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
310 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); 306 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
311 } 307 }
312 } 308 }
313 309
314 310
315 void IncrementalMarking::SetNewSpacePageFlags(NewSpacePage* chunk, 311 void IncrementalMarking::SetNewSpacePageFlags(NewSpacePage* chunk,
316 bool is_marking) { 312 bool is_marking) {
317 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 313 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
(...skipping 21 matching lines...) Expand all
339 NewSpacePageIterator it(space); 335 NewSpacePageIterator it(space);
340 while (it.has_next()) { 336 while (it.has_next()) {
341 NewSpacePage* p = it.next(); 337 NewSpacePage* p = it.next();
342 SetNewSpacePageFlags(p, false); 338 SetNewSpacePageFlags(p, false);
343 } 339 }
344 } 340 }
345 341
346 342
347 void IncrementalMarking::DeactivateIncrementalWriteBarrier() { 343 void IncrementalMarking::DeactivateIncrementalWriteBarrier() {
348 DeactivateIncrementalWriteBarrierForSpace(heap_->old_space()); 344 DeactivateIncrementalWriteBarrierForSpace(heap_->old_space());
349 DeactivateIncrementalWriteBarrierForSpace(heap_->cell_space());
350 DeactivateIncrementalWriteBarrierForSpace(heap_->map_space()); 345 DeactivateIncrementalWriteBarrierForSpace(heap_->map_space());
351 DeactivateIncrementalWriteBarrierForSpace(heap_->code_space()); 346 DeactivateIncrementalWriteBarrierForSpace(heap_->code_space());
352 DeactivateIncrementalWriteBarrierForSpace(heap_->new_space()); 347 DeactivateIncrementalWriteBarrierForSpace(heap_->new_space());
353 348
354 LargePage* lop = heap_->lo_space()->first_page(); 349 LargePage* lop = heap_->lo_space()->first_page();
355 while (lop->is_valid()) { 350 while (lop->is_valid()) {
356 SetOldSpacePageFlags(lop, false, false); 351 SetOldSpacePageFlags(lop, false, false);
357 lop = lop->next_page(); 352 lop = lop->next_page();
358 } 353 }
359 } 354 }
(...skipping 12 matching lines...) Expand all
372 NewSpacePageIterator it(space->ToSpaceStart(), space->ToSpaceEnd()); 367 NewSpacePageIterator it(space->ToSpaceStart(), space->ToSpaceEnd());
373 while (it.has_next()) { 368 while (it.has_next()) {
374 NewSpacePage* p = it.next(); 369 NewSpacePage* p = it.next();
375 SetNewSpacePageFlags(p, true); 370 SetNewSpacePageFlags(p, true);
376 } 371 }
377 } 372 }
378 373
379 374
380 void IncrementalMarking::ActivateIncrementalWriteBarrier() { 375 void IncrementalMarking::ActivateIncrementalWriteBarrier() {
381 ActivateIncrementalWriteBarrier(heap_->old_space()); 376 ActivateIncrementalWriteBarrier(heap_->old_space());
382 ActivateIncrementalWriteBarrier(heap_->cell_space());
383 ActivateIncrementalWriteBarrier(heap_->map_space()); 377 ActivateIncrementalWriteBarrier(heap_->map_space());
384 ActivateIncrementalWriteBarrier(heap_->code_space()); 378 ActivateIncrementalWriteBarrier(heap_->code_space());
385 ActivateIncrementalWriteBarrier(heap_->new_space()); 379 ActivateIncrementalWriteBarrier(heap_->new_space());
386 380
387 LargePage* lop = heap_->lo_space()->first_page(); 381 LargePage* lop = heap_->lo_space()->first_page();
388 while (lop->is_valid()) { 382 while (lop->is_valid()) {
389 SetOldSpacePageFlags(lop, true, is_compacting_); 383 SetOldSpacePageFlags(lop, true, is_compacting_);
390 lop = lop->next_page(); 384 lop = lop->next_page();
391 } 385 }
392 } 386 }
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { 1004 void IncrementalMarking::IncrementIdleMarkingDelayCounter() {
1011 idle_marking_delay_counter_++; 1005 idle_marking_delay_counter_++;
1012 } 1006 }
1013 1007
1014 1008
1015 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1009 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1016 idle_marking_delay_counter_ = 0; 1010 idle_marking_delay_counter_ = 0;
1017 } 1011 }
1018 } 1012 }
1019 } // namespace v8::internal 1013 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap-inl.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698