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

Side by Side Diff: src/heap/store-buffer.cc

Issue 1263343002: Revert of Reland concurrent sweeping of code space. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/spaces.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/counters.h" 9 #include "src/counters.h"
10 #include "src/heap/store-buffer-inl.h" 10 #include "src/heap/store-buffer-inl.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // We skip free space objects. 461 // We skip free space objects.
462 if (!heap_object->IsFiller()) { 462 if (!heap_object->IsFiller()) {
463 DCHECK(heap_object->IsMap()); 463 DCHECK(heap_object->IsMap());
464 FindPointersToNewSpaceInRegion( 464 FindPointersToNewSpaceInRegion(
465 heap_object->address() + Map::kPointerFieldsBeginOffset, 465 heap_object->address() + Map::kPointerFieldsBeginOffset,
466 heap_object->address() + Map::kPointerFieldsEndOffset, 466 heap_object->address() + Map::kPointerFieldsEndOffset,
467 slot_callback); 467 slot_callback);
468 } 468 }
469 } 469 }
470 } else { 470 } else {
471 heap_->mark_compact_collector()->SweepOrWaitUntilSweepingCompleted( 471 if (!page->SweepingCompleted()) {
472 page); 472 heap_->mark_compact_collector()->SweepInParallel(page, owner);
473 if (!page->SweepingCompleted()) {
474 // We were not able to sweep that page, i.e., a concurrent
475 // sweeper thread currently owns this page. Wait for the sweeper
476 // thread to be done with this page.
477 page->WaitUntilSweepingCompleted();
478 }
479 }
480 CHECK(page->owner() == heap_->old_space());
473 HeapObjectIterator iterator(page, NULL); 481 HeapObjectIterator iterator(page, NULL);
474 for (HeapObject* heap_object = iterator.Next(); heap_object != NULL; 482 for (HeapObject* heap_object = iterator.Next(); heap_object != NULL;
475 heap_object = iterator.Next()) { 483 heap_object = iterator.Next()) {
476 // We iterate over objects that contain new space pointers only. 484 // We iterate over objects that contain new space pointers only.
477 Address obj_address = heap_object->address(); 485 Address obj_address = heap_object->address();
478 const int start_offset = HeapObject::kHeaderSize; 486 const int start_offset = HeapObject::kHeaderSize;
479 const int end_offset = heap_object->Size(); 487 const int end_offset = heap_object->Size();
480 488
481 switch (heap_object->ContentType()) { 489 switch (heap_object->ContentType()) {
482 case HeapObjectContents::kTaggedValues: { 490 case HeapObjectContents::kTaggedValues: {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 } 584 }
577 old_buffer_is_sorted_ = false; 585 old_buffer_is_sorted_ = false;
578 old_buffer_is_filtered_ = false; 586 old_buffer_is_filtered_ = false;
579 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); 587 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2);
580 DCHECK(old_top_ <= old_limit_); 588 DCHECK(old_top_ <= old_limit_);
581 } 589 }
582 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); 590 heap_->isolate()->counters()->store_buffer_compactions()->Increment();
583 } 591 }
584 } // namespace internal 592 } // namespace internal
585 } // namespace v8 593 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698