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

Side by Side Diff: src/heap/heap.cc

Issue 2869413002: [heap] MinorMC: Only iterate new space global handles for ptr updates (Closed)
Patch Set: Created 3 years, 7 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/globals.h ('k') | src/heap/mark-compact.cc » ('j') | 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/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/ast/context-slot-cache.h" 10 #include "src/ast/context-slot-cache.h"
(...skipping 5090 matching lines...) Expand 10 before | Expand all | Expand 10 after
5101 // Iterate over local handles in handle scopes. 5101 // Iterate over local handles in handle scopes.
5102 FixStaleLeftTrimmedHandlesVisitor left_trim_visitor(this); 5102 FixStaleLeftTrimmedHandlesVisitor left_trim_visitor(this);
5103 isolate_->handle_scope_implementer()->Iterate(&left_trim_visitor); 5103 isolate_->handle_scope_implementer()->Iterate(&left_trim_visitor);
5104 isolate_->handle_scope_implementer()->Iterate(v); 5104 isolate_->handle_scope_implementer()->Iterate(v);
5105 isolate_->IterateDeferredHandles(v); 5105 isolate_->IterateDeferredHandles(v);
5106 v->Synchronize(VisitorSynchronization::kHandleScope); 5106 v->Synchronize(VisitorSynchronization::kHandleScope);
5107 5107
5108 // Iterate over the builtin code objects and code stubs in the 5108 // Iterate over the builtin code objects and code stubs in the
5109 // heap. Note that it is not necessary to iterate over code objects 5109 // heap. Note that it is not necessary to iterate over code objects
5110 // on scavenge collections. 5110 // on scavenge collections.
5111 if (mode != VISIT_ALL_IN_SCAVENGE) { 5111 if (mode != VISIT_ALL_IN_SCAVENGE && mode != VISIT_ALL_IN_MINOR_MC_UPDATE) {
5112 isolate_->builtins()->IterateBuiltins(v); 5112 isolate_->builtins()->IterateBuiltins(v);
5113 v->Synchronize(VisitorSynchronization::kBuiltins); 5113 v->Synchronize(VisitorSynchronization::kBuiltins);
5114 isolate_->interpreter()->IterateDispatchTable(v); 5114 isolate_->interpreter()->IterateDispatchTable(v);
5115 v->Synchronize(VisitorSynchronization::kDispatchTable); 5115 v->Synchronize(VisitorSynchronization::kDispatchTable);
5116 } 5116 }
5117 5117
5118 // Iterate over global handles. 5118 // Iterate over global handles.
5119 switch (mode) { 5119 switch (mode) {
5120 case VISIT_ONLY_STRONG_ROOT_LIST: 5120 case VISIT_ONLY_STRONG_ROOT_LIST:
5121 UNREACHABLE(); 5121 UNREACHABLE();
5122 break; 5122 break;
5123 case VISIT_ONLY_STRONG_FOR_SERIALIZATION: 5123 case VISIT_ONLY_STRONG_FOR_SERIALIZATION:
5124 break; 5124 break;
5125 case VISIT_ONLY_STRONG: 5125 case VISIT_ONLY_STRONG:
5126 isolate_->global_handles()->IterateStrongRoots(v); 5126 isolate_->global_handles()->IterateStrongRoots(v);
5127 break; 5127 break;
5128 case VISIT_ALL_IN_SCAVENGE: 5128 case VISIT_ALL_IN_SCAVENGE:
5129 isolate_->global_handles()->IterateNewSpaceStrongAndDependentRoots(v); 5129 isolate_->global_handles()->IterateNewSpaceStrongAndDependentRoots(v);
5130 break; 5130 break;
5131 case VISIT_ALL_IN_MINOR_MC_UPDATE:
5132 isolate_->global_handles()->IterateAllNewSpaceRoots(v);
5133 break;
5131 case VISIT_ALL_IN_SWEEP_NEWSPACE: 5134 case VISIT_ALL_IN_SWEEP_NEWSPACE:
5132 case VISIT_ALL: 5135 case VISIT_ALL:
5133 isolate_->global_handles()->IterateAllRoots(v); 5136 isolate_->global_handles()->IterateAllRoots(v);
5134 break; 5137 break;
5135 } 5138 }
5136 v->Synchronize(VisitorSynchronization::kGlobalHandles); 5139 v->Synchronize(VisitorSynchronization::kGlobalHandles);
5137 5140
5138 // Iterate over eternal handles. 5141 // Iterate over eternal handles.
5139 if (mode == VISIT_ALL_IN_SCAVENGE) { 5142 if (mode == VISIT_ALL_IN_SCAVENGE || mode == VISIT_ALL_IN_MINOR_MC_UPDATE) {
5140 isolate_->eternal_handles()->IterateNewSpaceRoots(v); 5143 isolate_->eternal_handles()->IterateNewSpaceRoots(v);
5141 } else { 5144 } else {
5142 isolate_->eternal_handles()->IterateAllRoots(v); 5145 isolate_->eternal_handles()->IterateAllRoots(v);
5143 } 5146 }
5144 v->Synchronize(VisitorSynchronization::kEternalHandles); 5147 v->Synchronize(VisitorSynchronization::kEternalHandles);
5145 5148
5146 // Iterate over pointers being held by inactive threads. 5149 // Iterate over pointers being held by inactive threads.
5147 isolate_->thread_manager()->Iterate(v); 5150 isolate_->thread_manager()->Iterate(v);
5148 v->Synchronize(VisitorSynchronization::kThreadManager); 5151 v->Synchronize(VisitorSynchronization::kThreadManager);
5149 5152
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
6528 case LO_SPACE: 6531 case LO_SPACE:
6529 return "LO_SPACE"; 6532 return "LO_SPACE";
6530 default: 6533 default:
6531 UNREACHABLE(); 6534 UNREACHABLE();
6532 } 6535 }
6533 return NULL; 6536 return NULL;
6534 } 6537 }
6535 6538
6536 } // namespace internal 6539 } // namespace internal
6537 } // namespace v8 6540 } // namespace v8
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698