src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointWriter.hpp
changeset 58863 c16ac7a2eba4
parent 58132 caa25ab47aca
equal deleted inserted replaced
58861:2c3cc4b01880 58863:c16ac7a2eba4
    52   int64_t offset;
    52   int64_t offset;
    53   u4 count;
    53   u4 count;
    54 };
    54 };
    55 
    55 
    56 class JfrCheckpointWriter : public JfrCheckpointWriterBase {
    56 class JfrCheckpointWriter : public JfrCheckpointWriterBase {
       
    57   friend class JfrCheckpointManager;
    57   friend class JfrSerializerRegistration;
    58   friend class JfrSerializerRegistration;
    58  private:
    59  private:
    59   JfrTicks _time;
    60   JfrTicks _time;
    60   int64_t _offset;
    61   int64_t _offset;
    61   u4 _count;
    62   u4 _count;
    62   bool _flushpoint;
    63   JfrCheckpointType _type;
    63   bool _header;
    64   bool _header;
    64 
    65 
    65   u4 count() const;
    66   u4 count() const;
    66   void set_count(u4 count);
    67   void set_count(u4 count);
    67   void increment();
    68   void increment();
    68   void set_flushpoint(bool flushpoint);
       
    69   bool is_flushpoint() const;
       
    70   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);
    71   void release();
    70   void release();
       
    71   JfrCheckpointWriter(Thread* t, JfrBuffer* buffer, JfrCheckpointType type = GENERIC);
    72  public:
    72  public:
    73   JfrCheckpointWriter(bool flushpoint, bool header, Thread* thread);
    73   JfrCheckpointWriter(JfrCheckpointType type = GENERIC);
       
    74   JfrCheckpointWriter(Thread* t, bool header = true, JfrCheckpointType mode = GENERIC);
    74   ~JfrCheckpointWriter();
    75   ~JfrCheckpointWriter();
    75   void write_type(JfrTypeId type_id);
    76   void write_type(JfrTypeId type_id);
    76   void write_count(u4 nof_entries);
    77   void write_count(u4 nof_entries);
    77   void write_count(u4 nof_entries, int64_t offset);
    78   void write_count(u4 nof_entries, int64_t offset);
    78   void write_key(u8 key);
    79   void write_key(u8 key);