OLD | NEW |
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/atomic.h" | 10 #include "vm/atomic.h" |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 void set_profiler_data(IsolateProfilerData* profiler_data) { | 627 void set_profiler_data(IsolateProfilerData* profiler_data) { |
628 profiler_data_ = profiler_data; | 628 profiler_data_ = profiler_data; |
629 } | 629 } |
630 | 630 |
631 IsolateProfilerData* profiler_data() const { | 631 IsolateProfilerData* profiler_data() const { |
632 return profiler_data_; | 632 return profiler_data_; |
633 } | 633 } |
634 | 634 |
635 void PrintJSON(JSONStream* stream, bool ref = true); | 635 void PrintJSON(JSONStream* stream, bool ref = true); |
636 | 636 |
637 InterruptableThreadState* thread_state() const { | |
638 return (mutator_thread_ == NULL) ? NULL : mutator_thread_->thread_state(); | |
639 } | |
640 | |
641 CompilerStats* compiler_stats() { | 637 CompilerStats* compiler_stats() { |
642 return compiler_stats_; | 638 return compiler_stats_; |
643 } | 639 } |
644 | 640 |
645 // Returns the number of sampled threads. | 641 // Returns the number of sampled threads. |
646 intptr_t ProfileInterrupt(); | 642 intptr_t ProfileInterrupt(); |
647 | 643 |
648 VMTagCounters* vm_tag_counters() { | 644 VMTagCounters* vm_tag_counters() { |
649 return &vm_tag_counters_; | 645 return &vm_tag_counters_; |
650 } | 646 } |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 static Dart_FileWriteCallback file_write_callback_; | 906 static Dart_FileWriteCallback file_write_callback_; |
911 static Dart_FileCloseCallback file_close_callback_; | 907 static Dart_FileCloseCallback file_close_callback_; |
912 static Dart_EntropySource entropy_source_callback_; | 908 static Dart_EntropySource entropy_source_callback_; |
913 static Dart_IsolateInterruptCallback vmstats_callback_; | 909 static Dart_IsolateInterruptCallback vmstats_callback_; |
914 | 910 |
915 static void WakePauseEventHandler(Dart_Isolate isolate); | 911 static void WakePauseEventHandler(Dart_Isolate isolate); |
916 | 912 |
917 // Manage list of existing isolates. | 913 // Manage list of existing isolates. |
918 static void AddIsolateTolist(Isolate* isolate); | 914 static void AddIsolateTolist(Isolate* isolate); |
919 static void RemoveIsolateFromList(Isolate* isolate); | 915 static void RemoveIsolateFromList(Isolate* isolate); |
920 static void CheckForDuplicateThreadState(InterruptableThreadState* state); | |
921 | 916 |
922 static Monitor* isolates_list_monitor_; // Protects isolates_list_head_ | 917 static Monitor* isolates_list_monitor_; // Protects isolates_list_head_ |
923 static Isolate* isolates_list_head_; | 918 static Isolate* isolates_list_head_; |
924 | 919 |
925 #define REUSABLE_FRIEND_DECLARATION(name) \ | 920 #define REUSABLE_FRIEND_DECLARATION(name) \ |
926 friend class Reusable##name##HandleScope; | 921 friend class Reusable##name##HandleScope; |
927 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) | 922 REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) |
928 #undef REUSABLE_FRIEND_DECLARATION | 923 #undef REUSABLE_FRIEND_DECLARATION |
929 | 924 |
930 friend class GCMarker; // VisitObjectPointers | 925 friend class GCMarker; // VisitObjectPointers |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 uint8_t* serialized_message_; | 1070 uint8_t* serialized_message_; |
1076 intptr_t serialized_message_len_; | 1071 intptr_t serialized_message_len_; |
1077 Isolate::Flags isolate_flags_; | 1072 Isolate::Flags isolate_flags_; |
1078 bool paused_; | 1073 bool paused_; |
1079 bool errors_are_fatal_; | 1074 bool errors_are_fatal_; |
1080 }; | 1075 }; |
1081 | 1076 |
1082 } // namespace dart | 1077 } // namespace dart |
1083 | 1078 |
1084 #endif // VM_ISOLATE_H_ | 1079 #endif // VM_ISOLATE_H_ |
OLD | NEW |