RFR: 8289688: jfr command hangs when it processes invalid file [v2]

Erik Gahlin egahlin at openjdk.org
Mon Jul 25 16:34:58 UTC 2022


On Mon, 25 Jul 2022 15:39:57 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

> In JfrChunkWriter.cpp, the file state is always set to `0` when a chunk is finalized.
> 
> ```c++
> 101   void write_generation(bool finalize) {
> 102     _writer->be_write(finalize ? COMPLETE : _chunk->generation());
> 103     _writer->be_write(PAD);
> 104   }
> 105
> 106   void write_next_generation(bool finalize) {
> 107     _writer->be_write(finalize ? COMPLETE : _chunk->next_generation());
> 108     _writer->be_write(PAD);
> 109   }
> ```

And the initial value is 1. 
https://github.com/openjdk/jdk/blob/0ca74f538e1a8a351cc0631c5fe397a74653ce6f/src/hotspot/share/jfr/recorder/repository/jfrChunk.cpp#L69

-------------

PR: https://git.openjdk.org/jdk/pull/9363


More information about the hotspot-jfr-dev mailing list