RFR: 8365400: enhance JFR to emit file and module metadata for class loading
Markus Grönlund
mgronlun at openjdk.org
Fri Oct 10 09:35:28 UTC 2025
On Fri, 10 Oct 2025 06:48:05 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> The evolution of JFR events isn't clear to me so I don't know if adding a field is compatible or not for programs that are processing recordings. (I'm just trying to understand why a new not-enabled-by-default event is added instead of adding a field to the existing ClassDefine event.
>
> The existing event is emitted in SystemDictionary::define_instance_class, the new event emits it from JVM_DefineClassXXX. Is this because it was awkward to get at cfs->source from the SD code?
>
> I assume that a test will be added as it would be easy to refactor code and not record the event if enabled.
>
> Using "jvm" as the URI scheme when there is no source is a bit strange. There will be custom class loaders that don't provide a code source, do you really want these to use this source in the event?
Adding a field to an existing event is non-detrimental, equivalent to extending a table with a new column in a database.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27738#issuecomment-3389076928
More information about the hotspot-dev
mailing list