RFR: 8255992: JFR EventWriter does not use first string from StringPool with id 0
Erik Gahlin
egahlin at openjdk.java.net
Thu Nov 12 10:13:55 UTC 2020
On Fri, 6 Nov 2020 17:17:16 GMT, Jie Kang <jkang at openjdk.org> wrote:
> This allows string pool entry with id 0 to be written in short form for the event data.
The id 0 is reserved for representing null in JFR constant pools, and should not be used to represent real values in the file format. Strings are special, since they have their own way to represent null, but I still think it is bad form to use id 0 for a real value (even if it should happen to work).
Perhaps the counter should start with 1, or incrementAndGet() should be used?
-------------
PR: https://git.openjdk.java.net/jdk/pull/1097
More information about the hotspot-jfr-dev
mailing list