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

Unified Diff: runtime/vm/isolate.h

Issue 464953002: Add VMMetric and some sample metrics (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
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_;
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/isolate.cc » ('j') | runtime/vm/json_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698