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

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
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index c63b502e66fdc3c84b86ebdc44ca65defaa76ed4..31f67f1b694aa21379557294ba408b587ccacb35 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) \
@@ -1580,6 +1581,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) {
« runtime/vm/object.cc ('K') | « 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