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

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

Issue 2646443005: Track async causal stack traces (Closed)
Patch Set: rebase Created 3 years, 10 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/vm_sources.gypi » ('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 RUNTIME_VM_THREAD_REGISTRY_H_ 5 #ifndef RUNTIME_VM_THREAD_REGISTRY_H_
6 #define RUNTIME_VM_THREAD_REGISTRY_H_ 6 #define RUNTIME_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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 Thread* free_list_; // Free list of Thread objects that can be reused. 61 Thread* free_list_; // Free list of Thread objects that can be reused.
62 62
63 // TODO(asiva): Currently we treat a mutator thread as a special thread 63 // TODO(asiva): Currently we treat a mutator thread as a special thread
64 // and always schedule execution of Dart code on the same mutator thread 64 // and always schedule execution of Dart code on the same mutator thread
65 // object. The ApiLocalScope has been made thread specific but we still 65 // object. The ApiLocalScope has been made thread specific but we still
66 // have scenarios where we do a temporary exit of an Isolate with live 66 // have scenarios where we do a temporary exit of an Isolate with live
67 // zones/handles in the API scope : 67 // zones/handles in the API scope :
68 // - Dart_RunLoop() 68 // - Dart_RunLoop()
69 // - IsolateSaver in Dart_NewNativePort 69 // - IsolateSaver in Dart_NewNativePort
70 // - Isolate spawn (function/uri) under FLAG_i_like_slow_isolate_spawn 70 // - Isolate spawn (function/uri) under FLAG_i_like_slow_isolate_spawn
71 // Similarly, tracking async_stack_trace requires that we always reschedule
72 // on the same thread.
71 // We probably need a mechanism to return to the specific thread only 73 // We probably need a mechanism to return to the specific thread only
72 // for these specific cases. We should also determine if the embedder 74 // for these specific cases. We should also determine if the embedder
73 // should allow exiting an isolate with live state in zones/handles in 75 // should allow exiting an isolate with live state in zones/handles in
74 // which case a new API for returning to the specific thread needs to be 76 // which case a new API for returning to the specific thread needs to be
75 // added. 77 // added.
76 Thread* mutator_thread_; 78 Thread* mutator_thread_;
77 79
78 friend class Isolate; 80 friend class Isolate;
79 friend class SafepointHandler; 81 friend class SafepointHandler;
80 DISALLOW_COPY_AND_ASSIGN(ThreadRegistry); 82 DISALLOW_COPY_AND_ASSIGN(ThreadRegistry);
81 }; 83 };
82 84
83 } // namespace dart 85 } // namespace dart
84 86
85 #endif // RUNTIME_VM_THREAD_REGISTRY_H_ 87 #endif // RUNTIME_VM_THREAD_REGISTRY_H_
OLDNEW
« no previous file with comments | « runtime/vm/thread.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698