Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-20 Thread Raffaello Giulietti
On Wed, 20 Dec 2023 14:17:19 GMT, Roger Riggs wrote: >> Same remark here about finality as >> https://github.com/openjdk/jdk/pull/17129#discussion_r1432400888. public >> statics should be final. > > I'd also remove the error codes, the string messages will be pretty stable > and the extra surf

Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-20 Thread Roger Riggs
On Wed, 20 Dec 2023 08:29:19 GMT, Daniel Fuchs wrote: >> You could define them with an Enum but use the ordinal as the value for JFR. > > Same remark here about finality as > https://github.com/openjdk/jdk/pull/17129#discussion_r1432400888. public > statics should be final. I'd also remove the

Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-20 Thread Daniel Fuchs
On Tue, 19 Dec 2023 19:39:22 GMT, Roger Riggs wrote: >> What about fixed `String`s rather than `int`s for the kind of error? >> Something like `"SUID_INEFFECTIVE_ON_ENUM"`, and so on? >> It would be nice to be able to use enums, but AFAIK that's not supported in >> JFR. > > You could define them

Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-19 Thread Roger Riggs
On Tue, 19 Dec 2023 17:41:57 GMT, Raffaello Giulietti wrote: >> Users (not OpenJDK developers) don't know what the error code means. I think >> it's better to not have them. This is how other events work. If you want to >> guard against changes, I would export the package to the test. > > What

Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-19 Thread Raffaello Giulietti
On Tue, 19 Dec 2023 17:13:58 GMT, Erik Gahlin wrote: >> The intent is that they are stable and for programmatic usage, whereas the >> message is more for human consumption. The codes are used in the test, for >> example, and are declared as public static in the event classes. >> >> Alternative

Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-19 Thread Erik Gahlin
On Tue, 19 Dec 2023 12:17:38 GMT, Raffaello Giulietti wrote: >> src/jdk.jfr/share/classes/jdk/jfr/events/SerializationMisdeclarationEvent.java >> line 48: >> >>> 46: >>> 47: @Label("Kind") >>> 48: public int kind; >> >> What is the use case for error codes? Are they public or an impl

Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-19 Thread Raffaello Giulietti
On Tue, 19 Dec 2023 10:43:57 GMT, Erik Gahlin wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Event enabled on profile.jfc but disabled on default.jfc. > > src/jdk.jfr/share/classes/jdk/jfr/events/Serializat

Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-19 Thread Erik Gahlin
On Mon, 18 Dec 2023 17:49:04 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Event enabled on profile.jfc but disabled on default.j

Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-18 Thread Raffaello Giulietti
> Adds serialization misdeclaration events to JFR. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Event enabled on profile.jfc but disabled on default.jfc. - Changes: - all: https://git.openjdk.org/jdk/pull/171