-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
b27
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8325468 | 17.0.12-oracle | Joe Cherian | P3 | Resolved | Fixed | b01 |
JDK-8301476 | 17.0.7 | Ekaterina Vergizova | P3 | Resolved | Fixed | b01 |
JDK-8341001 | 11.0.26-oracle | Joakim Nordström | P3 | Resolved | Fixed | b01 |
JDK-8341181 | 11.0.25.0.1-oracle | Joakim Nordström | P3 | Resolved | Fixed | b01 |
JDK-8302318 | 11.0.19 | Ekaterina Vergizova | P3 | Resolved | Fixed | b02 |
There is a catch, however, in that everything in JFR is an event. This means that also the metadata representation (event id 0) and the checkpoints/constant pools (event id 1) are encoded as events. These are normally much larger compared to user-defined events. Sometimes there is so much metadata that the limit of 1 << 28 bytes becomes a practical limit in the amount of data that can be encoded. This can for example be the case with very many stack traces or constants, such as symbols and strings.
The current implementation stores checkpoint events in-memory, using an intermediary representation, before serializing to disk, which opens for the possibility to estimate how big the checkpoint event size really is,. Using this information, we can determine the exact size of the checkpoint event size, before serialising the event. An implication is that there is no need to reserve a size upfront, for later to be filled in with the actual size. The event size will only take as few bytes as is necessary, but will also seamlessly expand beyond the 1 << 28 limits. The parser reads varints as java longs, but it traditionally downcasts the event size to an int, under the assumption of 32-bits. Just removing the downcast for the parser when reading checkpoint events (event id 1), makes the change transparent. There will need to be an update on the JMC side as well.
So with the suggested scheme, which only applies to checkpoint events, the exact size of the event will be written, with no padding. This lets us represent both smaller events in the common cases, but more importantly, also larger checkpoint / constant pool events as well. The parser side will continue to read checkpoint event sizes as varints, but will expose the event size as a long, instead of an int.
- backported by
-
JDK-8301476 Let checkpoint event sizes grow beyond u4 limit
-
- Resolved
-
-
JDK-8302318 Let checkpoint event sizes grow beyond u4 limit
-
- Resolved
-
-
JDK-8325468 Let checkpoint event sizes grow beyond u4 limit
-
- Resolved
-
-
JDK-8341001 Let checkpoint event sizes grow beyond u4 limit
-
- Resolved
-
-
JDK-8341181 Let checkpoint event sizes grow beyond u4 limit
-
- Resolved
-
- duplicates
-
JDK-8297402 jfr tool processes large padded integers incorrectly
-
- Closed
-
- relates to
-
JDK-8301842 JFR: increase checkpoint event size for stacktrace and string pool
-
- Resolved
-
-
JDK-8297402 jfr tool processes large padded integers incorrectly
-
- Closed
-
- links to
-
Commit openjdk/jdk11u-dev/816e53ba
-
Commit openjdk/jdk17u-dev/7b39d48f
-
Commit openjdk/jdk/ea108f50
-
Review openjdk/jdk11u-dev/1708
-
Review openjdk/jdk17u-dev/1102
-
Review openjdk/jdk/11584