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 #include "vm/isolate.h" | 5 #include "vm/isolate.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/text_buffer.h" | 10 #include "platform/text_buffer.h" |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 compilation_allowed_(true), | 831 compilation_allowed_(true), |
832 all_classes_finalized_(false), | 832 all_classes_finalized_(false), |
833 next_(NULL), | 833 next_(NULL), |
834 pause_loop_monitor_(NULL), | 834 pause_loop_monitor_(NULL), |
835 loading_invalidation_gen_(kInvalidGen), | 835 loading_invalidation_gen_(kInvalidGen), |
836 top_level_parsing_count_(0), | 836 top_level_parsing_count_(0), |
837 field_list_mutex_(new Mutex()), | 837 field_list_mutex_(new Mutex()), |
838 boxed_field_list_(GrowableObjectArray::null()), | 838 boxed_field_list_(GrowableObjectArray::null()), |
839 spawn_count_monitor_(new Monitor()), | 839 spawn_count_monitor_(new Monitor()), |
840 spawn_count_(0), | 840 spawn_count_(0), |
| 841 #define ISOLATE_METRIC_CONSTRUCTORS(type, variable, name, unit) \ |
| 842 metric_##variable##_(), |
| 843 ISOLATE_METRIC_LIST(ISOLATE_METRIC_CONSTRUCTORS) |
| 844 #undef ISOLATE_METRIC_CONSTRUCTORS |
841 has_attempted_reload_(false), | 845 has_attempted_reload_(false), |
842 no_reload_scope_depth_(0), | 846 no_reload_scope_depth_(0), |
843 reload_every_n_stack_overflow_checks_(FLAG_reload_every), | 847 reload_every_n_stack_overflow_checks_(FLAG_reload_every), |
844 reload_context_(NULL), | 848 reload_context_(NULL), |
845 last_reload_timestamp_(OS::GetCurrentTimeMillis()) { | 849 last_reload_timestamp_(OS::GetCurrentTimeMillis()) { |
846 NOT_IN_PRODUCT(FlagsCopyFrom(api_flags)); | 850 NOT_IN_PRODUCT(FlagsCopyFrom(api_flags)); |
847 // TODO(asiva): A Thread is not available here, need to figure out | 851 // TODO(asiva): A Thread is not available here, need to figure out |
848 // how the vm_tag (kEmbedderTagId) can be set, these tags need to | 852 // how the vm_tag (kEmbedderTagId) can be set, these tags need to |
849 // move to the OSThread structure. | 853 // move to the OSThread structure. |
850 set_user_tag(UserTags::kDefaultUserTag); | 854 set_user_tag(UserTags::kDefaultUserTag); |
(...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2900 void IsolateSpawnState::DecrementSpawnCount() { | 2904 void IsolateSpawnState::DecrementSpawnCount() { |
2901 ASSERT(spawn_count_monitor_ != NULL); | 2905 ASSERT(spawn_count_monitor_ != NULL); |
2902 ASSERT(spawn_count_ != NULL); | 2906 ASSERT(spawn_count_ != NULL); |
2903 MonitorLocker ml(spawn_count_monitor_); | 2907 MonitorLocker ml(spawn_count_monitor_); |
2904 ASSERT(*spawn_count_ > 0); | 2908 ASSERT(*spawn_count_ > 0); |
2905 *spawn_count_ = *spawn_count_ - 1; | 2909 *spawn_count_ = *spawn_count_ - 1; |
2906 ml.Notify(); | 2910 ml.Notify(); |
2907 } | 2911 } |
2908 | 2912 |
2909 } // namespace dart | 2913 } // namespace dart |
OLD | NEW |