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

Unified Diff: runtime/vm/tags.h

Issue 205713004: Add isolate tag-profile and better handling of errors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/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_

Powered by Google App Engine
This is Rietveld 408576698