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

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 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_
« no previous file with comments | « runtime/vm/symbols.h ('k') | runtime/vm/tags.cc » ('j') | sdk/lib/profiler/profiler.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698