58 friend class JfrSerializerRegistration; |
58 friend class JfrSerializerRegistration; |
59 private: |
59 private: |
60 JfrTicks _time; |
60 JfrTicks _time; |
61 int64_t _offset; |
61 int64_t _offset; |
62 u4 _count; |
62 u4 _count; |
63 JfrCheckpointMode _mode; |
63 JfrCheckpointType _type; |
64 bool _header; |
64 bool _header; |
65 |
65 |
66 u4 count() const; |
66 u4 count() const; |
67 void set_count(u4 count); |
67 void set_count(u4 count); |
68 void increment(); |
68 void increment(); |
69 const u1* session_data(size_t* size, bool move = false, const JfrCheckpointContext* ctx = NULL); |
69 const u1* session_data(size_t* size, bool move = false, const JfrCheckpointContext* ctx = NULL); |
70 void release(); |
70 void release(); |
71 JfrCheckpointWriter(Thread* t, JfrBuffer* buffer, JfrCheckpointMode mode = NORMAL); |
71 JfrCheckpointWriter(Thread* t, JfrBuffer* buffer, JfrCheckpointType type = GENERIC); |
72 public: |
72 public: |
73 JfrCheckpointWriter(JfrCheckpointMode mode = NORMAL); |
73 JfrCheckpointWriter(JfrCheckpointType type = GENERIC); |
74 JfrCheckpointWriter(Thread* t, bool header = true, JfrCheckpointMode mode = NORMAL); |
74 JfrCheckpointWriter(Thread* t, bool header = true, JfrCheckpointType mode = GENERIC); |
75 ~JfrCheckpointWriter(); |
75 ~JfrCheckpointWriter(); |
76 void write_type(JfrTypeId type_id); |
76 void write_type(JfrTypeId type_id); |
77 void write_count(u4 nof_entries); |
77 void write_count(u4 nof_entries); |
78 void write_count(u4 nof_entries, int64_t offset); |
78 void write_count(u4 nof_entries, int64_t offset); |
79 void write_key(u8 key); |
79 void write_key(u8 key); |