Index: runtime/vm/timeline.h |
diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h |
index 61759ddb523d800880f9e7b7c241ca4e367f295d..fa55f75f884a75df9dfb4385866ed55c59047ec4 100644 |
--- a/runtime/vm/timeline.h |
+++ b/runtime/vm/timeline.h |
@@ -236,16 +236,6 @@ class TimelineEvent { |
const char* GetSerializedJSON() const; |
private: |
- int64_t timestamp0_; |
- int64_t timestamp1_; |
- TimelineEventArgument* arguments_; |
- intptr_t arguments_length_; |
- uword state_; |
- const char* label_; |
- const char* category_; |
- ThreadId thread_; |
- Dart_Port isolate_id_; |
- |
void FreeArguments(); |
void StreamInit(TimelineStream* stream); |
@@ -257,6 +247,15 @@ class TimelineEvent { |
state_ = EventTypeField::update(event_type, state_); |
} |
+ void set_timestamp0(int64_t value) { |
+ ASSERT(timestamp0_ == 0); |
+ timestamp0_ = value; |
+ } |
+ void set_timestamp1(int64_t value) { |
+ ASSERT(timestamp1_ == 0); |
+ timestamp1_ = value; |
+ } |
+ |
enum StateBits { |
kEventTypeBit = 0, // reserve 4 bits for type. |
kNextBit = 4, |
@@ -264,6 +263,16 @@ class TimelineEvent { |
class EventTypeField : public BitField<EventType, kEventTypeBit, 4> {}; |
+ int64_t timestamp0_; |
+ int64_t timestamp1_; |
+ TimelineEventArgument* arguments_; |
+ intptr_t arguments_length_; |
+ uword state_; |
+ const char* label_; |
+ const char* category_; |
+ ThreadId thread_; |
+ Dart_Port isolate_id_; |
+ |
friend class TimelineEventRecorder; |
friend class TimelineEventEndlessRecorder; |
friend class TimelineEventRingRecorder; |