Index: runtime/vm/tags.h |
diff --git a/runtime/vm/tags.h b/runtime/vm/tags.h |
index 5f4b7d94fe0571fcbd3a9df6cdab6b9b73e26920..80412e7e3dcbe6cd6d8e0a243b19034aaa076a6a 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,17 @@ 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); |
+}; |
+ |
+ |
} // namespace dart |
#endif // VM_TAGS_H_ |