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

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

Issue 1010803012: 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 bool is_compacting) { 295 bool is_compacting) {
296 if (is_marking) { 296 if (is_marking) {
297 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 297 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
298 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); 298 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
299 299
300 // It's difficult to filter out slots recorded for large objects. 300 // It's difficult to filter out slots recorded for large objects.
301 if (chunk->owner()->identity() == LO_SPACE && 301 if (chunk->owner()->identity() == LO_SPACE &&
302 chunk->size() > static_cast<size_t>(Page::kPageSize) && is_compacting) { 302 chunk->size() > static_cast<size_t>(Page::kPageSize) && is_compacting) {
303 chunk->SetFlag(MemoryChunk::RESCAN_ON_EVACUATION); 303 chunk->SetFlag(MemoryChunk::RESCAN_ON_EVACUATION);
304 } 304 }
305 } else if (chunk->owner()->identity() == CELL_SPACE ||
306 chunk->scan_on_scavenge()) {
307 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
308 chunk->ClearFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
309 } else { 305 } else {
310 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 306 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
311 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); 307 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
312 } 308 }
313 } 309 }
314 310
315 311
316 void IncrementalMarking::SetNewSpacePageFlags(NewSpacePage* chunk, 312 void IncrementalMarking::SetNewSpacePageFlags(NewSpacePage* chunk,
317 bool is_marking) { 313 bool is_marking) {
318 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 314 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
(...skipping 21 matching lines...) Expand all
340 NewSpacePageIterator it(space); 336 NewSpacePageIterator it(space);
341 while (it.has_next()) { 337 while (it.has_next()) {
342 NewSpacePage* p = it.next(); 338 NewSpacePage* p = it.next();
343 SetNewSpacePageFlags(p, false); 339 SetNewSpacePageFlags(p, false);
344 } 340 }
345 } 341 }
346 342
347 343
348 void IncrementalMarking::DeactivateIncrementalWriteBarrier() { 344 void IncrementalMarking::DeactivateIncrementalWriteBarrier() {
349 DeactivateIncrementalWriteBarrierForSpace(heap_->old_space()); 345 DeactivateIncrementalWriteBarrierForSpace(heap_->old_space());
350 DeactivateIncrementalWriteBarrierForSpace(heap_->cell_space());
351 DeactivateIncrementalWriteBarrierForSpace(heap_->map_space()); 346 DeactivateIncrementalWriteBarrierForSpace(heap_->map_space());
352 DeactivateIncrementalWriteBarrierForSpace(heap_->code_space()); 347 DeactivateIncrementalWriteBarrierForSpace(heap_->code_space());
353 DeactivateIncrementalWriteBarrierForSpace(heap_->new_space()); 348 DeactivateIncrementalWriteBarrierForSpace(heap_->new_space());
354 349
355 LargePage* lop = heap_->lo_space()->first_page(); 350 LargePage* lop = heap_->lo_space()->first_page();
356 while (lop->is_valid()) { 351 while (lop->is_valid()) {
357 SetOldSpacePageFlags(lop, false, false); 352 SetOldSpacePageFlags(lop, false, false);
358 lop = lop->next_page(); 353 lop = lop->next_page();
359 } 354 }
360 } 355 }
(...skipping 12 matching lines...) Expand all
373 NewSpacePageIterator it(space->ToSpaceStart(), space->ToSpaceEnd()); 368 NewSpacePageIterator it(space->ToSpaceStart(), space->ToSpaceEnd());
374 while (it.has_next()) { 369 while (it.has_next()) {
375 NewSpacePage* p = it.next(); 370 NewSpacePage* p = it.next();
376 SetNewSpacePageFlags(p, true); 371 SetNewSpacePageFlags(p, true);
377 } 372 }
378 } 373 }
379 374
380 375
381 void IncrementalMarking::ActivateIncrementalWriteBarrier() { 376 void IncrementalMarking::ActivateIncrementalWriteBarrier() {
382 ActivateIncrementalWriteBarrier(heap_->old_space()); 377 ActivateIncrementalWriteBarrier(heap_->old_space());
383 ActivateIncrementalWriteBarrier(heap_->cell_space());
384 ActivateIncrementalWriteBarrier(heap_->map_space()); 378 ActivateIncrementalWriteBarrier(heap_->map_space());
385 ActivateIncrementalWriteBarrier(heap_->code_space()); 379 ActivateIncrementalWriteBarrier(heap_->code_space());
386 ActivateIncrementalWriteBarrier(heap_->new_space()); 380 ActivateIncrementalWriteBarrier(heap_->new_space());
387 381
388 LargePage* lop = heap_->lo_space()->first_page(); 382 LargePage* lop = heap_->lo_space()->first_page();
389 while (lop->is_valid()) { 383 while (lop->is_valid()) {
390 SetOldSpacePageFlags(lop, true, is_compacting_); 384 SetOldSpacePageFlags(lop, true, is_compacting_);
391 lop = lop->next_page(); 385 lop = lop->next_page();
392 } 386 }
393 } 387 }
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { 1005 void IncrementalMarking::IncrementIdleMarkingDelayCounter() {
1012 idle_marking_delay_counter_++; 1006 idle_marking_delay_counter_++;
1013 } 1007 }
1014 1008
1015 1009
1016 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1010 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1017 idle_marking_delay_counter_ = 0; 1011 idle_marking_delay_counter_ = 0;
1018 } 1012 }
1019 } 1013 }
1020 } // namespace v8::internal 1014 } // 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