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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 } | 550 } |
551 static intptr_t default_tag_offset() { | 551 static intptr_t default_tag_offset() { |
552 return OFFSET_OF(Isolate, default_tag_); | 552 return OFFSET_OF(Isolate, default_tag_); |
553 } | 553 } |
554 | 554 |
555 #define ISOLATE_METRIC_ACCESSOR(type, variable, name, unit) \ | 555 #define ISOLATE_METRIC_ACCESSOR(type, variable, name, unit) \ |
556 type* Get##variable##Metric() { return &metric_##variable##_; } | 556 type* Get##variable##Metric() { return &metric_##variable##_; } |
557 ISOLATE_METRIC_LIST(ISOLATE_METRIC_ACCESSOR); | 557 ISOLATE_METRIC_LIST(ISOLATE_METRIC_ACCESSOR); |
558 #undef ISOLATE_METRIC_ACCESSOR | 558 #undef ISOLATE_METRIC_ACCESSOR |
559 | 559 |
| 560 #ifndef PRODUCT |
560 #define ISOLATE_TIMELINE_STREAM_ACCESSOR(name, not_used) \ | 561 #define ISOLATE_TIMELINE_STREAM_ACCESSOR(name, not_used) \ |
561 TimelineStream* Get##name##Stream() { return &stream_##name##_; } | 562 TimelineStream* Get##name##Stream() { return &stream_##name##_; } |
562 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_ACCESSOR) | 563 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_ACCESSOR) |
563 #undef ISOLATE_TIMELINE_STREAM_ACCESSOR | 564 #undef ISOLATE_TIMELINE_STREAM_ACCESSOR |
| 565 #else |
| 566 #define ISOLATE_TIMELINE_STREAM_ACCESSOR(name, not_used) \ |
| 567 TimelineStream* Get##name##Stream() { return NULL; } |
| 568 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_ACCESSOR) |
| 569 #undef ISOLATE_TIMELINE_STREAM_ACCESSOR |
| 570 #endif // !PRODUCT |
564 | 571 |
565 static intptr_t IsolateListLength(); | 572 static intptr_t IsolateListLength(); |
566 | 573 |
567 RawGrowableObjectArray* tag_table() const { return tag_table_; } | 574 RawGrowableObjectArray* tag_table() const { return tag_table_; } |
568 void set_tag_table(const GrowableObjectArray& value); | 575 void set_tag_table(const GrowableObjectArray& value); |
569 | 576 |
570 RawUserTag* current_tag() const { return current_tag_; } | 577 RawUserTag* current_tag() const { return current_tag_; } |
571 void set_current_tag(const UserTag& tag); | 578 void set_current_tag(const UserTag& tag); |
572 | 579 |
573 RawUserTag* default_tag() const { return default_tag_; } | 580 RawUserTag* default_tag() const { return default_tag_; } |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 // This guards spawn_count_. An isolate cannot complete shutdown and be | 831 // This guards spawn_count_. An isolate cannot complete shutdown and be |
825 // destroyed while there are child isolates in the midst of a spawn. | 832 // destroyed while there are child isolates in the midst of a spawn. |
826 Monitor* spawn_count_monitor_; | 833 Monitor* spawn_count_monitor_; |
827 intptr_t spawn_count_; | 834 intptr_t spawn_count_; |
828 | 835 |
829 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ | 836 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ |
830 type metric_##variable##_; | 837 type metric_##variable##_; |
831 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); | 838 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); |
832 #undef ISOLATE_METRIC_VARIABLE | 839 #undef ISOLATE_METRIC_VARIABLE |
833 | 840 |
| 841 #ifndef PRODUCT |
834 #define ISOLATE_TIMELINE_STREAM_VARIABLE(name, not_used) \ | 842 #define ISOLATE_TIMELINE_STREAM_VARIABLE(name, not_used) \ |
835 TimelineStream stream_##name##_; | 843 TimelineStream stream_##name##_; |
836 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_VARIABLE) | 844 ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_VARIABLE) |
837 #undef ISOLATE_TIMELINE_STREAM_VARIABLE | 845 #undef ISOLATE_TIMELINE_STREAM_VARIABLE |
| 846 #endif // !PRODUCT |
838 | 847 |
839 static Dart_IsolateCreateCallback create_callback_; | 848 static Dart_IsolateCreateCallback create_callback_; |
840 static Dart_IsolateShutdownCallback shutdown_callback_; | 849 static Dart_IsolateShutdownCallback shutdown_callback_; |
841 static Dart_FileOpenCallback file_open_callback_; | 850 static Dart_FileOpenCallback file_open_callback_; |
842 static Dart_FileReadCallback file_read_callback_; | 851 static Dart_FileReadCallback file_read_callback_; |
843 static Dart_FileWriteCallback file_write_callback_; | 852 static Dart_FileWriteCallback file_write_callback_; |
844 static Dart_FileCloseCallback file_close_callback_; | 853 static Dart_FileCloseCallback file_close_callback_; |
845 static Dart_EntropySource entropy_source_callback_; | 854 static Dart_EntropySource entropy_source_callback_; |
846 static Dart_IsolateInterruptCallback vmstats_callback_; | 855 static Dart_IsolateInterruptCallback vmstats_callback_; |
847 | 856 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 intptr_t* spawn_count_; | 1003 intptr_t* spawn_count_; |
995 | 1004 |
996 Isolate::Flags isolate_flags_; | 1005 Isolate::Flags isolate_flags_; |
997 bool paused_; | 1006 bool paused_; |
998 bool errors_are_fatal_; | 1007 bool errors_are_fatal_; |
999 }; | 1008 }; |
1000 | 1009 |
1001 } // namespace dart | 1010 } // namespace dart |
1002 | 1011 |
1003 #endif // VM_ISOLATE_H_ | 1012 #endif // VM_ISOLATE_H_ |
OLD | NEW |