Index: runtime/vm/tags.h |
diff --git a/runtime/vm/tags.h b/runtime/vm/tags.h |
index 98be468cbf79bc429aedceb4b9960f9bcf593758..de0468f7d5f3db80255a3a9c2bc06318b1d82b3d 100644 |
--- a/runtime/vm/tags.h |
+++ b/runtime/vm/tags.h |
@@ -7,18 +7,19 @@ |
#include "vm/allocation.h" |
-class Isolate; |
- |
namespace dart { |
+class Isolate; |
+class JSONObject; |
+ |
#define VM_TAG_LIST(V) \ |
+ V(Idle) \ |
V(VM) /* Catch all */ \ |
V(Compile) \ |
V(Script) \ |
V(GCNewSpace) \ |
V(GCOldSpace) \ |
V(RuntimeNative) \ |
- V(Idle) \ |
class VMTag : public AllStatic { |
@@ -42,6 +43,7 @@ class VMTag : public AllStatic { |
static TagEntry entries_[]; |
}; |
+ |
class VMTagScope : StackResource { |
public: |
VMTagScope(Isolate* isolate, uword tag); |
@@ -53,6 +55,21 @@ class VMTagScope : StackResource { |
DISALLOW_IMPLICIT_CONSTRUCTORS(VMTagScope); |
}; |
+ |
+class VMTagCounters { |
+ public: |
+ VMTagCounters(); |
+ |
+ void Increment(uword tag); |
+ |
+ int64_t count(uword tag); |
+ |
+ void PrintToJSONObject(JSONObject* obj); |
+ |
+ private: |
+ int64_t counters_[VMTag::kNumVMTags]; |
+}; |
+ |
} // namespace dart |
#endif // VM_TAGS_H_ |