Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: runtime/vm/isolate.h

Issue 1170503004: Initial Timeline Events (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/base_isolate.h" 10 #include "vm/base_isolate.h"
11 #include "vm/class_table.h" 11 #include "vm/class_table.h"
12 #include "vm/counters.h" 12 #include "vm/counters.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/store_buffer.h" 17 #include "vm/store_buffer.h"
18 #include "vm/tags.h" 18 #include "vm/tags.h"
19 #include "vm/thread.h" 19 #include "vm/thread.h"
20 #include "vm/os_thread.h" 20 #include "vm/os_thread.h"
21 #include "vm/timeline.h"
22 #include "vm/timer.h"
21 #include "vm/trace_buffer.h" 23 #include "vm/trace_buffer.h"
22 #include "vm/timer.h"
23 24
24 namespace dart { 25 namespace dart {
25 26
26 DECLARE_FLAG(bool, enable_type_checks); 27 DECLARE_FLAG(bool, enable_type_checks);
27 DECLARE_FLAG(bool, enable_asserts); 28 DECLARE_FLAG(bool, enable_asserts);
28 DECLARE_FLAG(bool, error_on_bad_type); 29 DECLARE_FLAG(bool, error_on_bad_type);
29 DECLARE_FLAG(bool, error_on_bad_override); 30 DECLARE_FLAG(bool, error_on_bad_override);
30 31
31 // Forward declarations. 32 // Forward declarations.
32 class AbstractType; 33 class AbstractType;
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 return object_id_ring_; 520 return object_id_ring_;
520 } 521 }
521 522
522 void set_trace_buffer(TraceBuffer* buffer) { 523 void set_trace_buffer(TraceBuffer* buffer) {
523 trace_buffer_ = buffer; 524 trace_buffer_ = buffer;
524 } 525 }
525 TraceBuffer* trace_buffer() { 526 TraceBuffer* trace_buffer() {
526 return trace_buffer_; 527 return trace_buffer_;
527 } 528 }
528 529
530 void SetTimelineEventBuffer(TimelineEventBuffer* timeline_event_buffer);
531
532 TimelineEventBuffer* timeline_event_buffer() {
siva 2015/06/09 22:37:56 _buffer() const {
Cutch 2015/06/10 18:20:56 Done.
533 return timeline_event_buffer_;
534 }
535
536 void RemoveTimelineEventBuffer();
537
529 DeoptContext* deopt_context() const { return deopt_context_; } 538 DeoptContext* deopt_context() const { return deopt_context_; }
530 void set_deopt_context(DeoptContext* value) { 539 void set_deopt_context(DeoptContext* value) {
531 ASSERT(value == NULL || deopt_context_ == NULL); 540 ASSERT(value == NULL || deopt_context_ == NULL);
532 deopt_context_ = value; 541 deopt_context_ = value;
533 } 542 }
534 543
535 int32_t edge_counter_increment_size() const { 544 int32_t edge_counter_increment_size() const {
536 return edge_counter_increment_size_; 545 return edge_counter_increment_size_;
537 } 546 }
538 void set_edge_counter_increment_size(int32_t size) { 547 void set_edge_counter_increment_size(int32_t size) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 } 627 }
619 static intptr_t default_tag_offset() { 628 static intptr_t default_tag_offset() {
620 return OFFSET_OF(Isolate, default_tag_); 629 return OFFSET_OF(Isolate, default_tag_);
621 } 630 }
622 631
623 #define ISOLATE_METRIC_ACCESSOR(type, variable, name, unit) \ 632 #define ISOLATE_METRIC_ACCESSOR(type, variable, name, unit) \
624 type* Get##variable##Metric() { return &metric_##variable##_; } 633 type* Get##variable##Metric() { return &metric_##variable##_; }
625 ISOLATE_METRIC_LIST(ISOLATE_METRIC_ACCESSOR); 634 ISOLATE_METRIC_LIST(ISOLATE_METRIC_ACCESSOR);
626 #undef ISOLATE_METRIC_ACCESSOR 635 #undef ISOLATE_METRIC_ACCESSOR
627 636
637 #define ISOLATE_TIMELINE_STREAM_ACCESSOR(name, enabled_by_default) \
638 TimelineStream* Get##name##Stream() { return &stream_##name##_; }
639 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_ACCESSOR)
640 #undef ISOLATE_TIMELINE_STREAM_ACCESSOR
641
628 static intptr_t IsolateListLength(); 642 static intptr_t IsolateListLength();
629 643
630 RawGrowableObjectArray* tag_table() const { return tag_table_; } 644 RawGrowableObjectArray* tag_table() const { return tag_table_; }
631 void set_tag_table(const GrowableObjectArray& value); 645 void set_tag_table(const GrowableObjectArray& value);
632 646
633 RawUserTag* current_tag() const { return current_tag_; } 647 RawUserTag* current_tag() const { return current_tag_; }
634 void set_current_tag(const UserTag& tag); 648 void set_current_tag(const UserTag& tag);
635 649
636 RawUserTag* default_tag() const { return default_tag_; } 650 RawUserTag* default_tag() const { return default_tag_; }
637 void set_default_tag(const UserTag& tag); 651 void set_default_tag(const UserTag& tag);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 // Timestamps of last operation via service. 768 // Timestamps of last operation via service.
755 int64_t last_allocationprofile_accumulator_reset_timestamp_; 769 int64_t last_allocationprofile_accumulator_reset_timestamp_;
756 int64_t last_allocationprofile_gc_timestamp_; 770 int64_t last_allocationprofile_gc_timestamp_;
757 771
758 // Ring buffer of objects assigned an id. 772 // Ring buffer of objects assigned an id.
759 ObjectIdRing* object_id_ring_; 773 ObjectIdRing* object_id_ring_;
760 774
761 // Trace buffer support. 775 // Trace buffer support.
762 TraceBuffer* trace_buffer_; 776 TraceBuffer* trace_buffer_;
763 777
778 // TimelineEvent buffer.
779 TimelineEventBuffer* timeline_event_buffer_;
780
764 IsolateProfilerData* profiler_data_; 781 IsolateProfilerData* profiler_data_;
765 Mutex profiler_data_mutex_; 782 Mutex profiler_data_mutex_;
766 InterruptableThreadState* thread_state_; 783 InterruptableThreadState* thread_state_;
767 784
768 VMTagCounters vm_tag_counters_; 785 VMTagCounters vm_tag_counters_;
769 uword user_tag_; 786 uword user_tag_;
770 RawGrowableObjectArray* tag_table_; 787 RawGrowableObjectArray* tag_table_;
771 RawUserTag* current_tag_; 788 RawUserTag* current_tag_;
772 RawUserTag* default_tag_; 789 RawUserTag* default_tag_;
773 RawGrowableObjectArray* deoptimized_code_array_; 790 RawGrowableObjectArray* deoptimized_code_array_;
(...skipping 22 matching lines...) Expand all
796 bool reusable_##object##_handle_scope_active_; 813 bool reusable_##object##_handle_scope_active_;
797 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_VARIABLE); 814 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_VARIABLE);
798 #undef REUSABLE_HANDLE_SCOPE_VARIABLE 815 #undef REUSABLE_HANDLE_SCOPE_VARIABLE
799 #endif // defined(DEBUG) 816 #endif // defined(DEBUG)
800 817
801 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ 818 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \
802 type metric_##variable##_; 819 type metric_##variable##_;
803 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); 820 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE);
804 #undef ISOLATE_METRIC_VARIABLE 821 #undef ISOLATE_METRIC_VARIABLE
805 822
823 #define ISOLATE_TIMELINE_STREAM_VARIABLE(name, enabled_by_default) \
824 TimelineStream stream_##name##_;
825 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_VARIABLE)
826 #undef ISOLATE_TIMELINE_STREAM_VARIABLE
827
806 VMHandles reusable_handles_; 828 VMHandles reusable_handles_;
807 829
808 static Dart_IsolateCreateCallback create_callback_; 830 static Dart_IsolateCreateCallback create_callback_;
809 static Dart_IsolateInterruptCallback interrupt_callback_; 831 static Dart_IsolateInterruptCallback interrupt_callback_;
810 static Dart_IsolateUnhandledExceptionCallback unhandled_exception_callback_; 832 static Dart_IsolateUnhandledExceptionCallback unhandled_exception_callback_;
811 static Dart_IsolateShutdownCallback shutdown_callback_; 833 static Dart_IsolateShutdownCallback shutdown_callback_;
812 static Dart_FileOpenCallback file_open_callback_; 834 static Dart_FileOpenCallback file_open_callback_;
813 static Dart_FileReadCallback file_read_callback_; 835 static Dart_FileReadCallback file_read_callback_;
814 static Dart_FileWriteCallback file_write_callback_; 836 static Dart_FileWriteCallback file_write_callback_;
815 static Dart_FileCloseCallback file_close_callback_; 837 static Dart_FileCloseCallback file_close_callback_;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 intptr_t serialized_args_len_; 989 intptr_t serialized_args_len_;
968 uint8_t* serialized_message_; 990 uint8_t* serialized_message_;
969 intptr_t serialized_message_len_; 991 intptr_t serialized_message_len_;
970 bool paused_; 992 bool paused_;
971 bool checked_; 993 bool checked_;
972 }; 994 };
973 995
974 } // namespace dart 996 } // namespace dart
975 997
976 #endif // VM_ISOLATE_H_ 998 #endif // VM_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698