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

Side by Side Diff: runtime/vm/thread.cc

Issue 1406413006: Timeline service protocol support with Observatory UI (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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.h ('k') | runtime/vm/thread_pool.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 (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 #include "vm/thread.h" 5 #include "vm/thread.h"
6 6
7 #include "vm/growable_array.h" 7 #include "vm/growable_array.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/lockers.h" 9 #include "vm/lockers.h"
10 #include "vm/log.h" 10 #include "vm/log.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 #define REUSABLE_HANDLE_SCOPE_INIT(object) 207 #define REUSABLE_HANDLE_SCOPE_INIT(object)
208 #endif // defined(DEBUG) 208 #endif // defined(DEBUG)
209 209
210 #define REUSABLE_HANDLE_INITIALIZERS(object) \ 210 #define REUSABLE_HANDLE_INITIALIZERS(object) \
211 object##_handle_(NULL), 211 object##_handle_(NULL),
212 212
213 213
214 Thread::Thread(bool init_vm_constants) 214 Thread::Thread(bool init_vm_constants)
215 : id_(OSThread::GetCurrentThreadId()), 215 : id_(OSThread::GetCurrentThreadId()),
216 join_id_(OSThread::GetCurrentThreadJoinId()), 216 join_id_(OSThread::GetCurrentThreadJoinId()),
217 trace_id_(OSThread::GetCurrentThreadTraceId()),
217 thread_interrupt_disabled_(1), // Thread interrupts disabled by default. 218 thread_interrupt_disabled_(1), // Thread interrupts disabled by default.
218 isolate_(NULL), 219 isolate_(NULL),
219 heap_(NULL), 220 heap_(NULL),
220 timeline_block_(NULL), 221 timeline_block_(NULL),
221 store_buffer_block_(NULL), 222 store_buffer_block_(NULL),
222 log_(new class Log()), 223 log_(new class Log()),
223 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS) 224 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
224 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT) 225 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT)
225 reusable_handles_(), 226 reusable_handles_(),
226 cha_(NULL), 227 cha_(NULL),
227 deopt_id_(0), 228 deopt_id_(0),
228 vm_tag_(0), 229 vm_tag_(0),
229 pending_functions_(GrowableObjectArray::null()), 230 pending_functions_(GrowableObjectArray::null()),
230 no_callback_scope_depth_(0), 231 no_callback_scope_depth_(0),
231 thread_list_next_(NULL) { 232 thread_list_next_(NULL),
233 name_(NULL) {
232 ClearState(); 234 ClearState();
233 235
234 #define DEFAULT_INIT(type_name, member_name, init_expr, default_init_value) \ 236 #define DEFAULT_INIT(type_name, member_name, init_expr, default_init_value) \
235 member_name = default_init_value; 237 member_name = default_init_value;
236 CACHED_CONSTANTS_LIST(DEFAULT_INIT) 238 CACHED_CONSTANTS_LIST(DEFAULT_INIT)
237 #undef DEFAULT_INIT 239 #undef DEFAULT_INIT
238 240
239 #define DEFAULT_INIT(name) \ 241 #define DEFAULT_INIT(name) \
240 name##_entry_point_ = 0; 242 name##_entry_point_ = 0;
241 RUNTIME_ENTRY_LIST(DEFAULT_INIT) 243 RUNTIME_ENTRY_LIST(DEFAULT_INIT)
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 } 612 }
611 613
612 614
613 DisableThreadInterruptsScope::~DisableThreadInterruptsScope() { 615 DisableThreadInterruptsScope::~DisableThreadInterruptsScope() {
614 if (thread() != NULL) { 616 if (thread() != NULL) {
615 thread()->EnableThreadInterrupts(); 617 thread()->EnableThreadInterrupts();
616 } 618 }
617 } 619 }
618 620
619 } // namespace dart 621 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/thread.h ('k') | runtime/vm/thread_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698