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

Unified Diff: runtime/vm/tags.h

Issue 230863005: Initial UserTag and dart:profiler library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 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_
« runtime/vm/object.cc ('K') | « runtime/vm/symbols.h ('k') | runtime/vm/tags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698