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

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

Issue 997423002: Use the incremental root marking visitor for overapproximating the weak closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 9 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
« src/heap/incremental-marking.cc ('K') | « src/heap/mark-compact.h ('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 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 if (marking_deque_memory_committed_) { 2217 if (marking_deque_memory_committed_) {
2218 bool success = marking_deque_memory_->Uncommit( 2218 bool success = marking_deque_memory_->Uncommit(
2219 reinterpret_cast<Address>(marking_deque_memory_->address()), 2219 reinterpret_cast<Address>(marking_deque_memory_->address()),
2220 marking_deque_memory_->size()); 2220 marking_deque_memory_->size());
2221 CHECK(success); 2221 CHECK(success);
2222 marking_deque_memory_committed_ = false; 2222 marking_deque_memory_committed_ = false;
2223 } 2223 }
2224 } 2224 }
2225 2225
2226 2226
2227 void MarkCompactCollector::OverApproximateWeakClosure() {
2228 GCTracer::Scope gc_scope(heap()->tracer(),
2229 GCTracer::Scope::MC_INCREMENTAL_WEAKCLOSURE);
2230
2231 RootMarkingVisitor root_visitor(heap());
2232 isolate()->global_handles()->IterateObjectGroups(
2233 &root_visitor, &IsUnmarkedHeapObjectWithHeap);
2234 MarkImplicitRefGroups();
2235
2236 // Remove object groups after marking phase.
2237 heap()->isolate()->global_handles()->RemoveObjectGroups();
2238 heap()->isolate()->global_handles()->RemoveImplicitRefGroups();
2239 }
2240
2241
2242 void MarkCompactCollector::MarkLiveObjects() { 2227 void MarkCompactCollector::MarkLiveObjects() {
2243 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_MARK); 2228 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_MARK);
2244 double start_time = 0.0; 2229 double start_time = 0.0;
2245 if (FLAG_print_cumulative_gc_stat) { 2230 if (FLAG_print_cumulative_gc_stat) {
2246 start_time = base::OS::TimeCurrentMillis(); 2231 start_time = base::OS::TimeCurrentMillis();
2247 } 2232 }
2248 // The recursive GC marker detects when it is nearing stack overflow, 2233 // The recursive GC marker detects when it is nearing stack overflow,
2249 // and switches to a different marking system. JS interrupts interfere 2234 // and switches to a different marking system. JS interrupts interfere
2250 // with the C stack limit check. 2235 // with the C stack limit check.
2251 PostponeInterruptsScope postpone(isolate()); 2236 PostponeInterruptsScope postpone(isolate());
(...skipping 2404 matching lines...) Expand 10 before | Expand all | Expand 10 after
4656 SlotsBuffer* buffer = *buffer_address; 4641 SlotsBuffer* buffer = *buffer_address;
4657 while (buffer != NULL) { 4642 while (buffer != NULL) {
4658 SlotsBuffer* next_buffer = buffer->next(); 4643 SlotsBuffer* next_buffer = buffer->next();
4659 DeallocateBuffer(buffer); 4644 DeallocateBuffer(buffer);
4660 buffer = next_buffer; 4645 buffer = next_buffer;
4661 } 4646 }
4662 *buffer_address = NULL; 4647 *buffer_address = NULL;
4663 } 4648 }
4664 } 4649 }
4665 } // namespace v8::internal 4650 } // namespace v8::internal
OLDNEW
« src/heap/incremental-marking.cc ('K') | « src/heap/mark-compact.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698