src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp
branchJEP-349-branch
changeset 58184 2bc0dc4b7119
parent 58167 38b5442bcab4
child 58187 8994744e221c
equal deleted inserted replaced
58183:e1b896faca1c 58184:2bc0dc4b7119
   596   write_stacktrace(_stack_trace_repository, _chunkwriter, true);
   596   write_stacktrace(_stack_trace_repository, _chunkwriter, true);
   597   if (_string_pool.is_modified()) {
   597   if (_string_pool.is_modified()) {
   598     write_stringpool_safepoint(_string_pool, _chunkwriter);
   598     write_stringpool_safepoint(_string_pool, _chunkwriter);
   599   }
   599   }
   600   _storage.write_at_safepoint();
   600   _storage.write_at_safepoint();
   601   _checkpoint_manager.notify_threads();
   601   _checkpoint_manager.on_rotation();
   602   _checkpoint_manager.notify_types_on_rotation();
       
   603   _checkpoint_manager.shift_epoch();
       
   604   _chunkwriter.set_time_stamp();
   602   _chunkwriter.set_time_stamp();
   605 }
   603 }
   606 
   604 
   607 void JfrRecorderService::post_safepoint_write() {
   605 void JfrRecorderService::post_safepoint_write() {
   608   assert(_chunkwriter.is_valid(), "invariant");
   606   assert(_chunkwriter.is_valid(), "invariant");
   614   if (LeakProfiler::is_running()) {
   612   if (LeakProfiler::is_running()) {
   615     // The object sampler instance was exclusively acquired and locked in pre_safepoint_write.
   613     // The object sampler instance was exclusively acquired and locked in pre_safepoint_write.
   616     // Note: There is a dependency on write_type_set() above, ensure the release is subsequent.
   614     // Note: There is a dependency on write_type_set() above, ensure the release is subsequent.
   617     ObjectSampler::release();
   615     ObjectSampler::release();
   618   }
   616   }
   619   // serialize any outstanding checkpoint memory
       
   620   _checkpoint_manager.write();
       
   621   // serialize the metadata descriptor event and close out the chunk
   617   // serialize the metadata descriptor event and close out the chunk
   622   write_metadata(_chunkwriter);
   618   write_metadata(_chunkwriter);
   623   _repository.close_chunk();
   619   _repository.close_chunk();
   624 }
   620 }
   625 
   621