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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 intptr_t UnblockClassFinalization() { | 543 intptr_t UnblockClassFinalization() { |
544 ASSERT(defer_finalization_count_ > 0); | 544 ASSERT(defer_finalization_count_ > 0); |
545 return defer_finalization_count_--; | 545 return defer_finalization_count_--; |
546 } | 546 } |
547 | 547 |
548 bool AllowClassFinalization() { | 548 bool AllowClassFinalization() { |
549 ASSERT(defer_finalization_count_ >= 0); | 549 ASSERT(defer_finalization_count_ >= 0); |
550 return defer_finalization_count_ == 0; | 550 return defer_finalization_count_ == 0; |
551 } | 551 } |
552 | 552 |
553 Mutex* profiler_data_mutex() { | |
554 return &profiler_data_mutex_; | |
555 } | |
556 | |
557 void set_profiler_data(IsolateProfilerData* profiler_data) { | |
558 profiler_data_ = profiler_data; | |
559 } | |
560 | |
561 IsolateProfilerData* profiler_data() const { | |
562 return profiler_data_; | |
563 } | |
564 | |
565 void PrintJSON(JSONStream* stream, bool ref = true); | 553 void PrintJSON(JSONStream* stream, bool ref = true); |
566 | 554 |
567 CompilerStats* compiler_stats() { | 555 CompilerStats* compiler_stats() { |
568 return compiler_stats_; | 556 return compiler_stats_; |
569 } | 557 } |
570 | 558 |
571 // Returns the number of sampled threads. | |
572 intptr_t ProfileInterrupt(); | |
573 | |
574 VMTagCounters* vm_tag_counters() { | 559 VMTagCounters* vm_tag_counters() { |
575 return &vm_tag_counters_; | 560 return &vm_tag_counters_; |
576 } | 561 } |
577 | 562 |
578 uword user_tag() const { | 563 uword user_tag() const { |
579 return user_tag_; | 564 return user_tag_; |
580 } | 565 } |
581 static intptr_t user_tag_offset() { | 566 static intptr_t user_tag_offset() { |
582 return OFFSET_OF(Isolate, user_tag_); | 567 return OFFSET_OF(Isolate, user_tag_); |
583 } | 568 } |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 // Timestamps of last operation via service. | 774 // Timestamps of last operation via service. |
790 int64_t last_allocationprofile_accumulator_reset_timestamp_; | 775 int64_t last_allocationprofile_accumulator_reset_timestamp_; |
791 int64_t last_allocationprofile_gc_timestamp_; | 776 int64_t last_allocationprofile_gc_timestamp_; |
792 | 777 |
793 // Ring buffer of objects assigned an id. | 778 // Ring buffer of objects assigned an id. |
794 ObjectIdRing* object_id_ring_; | 779 ObjectIdRing* object_id_ring_; |
795 | 780 |
796 // Trace buffer support. | 781 // Trace buffer support. |
797 TraceBuffer* trace_buffer_; | 782 TraceBuffer* trace_buffer_; |
798 | 783 |
799 IsolateProfilerData* profiler_data_; | |
800 Mutex profiler_data_mutex_; | |
801 | |
802 VMTagCounters vm_tag_counters_; | 784 VMTagCounters vm_tag_counters_; |
803 RawGrowableObjectArray* tag_table_; | 785 RawGrowableObjectArray* tag_table_; |
804 | 786 |
805 RawGrowableObjectArray* deoptimized_code_array_; | 787 RawGrowableObjectArray* deoptimized_code_array_; |
806 | 788 |
807 // Background compilation. | 789 // Background compilation. |
808 BackgroundCompiler* background_compiler_; | 790 BackgroundCompiler* background_compiler_; |
809 | 791 |
810 // We use 6 list entries for each pending service extension calls. | 792 // We use 6 list entries for each pending service extension calls. |
811 enum { | 793 enum { |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 uint8_t* serialized_message_; | 1013 uint8_t* serialized_message_; |
1032 intptr_t serialized_message_len_; | 1014 intptr_t serialized_message_len_; |
1033 Isolate::Flags isolate_flags_; | 1015 Isolate::Flags isolate_flags_; |
1034 bool paused_; | 1016 bool paused_; |
1035 bool errors_are_fatal_; | 1017 bool errors_are_fatal_; |
1036 }; | 1018 }; |
1037 | 1019 |
1038 } // namespace dart | 1020 } // namespace dart |
1039 | 1021 |
1040 #endif // VM_ISOLATE_H_ | 1022 #endif // VM_ISOLATE_H_ |
OLD | NEW |