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

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

Issue 1412123006: [heap] Add store and slots buffer clearing timers to --trace-gc-nvp. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/heap/mark-compact.h" 5 #include "src/heap/mark-compact.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/base/sys-info.h" 9 #include "src/base/sys-info.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 heap()->code_space()->EvictEvacuationCandidatesFromLinearAllocationArea(); 290 heap()->code_space()->EvictEvacuationCandidatesFromLinearAllocationArea();
291 291
292 compacting_ = evacuation_candidates_.length() > 0; 292 compacting_ = evacuation_candidates_.length() > 0;
293 } 293 }
294 294
295 return compacting_; 295 return compacting_;
296 } 296 }
297 297
298 298
299 void MarkCompactCollector::ClearInvalidStoreAndSlotsBufferEntries() { 299 void MarkCompactCollector::ClearInvalidStoreAndSlotsBufferEntries() {
300 heap_->store_buffer()->ClearInvalidStoreBufferEntries(); 300 {
301 GCTracer::Scope gc_scope(heap()->tracer(),
302 GCTracer::Scope::MC_STORE_BUFFER_CLEAR);
303 heap_->store_buffer()->ClearInvalidStoreBufferEntries();
304 }
301 305
302 int number_of_pages = evacuation_candidates_.length(); 306 {
303 for (int i = 0; i < number_of_pages; i++) { 307 GCTracer::Scope gc_scope(heap()->tracer(),
304 Page* p = evacuation_candidates_[i]; 308 GCTracer::Scope::MC_SLOTS_BUFFER_CLEAR);
305 SlotsBuffer::RemoveInvalidSlots(heap_, p->slots_buffer()); 309 int number_of_pages = evacuation_candidates_.length();
310 for (int i = 0; i < number_of_pages; i++) {
311 Page* p = evacuation_candidates_[i];
312 SlotsBuffer::RemoveInvalidSlots(heap_, p->slots_buffer());
313 }
306 } 314 }
307 } 315 }
308 316
309 317
310 #ifdef VERIFY_HEAP 318 #ifdef VERIFY_HEAP
311 static void VerifyValidSlotsBufferEntries(Heap* heap, PagedSpace* space) { 319 static void VerifyValidSlotsBufferEntries(Heap* heap, PagedSpace* space) {
312 PageIterator it(space); 320 PageIterator it(space);
313 while (it.has_next()) { 321 while (it.has_next()) {
314 Page* p = it.next(); 322 Page* p = it.next();
315 SlotsBuffer::VerifySlots(heap, p->slots_buffer()); 323 SlotsBuffer::VerifySlots(heap, p->slots_buffer());
(...skipping 4296 matching lines...) Expand 10 before | Expand all | Expand 10 after
4612 MarkBit mark_bit = Marking::MarkBitFrom(host); 4620 MarkBit mark_bit = Marking::MarkBitFrom(host);
4613 if (Marking::IsBlack(mark_bit)) { 4621 if (Marking::IsBlack(mark_bit)) {
4614 RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host); 4622 RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host);
4615 RecordRelocSlot(&rinfo, target); 4623 RecordRelocSlot(&rinfo, target);
4616 } 4624 }
4617 } 4625 }
4618 } 4626 }
4619 4627
4620 } // namespace internal 4628 } // namespace internal
4621 } // namespace v8 4629 } // 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