OLD | NEW |
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 "src/store-buffer.h" | 5 #include "src/store-buffer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 heap_object = iterator.Next()) { | 498 heap_object = iterator.Next()) { |
499 // We skip free space objects. | 499 // We skip free space objects. |
500 if (!heap_object->IsFiller()) { | 500 if (!heap_object->IsFiller()) { |
501 FindPointersToNewSpaceInRegion( | 501 FindPointersToNewSpaceInRegion( |
502 heap_object->address() + HeapObject::kHeaderSize, | 502 heap_object->address() + HeapObject::kHeaderSize, |
503 heap_object->address() + heap_object->Size(), slot_callback, | 503 heap_object->address() + heap_object->Size(), slot_callback, |
504 clear_maps); | 504 clear_maps); |
505 } | 505 } |
506 } | 506 } |
507 } else { | 507 } else { |
| 508 if (page->parallel_sweeping() > MemoryChunk::SWEEPING_FINALIZE) { |
| 509 heap_->mark_compact_collector()->SweepInParallel(page, owner); |
| 510 if (page->parallel_sweeping() > MemoryChunk::SWEEPING_FINALIZE) { |
| 511 // We were not able to sweep that page, i.e., a concurrent |
| 512 // sweeper thread currently owns this page. |
| 513 // TODO(hpayer): This may introduce a huge pause here. We |
| 514 // just care about finish sweeping of the scan on scavenge page. |
| 515 heap_->mark_compact_collector()->EnsureSweepingCompleted(); |
| 516 } |
| 517 } |
508 FindPointersToNewSpaceInRegion( | 518 FindPointersToNewSpaceInRegion( |
509 start, end, slot_callback, clear_maps); | 519 start, end, slot_callback, clear_maps); |
510 } | 520 } |
511 } | 521 } |
512 } | 522 } |
513 } | 523 } |
514 if (callback_ != NULL) { | 524 if (callback_ != NULL) { |
515 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent); | 525 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent); |
516 } | 526 } |
517 } | 527 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 } | 575 } |
566 old_buffer_is_sorted_ = false; | 576 old_buffer_is_sorted_ = false; |
567 old_buffer_is_filtered_ = false; | 577 old_buffer_is_filtered_ = false; |
568 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); | 578 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); |
569 ASSERT(old_top_ <= old_limit_); | 579 ASSERT(old_top_ <= old_limit_); |
570 } | 580 } |
571 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); | 581 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); |
572 } | 582 } |
573 | 583 |
574 } } // namespace v8::internal | 584 } } // namespace v8::internal |
OLD | NEW |