< prev index next >

src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.hpp

Print this page




  23  */
  24 
  25 #ifndef SHARE_JFR_RECORDER_REPOSITORY_JFRCHUNKWRITER_HPP
  26 #define SHARE_JFR_RECORDER_REPOSITORY_JFRCHUNKWRITER_HPP
  27 
  28 #include "jfr/writers/jfrStorageAdapter.hpp"
  29 #include "jfr/writers/jfrStreamWriterHost.inline.hpp"
  30 #include "jfr/writers/jfrWriterHost.inline.hpp"
  31 
  32 typedef MallocAdapter<M> JfrStreamBuffer; // 1 mb buffered writes
  33 typedef StreamWriterHost<JfrStreamBuffer, JfrCHeapObj> JfrBufferedStreamWriter;
  34 typedef WriterHost<BigEndianEncoder, CompressedIntegerEncoder, JfrBufferedStreamWriter> JfrChunkWriterBase;
  35 
  36 class JfrChunkState;
  37 
  38 class JfrChunkWriter : public JfrChunkWriterBase {
  39   friend class JfrRepository;
  40  private:
  41   JfrChunkState* _chunkstate;
  42 
  43   bool open();
  44   size_t close(intptr_t metadata_offset);
  45   void write_header(intptr_t metadata_offset);
  46   void set_chunk_path(const char* chunk_path);
  47 
  48  public:
  49   JfrChunkWriter();
  50   bool initialize();
  51   intptr_t size_written() const;
  52   intptr_t previous_checkpoint_offset() const;
  53   void set_previous_checkpoint_offset(intptr_t offset);
  54   void time_stamp_chunk_now();
  55 };
  56 
  57 #endif // SHARE_JFR_RECORDER_REPOSITORY_JFRCHUNKWRITER_HPP


  23  */
  24 
  25 #ifndef SHARE_JFR_RECORDER_REPOSITORY_JFRCHUNKWRITER_HPP
  26 #define SHARE_JFR_RECORDER_REPOSITORY_JFRCHUNKWRITER_HPP
  27 
  28 #include "jfr/writers/jfrStorageAdapter.hpp"
  29 #include "jfr/writers/jfrStreamWriterHost.inline.hpp"
  30 #include "jfr/writers/jfrWriterHost.inline.hpp"
  31 
  32 typedef MallocAdapter<M> JfrStreamBuffer; // 1 mb buffered writes
  33 typedef StreamWriterHost<JfrStreamBuffer, JfrCHeapObj> JfrBufferedStreamWriter;
  34 typedef WriterHost<BigEndianEncoder, CompressedIntegerEncoder, JfrBufferedStreamWriter> JfrChunkWriterBase;
  35 
  36 class JfrChunkState;
  37 
  38 class JfrChunkWriter : public JfrChunkWriterBase {
  39   friend class JfrRepository;
  40  private:
  41   JfrChunkState* _chunkstate;
  42 
  43   bool open(bool vm_error);
  44   size_t close(intptr_t metadata_offset);
  45   void write_header(intptr_t metadata_offset);
  46   void set_chunk_path(const char* chunk_path);
  47 
  48  public:
  49   JfrChunkWriter();
  50   bool initialize();
  51   intptr_t size_written() const;
  52   intptr_t previous_checkpoint_offset() const;
  53   void set_previous_checkpoint_offset(intptr_t offset);
  54   void time_stamp_chunk_now();
  55 };
  56 
  57 #endif // SHARE_JFR_RECORDER_REPOSITORY_JFRCHUNKWRITER_HPP
< prev index next >