equal
deleted
inserted
replaced
47 typedef Adapter<JfrCheckpointFlush> JfrCheckpointAdapter; |
47 typedef Adapter<JfrCheckpointFlush> JfrCheckpointAdapter; |
48 typedef AcquireReleaseMemoryWriterHost<JfrCheckpointAdapter, StackObj > JfrTransactionalCheckpointWriter; |
48 typedef AcquireReleaseMemoryWriterHost<JfrCheckpointAdapter, StackObj > JfrTransactionalCheckpointWriter; |
49 typedef EventWriterHost<BigEndianEncoder, CompressedIntegerEncoder, JfrTransactionalCheckpointWriter> JfrCheckpointWriterBase; |
49 typedef EventWriterHost<BigEndianEncoder, CompressedIntegerEncoder, JfrTransactionalCheckpointWriter> JfrCheckpointWriterBase; |
50 |
50 |
51 struct JfrCheckpointContext { |
51 struct JfrCheckpointContext { |
52 jlong offset; |
52 int64_t offset; |
53 juint count; |
53 u4 count; |
54 }; |
54 }; |
55 |
55 |
56 class JfrCheckpointWriter : public JfrCheckpointWriterBase { |
56 class JfrCheckpointWriter : public JfrCheckpointWriterBase { |
57 friend class JfrSerializerRegistration; |
57 friend class JfrSerializerRegistration; |
58 private: |
58 private: |
59 JfrTicks _time; |
59 JfrTicks _time; |
60 jlong _offset; |
60 int64_t _offset; |
61 juint _count; |
61 u4 _count; |
62 bool _flushpoint; |
62 bool _flushpoint; |
63 bool _header; |
63 bool _header; |
64 |
64 |
65 juint count() const; |
65 u4 count() const; |
66 void set_count(juint count); |
66 void set_count(u4 count); |
67 void increment(); |
67 void increment(); |
68 void set_flushpoint(bool flushpoint); |
68 void set_flushpoint(bool flushpoint); |
69 bool is_flushpoint() const; |
69 bool is_flushpoint() const; |
70 const u1* session_data(size_t* size, const JfrCheckpointContext* ctx = NULL); |
70 const u1* session_data(size_t* size, const JfrCheckpointContext* ctx = NULL); |
71 void release(); |
71 void release(); |
73 public: |
73 public: |
74 JfrCheckpointWriter(bool flushpoint, bool header, Thread* thread); |
74 JfrCheckpointWriter(bool flushpoint, bool header, Thread* thread); |
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, jlong offset); |
78 void write_count(u4 nof_entries, int64_t offset); |
79 void write_key(u8 key); |
79 void write_key(u8 key); |
80 const JfrCheckpointContext context() const; |
80 const JfrCheckpointContext context() const; |
81 void set_context(const JfrCheckpointContext ctx); |
81 void set_context(const JfrCheckpointContext ctx); |
82 bool has_data() const; |
82 bool has_data() const; |
83 JfrCheckpointBlobHandle checkpoint_blob(); |
83 JfrCheckpointBlobHandle checkpoint_blob(); |