RFR: 8352738: Implement JEP 520: JFR Method Timing and Tracing

Erik Gahlin egahlin at openjdk.org
Fri May 23 19:33:56 UTC 2025


On Thu, 22 May 2025 11:47:48 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Could I have a review of this enhancement that will add tracing capabilities to JFR? There are opportunities for performance improvements in the implementation, but I would rather add them later and separately.
>> 
>> Testing: tier 1-3, test/jdk/jdk/jfr
>> 
>> Thanks
>> Erik
>
> src/hotspot/share/jfr/support/methodtracer/jfrMethodTracer.cpp line 141:
> 
>> 139: 
>> 140:   // 1. Is the ik the initial load, i.e.the first InstanceKlass, or a scratch klass, denoting a redefine / retransform?
>> 141:   const Klass* const existing_klass = JfrClassTransformer::find_existing_klass(ik, THREAD);
> 
> Sounds like `JfrClassTransformer::find_existing_klass` can return `InstanceKlass*`, and thus we can avoid a whole lot of `InstanceKlass::cast`-s everywhere?

The method is also used by JfrEventClassTransformer, which uses the returned Klass* to call other members. The signature of those methods could probably also be updated, but I think it's better done separately.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25306#discussion_r2105294845


More information about the hotspot-jfr-dev mailing list