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

Unified Diff: runtime/vm/timeline.h

Issue 1514653002: - Assert that we do not hold the timeline lock while entering (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/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;

Powered by Google App Engine
This is Rietveld 408576698