RFR: 8275338: Add JFR events for notable serialization situations [v2]
Erik Gahlin
egahlin at openjdk.org
Sat Dec 16 01:30:38 UTC 2023
On Fri, 15 Dec 2023 22:26:04 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:
>> Adds serialization misdeclaration events to JFR.
>
> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision:
>
> Restrict accessibility of nested classes.
It seems correct to have the event disabled in both configurations. It's not hard to imagine pathological cases where millions of stream objects are created, which would create overhead and flood event buffers, making JFR not usable.
That said, I wonder how many will actually use, or find out about the event, if they need to edit the .jfc file or specify -XX:StartFlightRecording:jdk.SerializationMisdeclaration#enabled=true on command line?
How important is the stack trace when diagnosing serialization misdeclarations?
We faced a similar situation with the Finalization event a couple of years ago, but we were able to make the event periodic and enabled by default with some VM magic. An event that is enabled by default will probably be seen by 10 000 times as many users, so it might be worth considering other approaches, even if they are harder to implement, or we lose some of the information.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17129#issuecomment-1858665731
More information about the core-libs-dev
mailing list