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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 // Protect access to boxed_field_list_. | 832 // Protect access to boxed_field_list_. |
833 Mutex* field_list_mutex_; | 833 Mutex* field_list_mutex_; |
834 // List of fields that became boxed and that trigger deoptimization. | 834 // List of fields that became boxed and that trigger deoptimization. |
835 RawGrowableObjectArray* boxed_field_list_; | 835 RawGrowableObjectArray* boxed_field_list_; |
836 | 836 |
837 // This guards spawn_count_. An isolate cannot complete shutdown and be | 837 // This guards spawn_count_. An isolate cannot complete shutdown and be |
838 // destroyed while there are child isolates in the midst of a spawn. | 838 // destroyed while there are child isolates in the midst of a spawn. |
839 Monitor* spawn_count_monitor_; | 839 Monitor* spawn_count_monitor_; |
840 intptr_t spawn_count_; | 840 intptr_t spawn_count_; |
841 | 841 |
| 842 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ |
| 843 type metric_##variable##_; |
| 844 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); |
| 845 #undef ISOLATE_METRIC_VARIABLE |
| 846 |
842 // Has a reload ever been attempted? | 847 // Has a reload ever been attempted? |
843 bool has_attempted_reload_; | 848 bool has_attempted_reload_; |
844 intptr_t no_reload_scope_depth_; // we can only reload when this is 0. | 849 intptr_t no_reload_scope_depth_; // we can only reload when this is 0. |
845 // Per-isolate copy of FLAG_reload_every. | 850 // Per-isolate copy of FLAG_reload_every. |
846 intptr_t reload_every_n_stack_overflow_checks_; | 851 intptr_t reload_every_n_stack_overflow_checks_; |
847 IsolateReloadContext* reload_context_; | 852 IsolateReloadContext* reload_context_; |
848 int64_t last_reload_timestamp_; | 853 int64_t last_reload_timestamp_; |
849 | 854 |
850 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ | |
851 type metric_##variable##_; | |
852 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); | |
853 #undef ISOLATE_METRIC_VARIABLE | |
854 | |
855 | 855 |
856 static Dart_IsolateCreateCallback create_callback_; | 856 static Dart_IsolateCreateCallback create_callback_; |
857 static Dart_IsolateShutdownCallback shutdown_callback_; | 857 static Dart_IsolateShutdownCallback shutdown_callback_; |
858 | 858 |
859 static void WakePauseEventHandler(Dart_Isolate isolate); | 859 static void WakePauseEventHandler(Dart_Isolate isolate); |
860 | 860 |
861 // Manage list of existing isolates. | 861 // Manage list of existing isolates. |
862 static bool AddIsolateToList(Isolate* isolate); | 862 static bool AddIsolateToList(Isolate* isolate); |
863 static void RemoveIsolateFromList(Isolate* isolate); | 863 static void RemoveIsolateFromList(Isolate* isolate); |
864 | 864 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 intptr_t* spawn_count_; | 1008 intptr_t* spawn_count_; |
1009 | 1009 |
1010 Dart_IsolateFlags isolate_flags_; | 1010 Dart_IsolateFlags isolate_flags_; |
1011 bool paused_; | 1011 bool paused_; |
1012 bool errors_are_fatal_; | 1012 bool errors_are_fatal_; |
1013 }; | 1013 }; |
1014 | 1014 |
1015 } // namespace dart | 1015 } // namespace dart |
1016 | 1016 |
1017 #endif // VM_ISOLATE_H_ | 1017 #endif // VM_ISOLATE_H_ |
OLD | NEW |