Index: runtime/vm/tags.h |
diff --git a/runtime/vm/tags.h b/runtime/vm/tags.h |
index 5f4b7d94fe0571fcbd3a9df6cdab6b9b73e26920..f24f5a3c179ff7bf650dbc307a3f86fa649ef987 100644 |
--- a/runtime/vm/tags.h |
+++ b/runtime/vm/tags.h |
@@ -23,7 +23,6 @@ class RuntimeEntry; |
V(Runtime) \ |
V(Native) \ |
- |
class VMTag : public AllStatic { |
public: |
enum VMTagId { |
@@ -35,6 +34,9 @@ class VMTag : public AllStatic { |
kNumVMTags, |
}; |
+ static bool IsVMTag(uword id) { |
+ return (id != kInvalidTagId) && (id < kNumVMTags); |
+ } |
static const char* TagName(uword id); |
static bool IsNativeEntryTag(uword id); |
@@ -78,6 +80,21 @@ class VMTagCounters { |
int64_t counters_[VMTag::kNumVMTags]; |
}; |
+ |
+class UserTags : public AllStatic { |
+ public: |
+ static const uword kNoUserTag = 0; |
+ // UserTag id space: [kUserTagIdOffset, kUserTagIdOffset + kMaxUserTags). |
+ static const intptr_t kMaxUserTags = 64; |
+ static const uword kUserTagIdOffset = 0x4096; |
+ static const char* TagName(uword tag_id); |
+ static bool IsUserTag(uword tag_id) { |
+ return (tag_id >= kUserTagIdOffset) && |
+ (tag_id < kUserTagIdOffset + kMaxUserTags); |
+ } |
+}; |
+ |
+ |
} // namespace dart |
#endif // VM_TAGS_H_ |