Index: runtime/vm/isolate.h |
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h |
index 1f3763503ac84f8f5df76270929583dd7d16e701..b94d127c23fcce5ea39d0329831f305ab2dde2ae 100644 |
--- a/runtime/vm/isolate.h |
+++ b/runtime/vm/isolate.h |
@@ -12,6 +12,7 @@ |
#include "vm/counters.h" |
#include "vm/handles.h" |
#include "vm/megamorphic_cache_table.h" |
+#include "vm/metrics.h" |
#include "vm/random.h" |
#include "vm/store_buffer.h" |
#include "vm/tags.h" |
@@ -555,12 +556,27 @@ class Isolate : public BaseIsolate { |
return OFFSET_OF(Isolate, current_tag_); |
} |
+#define ISOLATE_METRIC_ACCESSOR(type, variable, name, unit) \ |
+ type* Get##variable##Metric() { return &metric_##variable##_; } |
+ ISOLATE_METRIC_LIST(ISOLATE_METRIC_ACCESSOR); |
+#undef ISOLATE_METRIC_ACCESSOR |
+ |
+ static intptr_t IsolateListLength(); |
+ |
RawGrowableObjectArray* tag_table() const { return tag_table_; } |
void set_tag_table(const GrowableObjectArray& value); |
RawUserTag* current_tag() const { return current_tag_; } |
void set_current_tag(const UserTag& tag); |
+ Metric* metrics_list_head() { |
+ return metrics_list_head_; |
+ } |
+ |
+ void set_metrics_list_head(Metric* metric) { |
+ metrics_list_head_ = metric; |
+ } |
+ |
#if defined(DEBUG) |
#define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ |
void set_reusable_##object##_handle_scope_active(bool value) { \ |
@@ -665,6 +681,8 @@ class Isolate : public BaseIsolate { |
RawGrowableObjectArray* tag_table_; |
RawUserTag* current_tag_; |
+ Metric* metrics_list_head_; |
+ |
Counters counters_; |
// Isolate list next pointer. |
@@ -683,6 +701,11 @@ class Isolate : public BaseIsolate { |
#undef REUSABLE_HANDLE_SCOPE_VARIABLE |
#endif // defined(DEBUG) |
+#define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ |
+ type metric_##variable##_; |
+ ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); |
+#undef ISOLATE_METRIC_VARIABLE |
+ |
VMHandles reusable_handles_; |
static Dart_IsolateCreateCallback create_callback_; |