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

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

Issue 1007863003: Allow Observatory debugger to switch isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 | Annotate | Revision Log
« no previous file with comments | « runtime/platform/utils.h ('k') | runtime/vm/isolate.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_ISOLATE_H_ 5 #ifndef VM_ISOLATE_H_
6 #define VM_ISOLATE_H_ 6 #define VM_ISOLATE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/base_isolate.h" 10 #include "vm/base_isolate.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // TODO(koda): Remove after caching current thread in generated code. 171 // TODO(koda): Remove after caching current thread in generated code.
172 Thread* mutator_thread() { 172 Thread* mutator_thread() {
173 DEBUG_ASSERT(IsIsolateOf(mutator_thread_)); 173 DEBUG_ASSERT(IsIsolateOf(mutator_thread_));
174 return mutator_thread_; 174 return mutator_thread_;
175 } 175 }
176 #if defined(DEBUG) 176 #if defined(DEBUG)
177 bool IsIsolateOf(Thread* thread); 177 bool IsIsolateOf(Thread* thread);
178 #endif // DEBUG 178 #endif // DEBUG
179 179
180 const char* name() const { return name_; } 180 const char* name() const { return name_; }
181 const char* debugger_name() const { return debugger_name_; }
182 void set_debugger_name(const char* name);
183
181 // TODO(koda): Move to Thread. 184 // TODO(koda): Move to Thread.
182 class Log* Log() const; 185 class Log* Log() const;
183 186
184 int64_t start_time() const { return start_time_; } 187 int64_t start_time() const { return start_time_; }
185 188
186 Dart_Port main_port() const { return main_port_; } 189 Dart_Port main_port() const { return main_port_; }
187 void set_main_port(Dart_Port port) { 190 void set_main_port(Dart_Port port) {
188 ASSERT(main_port_ == 0); // Only set main port once. 191 ASSERT(main_port_ == 0); // Only set main port once.
189 main_port_ = port; 192 main_port_ = port;
190 } 193 }
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 685
683 template<class T> T* AllocateReusableHandle(); 686 template<class T> T* AllocateReusableHandle();
684 687
685 Thread* mutator_thread_; 688 Thread* mutator_thread_;
686 uword vm_tag_; 689 uword vm_tag_;
687 StoreBuffer store_buffer_; 690 StoreBuffer store_buffer_;
688 ClassTable class_table_; 691 ClassTable class_table_;
689 MegamorphicCacheTable megamorphic_cache_table_; 692 MegamorphicCacheTable megamorphic_cache_table_;
690 Dart_MessageNotifyCallback message_notify_callback_; 693 Dart_MessageNotifyCallback message_notify_callback_;
691 char* name_; 694 char* name_;
695 char* debugger_name_;
692 int64_t start_time_; 696 int64_t start_time_;
693 Dart_Port main_port_; 697 Dart_Port main_port_;
694 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. 698 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id.
695 uint64_t pause_capability_; 699 uint64_t pause_capability_;
696 uint64_t terminate_capability_; 700 uint64_t terminate_capability_;
697 bool errors_fatal_; 701 bool errors_fatal_;
698 Heap* heap_; 702 Heap* heap_;
699 ObjectStore* object_store_; 703 ObjectStore* object_store_;
700 uword top_exit_frame_info_; 704 uword top_exit_frame_info_;
701 void* init_callback_data_; 705 void* init_callback_data_;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 static Dart_FileReadCallback file_read_callback_; 796 static Dart_FileReadCallback file_read_callback_;
793 static Dart_FileWriteCallback file_write_callback_; 797 static Dart_FileWriteCallback file_write_callback_;
794 static Dart_FileCloseCallback file_close_callback_; 798 static Dart_FileCloseCallback file_close_callback_;
795 static Dart_EntropySource entropy_source_callback_; 799 static Dart_EntropySource entropy_source_callback_;
796 static Dart_IsolateInterruptCallback vmstats_callback_; 800 static Dart_IsolateInterruptCallback vmstats_callback_;
797 801
798 // Manage list of existing isolates. 802 // Manage list of existing isolates.
799 static void AddIsolateTolist(Isolate* isolate); 803 static void AddIsolateTolist(Isolate* isolate);
800 static void RemoveIsolateFromList(Isolate* isolate); 804 static void RemoveIsolateFromList(Isolate* isolate);
801 static void CheckForDuplicateThreadState(InterruptableThreadState* state); 805 static void CheckForDuplicateThreadState(InterruptableThreadState* state);
802 static Monitor* isolates_list_monitor_; 806
807 static Monitor* isolates_list_monitor_; // Protects isolates_list_head_
803 static Isolate* isolates_list_head_; 808 static Isolate* isolates_list_head_;
804 809
805 #define REUSABLE_FRIEND_DECLARATION(name) \ 810 #define REUSABLE_FRIEND_DECLARATION(name) \
806 friend class Reusable##name##HandleScope; 811 friend class Reusable##name##HandleScope;
807 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) 812 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION)
808 #undef REUSABLE_FRIEND_DECLARATION 813 #undef REUSABLE_FRIEND_DECLARATION
809 814
810 friend class ServiceIsolate; 815 friend class ServiceIsolate;
811 friend class Thread; 816 friend class Thread;
812 817
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 uint8_t* serialized_args_; 934 uint8_t* serialized_args_;
930 intptr_t serialized_args_len_; 935 intptr_t serialized_args_len_;
931 uint8_t* serialized_message_; 936 uint8_t* serialized_message_;
932 intptr_t serialized_message_len_; 937 intptr_t serialized_message_len_;
933 bool paused_; 938 bool paused_;
934 }; 939 };
935 940
936 } // namespace dart 941 } // namespace dart
937 942
938 #endif // VM_ISOLATE_H_ 943 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/platform/utils.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698