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

Side by Side Diff: src/heap/mark-compact.cc

Issue 1269753002: GC: Add tracing event for rescanning large objects on newspace evacuation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment 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/gc-tracer.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 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/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
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 3677 matching lines...) Expand 10 before | Expand all | Expand 10 after
3688 { 3688 {
3689 GCTracer::Scope gc_scope(heap()->tracer(), 3689 GCTracer::Scope gc_scope(heap()->tracer(),
3690 GCTracer::Scope::MC_UPDATE_POINTERS_TO_EVACUATED); 3690 GCTracer::Scope::MC_UPDATE_POINTERS_TO_EVACUATED);
3691 SlotsBuffer::UpdateSlotsRecordedIn(heap_, migration_slots_buffer_); 3691 SlotsBuffer::UpdateSlotsRecordedIn(heap_, migration_slots_buffer_);
3692 if (FLAG_trace_fragmentation_verbose) { 3692 if (FLAG_trace_fragmentation_verbose) {
3693 PrintF(" migration slots buffer: %d\n", 3693 PrintF(" migration slots buffer: %d\n",
3694 SlotsBuffer::SizeOfChain(migration_slots_buffer_)); 3694 SlotsBuffer::SizeOfChain(migration_slots_buffer_));
3695 } 3695 }
3696 3696
3697 if (compacting_ && was_marked_incrementally_) { 3697 if (compacting_ && was_marked_incrementally_) {
3698 GCTracer::Scope gc_scope(heap()->tracer(),
3699 GCTracer::Scope::MC_RESCAN_LARGE_OBJECTS);
3698 // It's difficult to filter out slots recorded for large objects. 3700 // It's difficult to filter out slots recorded for large objects.
3699 LargeObjectIterator it(heap_->lo_space()); 3701 LargeObjectIterator it(heap_->lo_space());
3700 for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) { 3702 for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) {
3701 // LargeObjectSpace is not swept yet thus we have to skip 3703 // LargeObjectSpace is not swept yet thus we have to skip
3702 // dead objects explicitly. 3704 // dead objects explicitly.
3703 if (!IsMarked(obj)) continue; 3705 if (!IsMarked(obj)) continue;
3704 3706
3705 Page* p = Page::FromAddress(obj->address()); 3707 Page* p = Page::FromAddress(obj->address());
3706 if (p->IsFlagSet(Page::RESCAN_ON_EVACUATION)) { 3708 if (p->IsFlagSet(Page::RESCAN_ON_EVACUATION)) {
3707 obj->Iterate(&updating_visitor); 3709 obj->Iterate(&updating_visitor);
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
4749 SlotsBuffer* buffer = *buffer_address; 4751 SlotsBuffer* buffer = *buffer_address;
4750 while (buffer != NULL) { 4752 while (buffer != NULL) {
4751 SlotsBuffer* next_buffer = buffer->next(); 4753 SlotsBuffer* next_buffer = buffer->next();
4752 DeallocateBuffer(buffer); 4754 DeallocateBuffer(buffer);
4753 buffer = next_buffer; 4755 buffer = next_buffer;
4754 } 4756 }
4755 *buffer_address = NULL; 4757 *buffer_address = NULL;
4756 } 4758 }
4757 } // namespace internal 4759 } // namespace internal
4758 } // namespace v8 4760 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698