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

Side by Side Diff: runtime/vm/thread_registry.h

Issue 1394673002: Move reusable handles from isolate to thread. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix release build 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 | « runtime/vm/thread.cc ('k') | runtime/vm/verifier.h » ('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 (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_THREAD_REGISTRY_H_ 5 #ifndef VM_THREAD_REGISTRY_H_
6 #define VM_THREAD_REGISTRY_H_ 6 #define VM_THREAD_REGISTRY_H_
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void VisitObjectPointers(ObjectPointerVisitor* visitor, 122 void VisitObjectPointers(ObjectPointerVisitor* visitor,
123 bool validate_frames) { 123 bool validate_frames) {
124 MonitorLocker ml(monitor_); 124 MonitorLocker ml(monitor_);
125 for (int i = 0; i < entries_.length(); ++i) { 125 for (int i = 0; i < entries_.length(); ++i) {
126 const Entry& entry = entries_[i]; 126 const Entry& entry = entries_[i];
127 const Thread::State& state = 127 const Thread::State& state =
128 entry.scheduled ? entry.thread->state_ : entry.state; 128 entry.scheduled ? entry.thread->state_ : entry.state;
129 if (state.zone != NULL) { 129 if (state.zone != NULL) {
130 state.zone->VisitObjectPointers(visitor); 130 state.zone->VisitObjectPointers(visitor);
131 } 131 }
132 ASSERT(entry.thread != NULL);
133 entry.thread->VisitObjectPointers(visitor);
132 // Iterate over all the stack frames and visit objects on the stack. 134 // Iterate over all the stack frames and visit objects on the stack.
133 StackFrameIterator frames_iterator(state.top_exit_frame_info, 135 StackFrameIterator frames_iterator(state.top_exit_frame_info,
134 validate_frames); 136 validate_frames);
135 StackFrame* frame = frames_iterator.NextFrame(); 137 StackFrame* frame = frames_iterator.NextFrame();
136 while (frame != NULL) { 138 while (frame != NULL) {
137 frame->VisitObjectPointers(visitor); 139 frame->VisitObjectPointers(visitor);
138 frame = frames_iterator.NextFrame(); 140 frame = frames_iterator.NextFrame();
139 } 141 }
140 } 142 }
141 } 143 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 intptr_t remaining_; // Number of threads yet to reach their safepoint. 204 intptr_t remaining_; // Number of threads yet to reach their safepoint.
203 int64_t round_; // Counter, to prevent missing updates to remaining_ 205 int64_t round_; // Counter, to prevent missing updates to remaining_
204 // (see comments in CheckSafepointLocked). 206 // (see comments in CheckSafepointLocked).
205 207
206 DISALLOW_COPY_AND_ASSIGN(ThreadRegistry); 208 DISALLOW_COPY_AND_ASSIGN(ThreadRegistry);
207 }; 209 };
208 210
209 } // namespace dart 211 } // namespace dart
210 212
211 #endif // VM_THREAD_REGISTRY_H_ 213 #endif // VM_THREAD_REGISTRY_H_
OLDNEW
« no previous file with comments | « runtime/vm/thread.cc ('k') | runtime/vm/verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698