Index: runtime/vm/tags.h |
diff --git a/runtime/vm/tags.h b/runtime/vm/tags.h |
index de0468f7d5f3db80255a3a9c2bc06318b1d82b3d..fd98039a46b89c0b70d06096ecfe8ac44cb95473 100644 |
--- a/runtime/vm/tags.h |
+++ b/runtime/vm/tags.h |
@@ -21,7 +21,6 @@ class JSONObject; |
V(GCOldSpace) \ |
V(RuntimeNative) \ |
- |
class VMTag : public AllStatic { |
public: |
enum VMTagId { |
@@ -33,6 +32,9 @@ class VMTag : public AllStatic { |
kNumVMTags, |
}; |
+ static bool IsVMTag(uword id) { |
+ return (id != kInvalidTagId) && (id < kNumVMTags); |
+ } |
static const char* TagName(uword id); |
private: |
@@ -70,6 +72,16 @@ class VMTagCounters { |
int64_t counters_[VMTag::kNumVMTags]; |
}; |
+ |
+class UserTagHelper : public AllStatic { |
+ public: |
+ // UserTag id space: [kUserTagIdOffset, kUserTagIdOffset + kMaxUserTags). |
+ static const intptr_t kMaxUserTags = 64; |
+ static const intptr_t kUserTagIdOffset = 0x4096; |
+ static const char* TagName(uword tag); |
+}; |
+ |
+ |
} // namespace dart |
#endif // VM_TAGS_H_ |