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

Unified Diff: runtime/vm/timeline.h

Issue 1882313002: Copy event label. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/dart_api_impl.cc ('k') | runtime/vm/timeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/timeline.h
diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h
index 9196ee08e81e8ec8f14a99f46eba34becf71428c..f78b5160a1d77daaee06dfe4e9f36563cc97472c 100644
--- a/runtime/vm/timeline.h
+++ b/runtime/vm/timeline.h
@@ -286,6 +286,10 @@ class TimelineEvent {
const char* GetSerializedJSON() const;
+ void set_owns_label(bool owns_label) {
+ state_ = OwnsLabelBit::update(owns_label, state_);
+ }
+
private:
void FreeArguments();
@@ -315,15 +319,21 @@ class TimelineEvent {
state_ = PreSerializedJSON::update(pre_serialized_json, state_);
}
+ bool owns_label() const {
+ return OwnsLabelBit::decode(state_);
+ }
+
enum StateBits {
kEventTypeBit = 0, // reserve 4 bits for type.
kPreSerializedJSON = 4,
- kNextBit = 5,
+ kOwnsLabelBit = 5,
+ kNextBit = 6,
};
class EventTypeField : public BitField<uword, EventType, kEventTypeBit, 4> {};
class PreSerializedJSON :
public BitField<uword, bool, kPreSerializedJSON, 1> {};
+ class OwnsLabelBit : public BitField<uword, bool, kOwnsLabelBit, 1> {};
int64_t timestamp0_;
int64_t timestamp1_;
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/timeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698