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

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: 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
« no previous file with comments | « src/heap/incremental-marking.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 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() { 2227 void MarkCompactCollector::OverApproximateWeakClosure() {
2228 GCTracer::Scope gc_scope(heap()->tracer(), 2228 GCTracer::Scope gc_scope(heap()->tracer(),
2229 GCTracer::Scope::MC_INCREMENTAL_WEAKCLOSURE); 2229 GCTracer::Scope::MC_INCREMENTAL_WEAKCLOSURE);
2230 2230
2231 RootMarkingVisitor root_visitor(heap()); 2231 ObjectVisitor* root_visitor =
2232 heap()->incremental_marking()->CreateRootMarkingVisitor();
Hannes Payer (out of office) 2015/03/12 12:28:48 Instead of allocating the incremental root marking
2232 isolate()->global_handles()->IterateObjectGroups( 2233 isolate()->global_handles()->IterateObjectGroups(
2233 &root_visitor, &IsUnmarkedHeapObjectWithHeap); 2234 root_visitor, &IsUnmarkedHeapObjectWithHeap);
2235 delete root_visitor;
2236
2234 MarkImplicitRefGroups(); 2237 MarkImplicitRefGroups();
2235 2238
2236 // Remove object groups after marking phase. 2239 // Remove object groups after marking phase.
2237 heap()->isolate()->global_handles()->RemoveObjectGroups(); 2240 heap()->isolate()->global_handles()->RemoveObjectGroups();
2238 heap()->isolate()->global_handles()->RemoveImplicitRefGroups(); 2241 heap()->isolate()->global_handles()->RemoveImplicitRefGroups();
2239 } 2242 }
2240 2243
2241 2244
2242 void MarkCompactCollector::MarkLiveObjects() { 2245 void MarkCompactCollector::MarkLiveObjects() {
2243 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_MARK); 2246 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_MARK);
(...skipping 2412 matching lines...) Expand 10 before | Expand all | Expand 10 after
4656 SlotsBuffer* buffer = *buffer_address; 4659 SlotsBuffer* buffer = *buffer_address;
4657 while (buffer != NULL) { 4660 while (buffer != NULL) {
4658 SlotsBuffer* next_buffer = buffer->next(); 4661 SlotsBuffer* next_buffer = buffer->next();
4659 DeallocateBuffer(buffer); 4662 DeallocateBuffer(buffer);
4660 buffer = next_buffer; 4663 buffer = next_buffer;
4661 } 4664 }
4662 *buffer_address = NULL; 4665 *buffer_address = NULL;
4663 } 4666 }
4664 } 4667 }
4665 } // namespace v8::internal 4668 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698