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

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
« no previous file with comments | « runtime/vm/symbols.h ('k') | runtime/vm/tags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « runtime/vm/symbols.h ('k') | runtime/vm/tags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698