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

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

Issue 16631002: Separate Cell and PropertyCell spaces (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge with ToT Created 7 years, 6 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 387 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
388 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); 388 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
389 389
390 // It's difficult to filter out slots recorded for large objects. 390 // It's difficult to filter out slots recorded for large objects.
391 if (chunk->owner()->identity() == LO_SPACE && 391 if (chunk->owner()->identity() == LO_SPACE &&
392 chunk->size() > static_cast<size_t>(Page::kPageSize) && 392 chunk->size() > static_cast<size_t>(Page::kPageSize) &&
393 is_compacting) { 393 is_compacting) {
394 chunk->SetFlag(MemoryChunk::RESCAN_ON_EVACUATION); 394 chunk->SetFlag(MemoryChunk::RESCAN_ON_EVACUATION);
395 } 395 }
396 } else if (chunk->owner()->identity() == CELL_SPACE || 396 } else if (chunk->owner()->identity() == CELL_SPACE ||
397 chunk->owner()->identity() == JS_GLOBAL_PROPERTY_CELL_SPACE ||
397 chunk->scan_on_scavenge()) { 398 chunk->scan_on_scavenge()) {
398 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 399 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
399 chunk->ClearFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); 400 chunk->ClearFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
400 } else { 401 } else {
401 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 402 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
402 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); 403 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
403 } 404 }
404 } 405 }
405 406
406 407
(...skipping 26 matching lines...) Expand all
433 NewSpacePage* p = it.next(); 434 NewSpacePage* p = it.next();
434 SetNewSpacePageFlags(p, false); 435 SetNewSpacePageFlags(p, false);
435 } 436 }
436 } 437 }
437 438
438 439
439 void IncrementalMarking::DeactivateIncrementalWriteBarrier() { 440 void IncrementalMarking::DeactivateIncrementalWriteBarrier() {
440 DeactivateIncrementalWriteBarrierForSpace(heap_->old_pointer_space()); 441 DeactivateIncrementalWriteBarrierForSpace(heap_->old_pointer_space());
441 DeactivateIncrementalWriteBarrierForSpace(heap_->old_data_space()); 442 DeactivateIncrementalWriteBarrierForSpace(heap_->old_data_space());
442 DeactivateIncrementalWriteBarrierForSpace(heap_->cell_space()); 443 DeactivateIncrementalWriteBarrierForSpace(heap_->cell_space());
444 DeactivateIncrementalWriteBarrierForSpace(
445 heap_->js_global_property_cell_space());
443 DeactivateIncrementalWriteBarrierForSpace(heap_->map_space()); 446 DeactivateIncrementalWriteBarrierForSpace(heap_->map_space());
444 DeactivateIncrementalWriteBarrierForSpace(heap_->code_space()); 447 DeactivateIncrementalWriteBarrierForSpace(heap_->code_space());
445 DeactivateIncrementalWriteBarrierForSpace(heap_->new_space()); 448 DeactivateIncrementalWriteBarrierForSpace(heap_->new_space());
446 449
447 LargePage* lop = heap_->lo_space()->first_page(); 450 LargePage* lop = heap_->lo_space()->first_page();
448 while (lop->is_valid()) { 451 while (lop->is_valid()) {
449 SetOldSpacePageFlags(lop, false, false); 452 SetOldSpacePageFlags(lop, false, false);
450 lop = lop->next_page(); 453 lop = lop->next_page();
451 } 454 }
452 } 455 }
(...skipping 14 matching lines...) Expand all
467 NewSpacePage* p = it.next(); 470 NewSpacePage* p = it.next();
468 SetNewSpacePageFlags(p, true); 471 SetNewSpacePageFlags(p, true);
469 } 472 }
470 } 473 }
471 474
472 475
473 void IncrementalMarking::ActivateIncrementalWriteBarrier() { 476 void IncrementalMarking::ActivateIncrementalWriteBarrier() {
474 ActivateIncrementalWriteBarrier(heap_->old_pointer_space()); 477 ActivateIncrementalWriteBarrier(heap_->old_pointer_space());
475 ActivateIncrementalWriteBarrier(heap_->old_data_space()); 478 ActivateIncrementalWriteBarrier(heap_->old_data_space());
476 ActivateIncrementalWriteBarrier(heap_->cell_space()); 479 ActivateIncrementalWriteBarrier(heap_->cell_space());
480 ActivateIncrementalWriteBarrier(heap_->js_global_property_cell_space());
477 ActivateIncrementalWriteBarrier(heap_->map_space()); 481 ActivateIncrementalWriteBarrier(heap_->map_space());
478 ActivateIncrementalWriteBarrier(heap_->code_space()); 482 ActivateIncrementalWriteBarrier(heap_->code_space());
479 ActivateIncrementalWriteBarrier(heap_->new_space()); 483 ActivateIncrementalWriteBarrier(heap_->new_space());
480 484
481 LargePage* lop = heap_->lo_space()->first_page(); 485 LargePage* lop = heap_->lo_space()->first_page();
482 while (lop->is_valid()) { 486 while (lop->is_valid()) {
483 SetOldSpacePageFlags(lop, true, is_compacting_); 487 SetOldSpacePageFlags(lop, true, is_compacting_);
484 lop = lop->next_page(); 488 lop = lop->next_page();
485 } 489 }
486 } 490 }
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 bytes_scanned_ = 0; 1032 bytes_scanned_ = 0;
1029 write_barriers_invoked_since_last_step_ = 0; 1033 write_barriers_invoked_since_last_step_ = 0;
1030 } 1034 }
1031 1035
1032 1036
1033 int64_t IncrementalMarking::SpaceLeftInOldSpace() { 1037 int64_t IncrementalMarking::SpaceLeftInOldSpace() {
1034 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); 1038 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects();
1035 } 1039 }
1036 1040
1037 } } // namespace v8::internal 1041 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698