Index: runtime/vm/isolate.h |
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h |
index 041be0644e2ed6a66d0ff3516fd01540b72bc22a..38b529fde68968a14f9e9ae394a5ff936f0e8a3a 100644 |
--- a/runtime/vm/isolate.h |
+++ b/runtime/vm/isolate.h |
@@ -13,6 +13,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" |
@@ -554,12 +555,27 @@ class Isolate : public BaseIsolate { |
return OFFSET_OF(Isolate, current_tag_); |
} |
+#define ISOLATE_METRIC_ACCESSOR(type, variable, name) \ |
+ type* Get##variable##Metric() { return &vm_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); |
+ VMMetric* metrics_list_head() { |
+ return metrics_list_head_; |
+ } |
+ |
+ void set_metrics_list_head(VMMetric* metric) { |
+ metrics_list_head_ = metric; |
+ } |
+ |
#if defined(DEBUG) |
#define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ |
void set_reusable_##object##_handle_scope_active(bool value) { \ |
@@ -664,6 +680,8 @@ class Isolate : public BaseIsolate { |
RawGrowableObjectArray* tag_table_; |
RawUserTag* current_tag_; |
+ VMMetric* metrics_list_head_; |
+ |
Counters counters_; |
// Isolate list next pointer. |
@@ -682,6 +700,11 @@ class Isolate : public BaseIsolate { |
#undef REUSABLE_HANDLE_SCOPE_VARIABLE |
#endif // defined(DEBUG) |
+#define ISOLATE_METRIC_VARIABLE(type, variable, name) \ |
+ type vm_metric_##variable##_; |
+ ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); |
+#undef ISOLATE_METRIC_VARIABLE |
+ |
VMHandles reusable_handles_; |
static Dart_IsolateCreateCallback create_callback_; |