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

Alan Bateman alanb at openjdk.org
Fri Oct 17 10:43:03 UTC 2025


On Thu, 16 Oct 2025 21:22:39 GMT, Larry Cable <duke at openjdk.org> wrote:

>> 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)

@larry-cable Are you sure adding a new event is the right thing to do? Is it just the implementation challenge? If jdk.ClassDefine were being added today then it seems useful to add the module and the code source (no need for the package as the definedClass gives the fully qualified class name).

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

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


More information about the hotspot-dev mailing list