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

Unified Diff: runtime/vm/raw_object.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/profiler.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 0af766ac8dcfc3edb70adfbae07f5c3612864a2d..b16d1d582d3236126a02d92dc8e09321d17277aa 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -69,6 +69,7 @@ namespace dart {
V(Float32x4) \
V(Int32x4) \
V(Float64x2) \
+ V(UserTag) \
#define CLASS_LIST_ARRAYS(V) \
V(Array) \
@@ -1581,6 +1582,29 @@ class RawMirrorReference : public RawInstance {
};
+// UserTag are used by the profiler to track Dart script state.
+class RawUserTag : public RawInstance {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(UserTag);
+
+ RawObject** from() {
+ return reinterpret_cast<RawObject**>(&ptr()->label_);
+ }
+
+ RawString* label_;
+
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->label_);
+ }
+
+ // Isolate unique tag.
+ uword tag_;
+
+ friend class SnapshotReader;
+
+ public:
+ uword tag() const { return tag_; }
+};
+
// Class Id predicates.
inline bool RawObject::IsErrorClassId(intptr_t index) {
« no previous file with comments | « runtime/vm/profiler.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698