| 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/base_isolate.h" | 10 #include "vm/base_isolate.h" |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 | 557 |
| 558 uword user_tag() const { | 558 uword user_tag() const { |
| 559 return user_tag_; | 559 return user_tag_; |
| 560 } | 560 } |
| 561 static intptr_t user_tag_offset() { | 561 static intptr_t user_tag_offset() { |
| 562 return OFFSET_OF(Isolate, user_tag_); | 562 return OFFSET_OF(Isolate, user_tag_); |
| 563 } | 563 } |
| 564 static intptr_t current_tag_offset() { | 564 static intptr_t current_tag_offset() { |
| 565 return OFFSET_OF(Isolate, current_tag_); | 565 return OFFSET_OF(Isolate, current_tag_); |
| 566 } | 566 } |
| 567 static intptr_t default_tag_offset() { |
| 568 return OFFSET_OF(Isolate, default_tag_); |
| 569 } |
| 567 | 570 |
| 568 #define ISOLATE_METRIC_ACCESSOR(type, variable, name, unit) \ | 571 #define ISOLATE_METRIC_ACCESSOR(type, variable, name, unit) \ |
| 569 type* Get##variable##Metric() { return &metric_##variable##_; } | 572 type* Get##variable##Metric() { return &metric_##variable##_; } |
| 570 ISOLATE_METRIC_LIST(ISOLATE_METRIC_ACCESSOR); | 573 ISOLATE_METRIC_LIST(ISOLATE_METRIC_ACCESSOR); |
| 571 #undef ISOLATE_METRIC_ACCESSOR | 574 #undef ISOLATE_METRIC_ACCESSOR |
| 572 | 575 |
| 573 static intptr_t IsolateListLength(); | 576 static intptr_t IsolateListLength(); |
| 574 | 577 |
| 575 RawGrowableObjectArray* tag_table() const { return tag_table_; } | 578 RawGrowableObjectArray* tag_table() const { return tag_table_; } |
| 576 void set_tag_table(const GrowableObjectArray& value); | 579 void set_tag_table(const GrowableObjectArray& value); |
| 577 | 580 |
| 578 RawUserTag* current_tag() const { return current_tag_; } | 581 RawUserTag* current_tag() const { return current_tag_; } |
| 579 void set_current_tag(const UserTag& tag); | 582 void set_current_tag(const UserTag& tag); |
| 580 | 583 |
| 584 RawUserTag* default_tag() const { return default_tag_; } |
| 585 void set_default_tag(const UserTag& tag); |
| 586 |
| 581 Metric* metrics_list_head() { | 587 Metric* metrics_list_head() { |
| 582 return metrics_list_head_; | 588 return metrics_list_head_; |
| 583 } | 589 } |
| 584 | 590 |
| 585 void set_metrics_list_head(Metric* metric) { | 591 void set_metrics_list_head(Metric* metric) { |
| 586 metrics_list_head_ = metric; | 592 metrics_list_head_ = metric; |
| 587 } | 593 } |
| 588 | 594 |
| 589 #if defined(DEBUG) | 595 #if defined(DEBUG) |
| 590 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ | 596 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 TraceBuffer* trace_buffer_; | 690 TraceBuffer* trace_buffer_; |
| 685 | 691 |
| 686 IsolateProfilerData* profiler_data_; | 692 IsolateProfilerData* profiler_data_; |
| 687 Mutex profiler_data_mutex_; | 693 Mutex profiler_data_mutex_; |
| 688 InterruptableThreadState* thread_state_; | 694 InterruptableThreadState* thread_state_; |
| 689 | 695 |
| 690 VMTagCounters vm_tag_counters_; | 696 VMTagCounters vm_tag_counters_; |
| 691 uword user_tag_; | 697 uword user_tag_; |
| 692 RawGrowableObjectArray* tag_table_; | 698 RawGrowableObjectArray* tag_table_; |
| 693 RawUserTag* current_tag_; | 699 RawUserTag* current_tag_; |
| 700 RawUserTag* default_tag_; |
| 694 | 701 |
| 695 Metric* metrics_list_head_; | 702 Metric* metrics_list_head_; |
| 696 | 703 |
| 697 Counters counters_; | 704 Counters counters_; |
| 698 | 705 |
| 699 // Isolate list next pointer. | 706 // Isolate list next pointer. |
| 700 Isolate* next_; | 707 Isolate* next_; |
| 701 | 708 |
| 702 // Reusable handles support. | 709 // Reusable handles support. |
| 703 #define REUSABLE_HANDLE_FIELDS(object) \ | 710 #define REUSABLE_HANDLE_FIELDS(object) \ |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 char* exception_callback_name_; | 856 char* exception_callback_name_; |
| 850 uint8_t* serialized_args_; | 857 uint8_t* serialized_args_; |
| 851 intptr_t serialized_args_len_; | 858 intptr_t serialized_args_len_; |
| 852 uint8_t* serialized_message_; | 859 uint8_t* serialized_message_; |
| 853 intptr_t serialized_message_len_; | 860 intptr_t serialized_message_len_; |
| 854 }; | 861 }; |
| 855 | 862 |
| 856 } // namespace dart | 863 } // namespace dart |
| 857 | 864 |
| 858 #endif // VM_ISOLATE_H_ | 865 #endif // VM_ISOLATE_H_ |
| OLD | NEW |