| 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" |
| 11 #include "vm/base_isolate.h" | 11 #include "vm/base_isolate.h" |
| 12 #include "vm/class_table.h" | 12 #include "vm/class_table.h" |
| 13 #include "vm/handles.h" | 13 #include "vm/handles.h" |
| 14 #include "vm/megamorphic_cache_table.h" | 14 #include "vm/megamorphic_cache_table.h" |
| 15 #include "vm/metrics.h" | 15 #include "vm/metrics.h" |
| 16 #include "vm/random.h" | 16 #include "vm/random.h" |
| 17 #include "vm/tags.h" | 17 #include "vm/tags.h" |
| 18 #include "vm/thread.h" | 18 #include "vm/thread.h" |
| 19 #include "vm/os_thread.h" | 19 #include "vm/os_thread.h" |
| 20 #include "vm/timeline.h" | 20 #include "vm/timeline.h" |
| 21 #include "vm/timer.h" | 21 #include "vm/timer.h" |
| 22 #include "vm/trace_buffer.h" | 22 #include "vm/trace_buffer.h" |
| 23 | 23 |
| 24 namespace dart { | 24 namespace dart { |
| 25 | 25 |
| 26 // Forward declarations. | 26 // Forward declarations. |
| 27 class AbstractType; | 27 class AbstractType; |
| 28 class ApiState; | 28 class ApiState; |
| 29 class Array; | 29 class Array; |
| 30 class BackgroundCompiler; |
| 30 class Capability; | 31 class Capability; |
| 31 class CHA; | 32 class CHA; |
| 32 class Class; | 33 class Class; |
| 33 class Code; | 34 class Code; |
| 34 class CodeIndexTable; | 35 class CodeIndexTable; |
| 35 class CompilerStats; | 36 class CompilerStats; |
| 36 class Debugger; | 37 class Debugger; |
| 37 class DeoptContext; | 38 class DeoptContext; |
| 38 class Error; | 39 class Error; |
| 39 class ExceptionHandlers; | 40 class ExceptionHandlers; |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 TraceBuffer* trace_buffer() { | 594 TraceBuffer* trace_buffer() { |
| 594 return trace_buffer_; | 595 return trace_buffer_; |
| 595 } | 596 } |
| 596 | 597 |
| 597 DeoptContext* deopt_context() const { return deopt_context_; } | 598 DeoptContext* deopt_context() const { return deopt_context_; } |
| 598 void set_deopt_context(DeoptContext* value) { | 599 void set_deopt_context(DeoptContext* value) { |
| 599 ASSERT(value == NULL || deopt_context_ == NULL); | 600 ASSERT(value == NULL || deopt_context_ == NULL); |
| 600 deopt_context_ = value; | 601 deopt_context_ = value; |
| 601 } | 602 } |
| 602 | 603 |
| 604 BackgroundCompiler* background_compiler() const { |
| 605 return background_compiler_; |
| 606 } |
| 607 void set_background_compiler(BackgroundCompiler* value) { |
| 608 background_compiler_ = value; |
| 609 } |
| 610 |
| 603 void UpdateLastAllocationProfileAccumulatorResetTimestamp() { | 611 void UpdateLastAllocationProfileAccumulatorResetTimestamp() { |
| 604 last_allocationprofile_accumulator_reset_timestamp_ = | 612 last_allocationprofile_accumulator_reset_timestamp_ = |
| 605 OS::GetCurrentTimeMillis(); | 613 OS::GetCurrentTimeMillis(); |
| 606 } | 614 } |
| 607 | 615 |
| 608 int64_t last_allocationprofile_accumulator_reset_timestamp() const { | 616 int64_t last_allocationprofile_accumulator_reset_timestamp() const { |
| 609 return last_allocationprofile_accumulator_reset_timestamp_; | 617 return last_allocationprofile_accumulator_reset_timestamp_; |
| 610 } | 618 } |
| 611 | 619 |
| 612 void UpdateLastAllocationProfileGCTimestamp() { | 620 void UpdateLastAllocationProfileGCTimestamp() { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 void set_current_tag(const UserTag& tag); | 697 void set_current_tag(const UserTag& tag); |
| 690 | 698 |
| 691 RawUserTag* default_tag() const { return default_tag_; } | 699 RawUserTag* default_tag() const { return default_tag_; } |
| 692 void set_default_tag(const UserTag& tag); | 700 void set_default_tag(const UserTag& tag); |
| 693 | 701 |
| 694 RawGrowableObjectArray* collected_closures() const { | 702 RawGrowableObjectArray* collected_closures() const { |
| 695 return collected_closures_; | 703 return collected_closures_; |
| 696 } | 704 } |
| 697 void set_collected_closures(const GrowableObjectArray& value); | 705 void set_collected_closures(const GrowableObjectArray& value); |
| 698 | 706 |
| 707 RawGrowableObjectArray* background_compilation_queue() const { |
| 708 return background_compilation_queue_; |
| 709 } |
| 710 void set_background_compilation_queue(const GrowableObjectArray& value); |
| 711 |
| 699 Metric* metrics_list_head() { | 712 Metric* metrics_list_head() { |
| 700 return metrics_list_head_; | 713 return metrics_list_head_; |
| 701 } | 714 } |
| 702 | 715 |
| 703 void set_metrics_list_head(Metric* metric) { | 716 void set_metrics_list_head(Metric* metric) { |
| 704 metrics_list_head_ = metric; | 717 metrics_list_head_ = metric; |
| 705 } | 718 } |
| 706 | 719 |
| 707 RawGrowableObjectArray* deoptimized_code_array() const { | 720 RawGrowableObjectArray* deoptimized_code_array() const { |
| 708 return deoptimized_code_array_; | 721 return deoptimized_code_array_; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 uword stack_base_; | 880 uword stack_base_; |
| 868 uword stack_overflow_flags_; | 881 uword stack_overflow_flags_; |
| 869 int32_t stack_overflow_count_; | 882 int32_t stack_overflow_count_; |
| 870 MessageHandler* message_handler_; | 883 MessageHandler* message_handler_; |
| 871 IsolateSpawnState* spawn_state_; | 884 IsolateSpawnState* spawn_state_; |
| 872 bool is_runnable_; | 885 bool is_runnable_; |
| 873 Dart_GcPrologueCallback gc_prologue_callback_; | 886 Dart_GcPrologueCallback gc_prologue_callback_; |
| 874 Dart_GcEpilogueCallback gc_epilogue_callback_; | 887 Dart_GcEpilogueCallback gc_epilogue_callback_; |
| 875 intptr_t defer_finalization_count_; | 888 intptr_t defer_finalization_count_; |
| 876 DeoptContext* deopt_context_; | 889 DeoptContext* deopt_context_; |
| 890 BackgroundCompiler* background_compiler_; |
| 877 | 891 |
| 878 CompilerStats* compiler_stats_; | 892 CompilerStats* compiler_stats_; |
| 879 | 893 |
| 880 bool is_service_isolate_; | 894 bool is_service_isolate_; |
| 881 | 895 |
| 882 // Status support. | 896 // Status support. |
| 883 char* stacktrace_; | 897 char* stacktrace_; |
| 884 intptr_t stack_frame_index_; | 898 intptr_t stack_frame_index_; |
| 885 | 899 |
| 886 // Timestamps of last operation via service. | 900 // Timestamps of last operation via service. |
| 887 int64_t last_allocationprofile_accumulator_reset_timestamp_; | 901 int64_t last_allocationprofile_accumulator_reset_timestamp_; |
| 888 int64_t last_allocationprofile_gc_timestamp_; | 902 int64_t last_allocationprofile_gc_timestamp_; |
| 889 | 903 |
| 890 // Ring buffer of objects assigned an id. | 904 // Ring buffer of objects assigned an id. |
| 891 ObjectIdRing* object_id_ring_; | 905 ObjectIdRing* object_id_ring_; |
| 892 | 906 |
| 893 // Trace buffer support. | 907 // Trace buffer support. |
| 894 TraceBuffer* trace_buffer_; | 908 TraceBuffer* trace_buffer_; |
| 895 | 909 |
| 896 IsolateProfilerData* profiler_data_; | 910 IsolateProfilerData* profiler_data_; |
| 897 Mutex profiler_data_mutex_; | 911 Mutex profiler_data_mutex_; |
| 898 | 912 |
| 899 VMTagCounters vm_tag_counters_; | 913 VMTagCounters vm_tag_counters_; |
| 900 RawGrowableObjectArray* tag_table_; | 914 RawGrowableObjectArray* tag_table_; |
| 901 | 915 |
| 902 | 916 |
| 903 RawGrowableObjectArray* collected_closures_; | 917 RawGrowableObjectArray* collected_closures_; |
| 904 RawGrowableObjectArray* deoptimized_code_array_; | 918 RawGrowableObjectArray* deoptimized_code_array_; |
| 919 RawGrowableObjectArray* background_compilation_queue_; |
| 905 | 920 |
| 906 // We use 6 list entries for each pending service extension calls. | 921 // We use 6 list entries for each pending service extension calls. |
| 907 enum { | 922 enum { |
| 908 kPendingHandlerIndex = 0, | 923 kPendingHandlerIndex = 0, |
| 909 kPendingMethodNameIndex, | 924 kPendingMethodNameIndex, |
| 910 kPendingKeysIndex, | 925 kPendingKeysIndex, |
| 911 kPendingValuesIndex, | 926 kPendingValuesIndex, |
| 912 kPendingReplyPortIndex, | 927 kPendingReplyPortIndex, |
| 913 kPendingIdIndex, | 928 kPendingIdIndex, |
| 914 kPendingEntrySize | 929 kPendingEntrySize |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 uint8_t* serialized_message_; | 1152 uint8_t* serialized_message_; |
| 1138 intptr_t serialized_message_len_; | 1153 intptr_t serialized_message_len_; |
| 1139 Isolate::Flags isolate_flags_; | 1154 Isolate::Flags isolate_flags_; |
| 1140 bool paused_; | 1155 bool paused_; |
| 1141 bool errors_are_fatal_; | 1156 bool errors_are_fatal_; |
| 1142 }; | 1157 }; |
| 1143 | 1158 |
| 1144 } // namespace dart | 1159 } // namespace dart |
| 1145 | 1160 |
| 1146 #endif // VM_ISOLATE_H_ | 1161 #endif // VM_ISOLATE_H_ |
| OLD | NEW |