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

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
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698