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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 // Protect access to boxed_field_list_. | 814 // Protect access to boxed_field_list_. |
815 Mutex* field_list_mutex_; | 815 Mutex* field_list_mutex_; |
816 // List of fields that became boxed and that trigger deoptimization. | 816 // List of fields that became boxed and that trigger deoptimization. |
817 RawGrowableObjectArray* boxed_field_list_; | 817 RawGrowableObjectArray* boxed_field_list_; |
818 | 818 |
819 // This guards spawn_count_. An isolate cannot complete shutdown and be | 819 // This guards spawn_count_. An isolate cannot complete shutdown and be |
820 // destroyed while there are child isolates in the midst of a spawn. | 820 // destroyed while there are child isolates in the midst of a spawn. |
821 Monitor* spawn_count_monitor_; | 821 Monitor* spawn_count_monitor_; |
822 intptr_t spawn_count_; | 822 intptr_t spawn_count_; |
823 | 823 |
| 824 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ |
| 825 type metric_##variable##_; |
| 826 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); |
| 827 #undef ISOLATE_METRIC_VARIABLE |
| 828 |
824 // Has a reload ever been attempted? | 829 // Has a reload ever been attempted? |
825 bool has_attempted_reload_; | 830 bool has_attempted_reload_; |
826 intptr_t no_reload_scope_depth_; // we can only reload when this is 0. | 831 intptr_t no_reload_scope_depth_; // we can only reload when this is 0. |
827 // Per-isolate copy of FLAG_reload_every. | 832 // Per-isolate copy of FLAG_reload_every. |
828 intptr_t reload_every_n_stack_overflow_checks_; | 833 intptr_t reload_every_n_stack_overflow_checks_; |
829 IsolateReloadContext* reload_context_; | 834 IsolateReloadContext* reload_context_; |
830 int64_t last_reload_timestamp_; | 835 int64_t last_reload_timestamp_; |
831 | 836 |
832 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ | |
833 type metric_##variable##_; | |
834 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); | |
835 #undef ISOLATE_METRIC_VARIABLE | |
836 | |
837 | 837 |
838 static Dart_IsolateCreateCallback create_callback_; | 838 static Dart_IsolateCreateCallback create_callback_; |
839 static Dart_IsolateShutdownCallback shutdown_callback_; | 839 static Dart_IsolateShutdownCallback shutdown_callback_; |
840 | 840 |
841 static void WakePauseEventHandler(Dart_Isolate isolate); | 841 static void WakePauseEventHandler(Dart_Isolate isolate); |
842 | 842 |
843 // Manage list of existing isolates. | 843 // Manage list of existing isolates. |
844 static bool AddIsolateToList(Isolate* isolate); | 844 static bool AddIsolateToList(Isolate* isolate); |
845 static void RemoveIsolateFromList(Isolate* isolate); | 845 static void RemoveIsolateFromList(Isolate* isolate); |
846 | 846 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 intptr_t* spawn_count_; | 990 intptr_t* spawn_count_; |
991 | 991 |
992 Dart_IsolateFlags isolate_flags_; | 992 Dart_IsolateFlags isolate_flags_; |
993 bool paused_; | 993 bool paused_; |
994 bool errors_are_fatal_; | 994 bool errors_are_fatal_; |
995 }; | 995 }; |
996 | 996 |
997 } // namespace dart | 997 } // namespace dart |
998 | 998 |
999 #endif // VM_ISOLATE_H_ | 999 #endif // VM_ISOLATE_H_ |
OLD | NEW |