RFR: 8365400: enhance JFR to emit file and module metadata for class loading [v2]

Larry Cable duke at openjdk.org
Thu Oct 16 21:25:01 UTC 2025


On Thu, 16 Oct 2025 19:41:15 GMT, Larry Cable <duke at openjdk.org> wrote:

>> the existing` jdk.classDefine` and `jdk.ClassLoad` events do not include metadata regarding the location/source of the ClassFile.
>> 
>> The location of the class file for a class defined can be of utility in both debugging and auditing.
>> 
>> this addition introduces a new `jdk.ClassFileDefine` event which records the class defined and the location (path/url) of the class file that contained the implementation thereof
>
> Larry Cable has updated the pull request incrementally with one additional commit since the last revision:
> 
>   added package and module entries

looking at the current implementation for both jdk.ClassDefine and jdk.ClassLoad events, the "source" metadata recorded by the new event is not available in the (current) calling context for either of the pre-existing events.

In my opinion adding a new event to capture this information is less intrusive than adding fields(s) to the existing event(s) and contriving to provide the necessary state to those at their current call sites (or by relocating those to a calling context where the "source" is available)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/27738#issuecomment-3412911045


More information about the hotspot-dev mailing list