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

Erik Gahlin egahlin at openjdk.org
Thu May 22 19:49:56 UTC 2025


On Thu, 22 May 2025 12:15:24 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/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java line 208:
> 
>> 206:                     nativeControls.remove(n);
>> 207:                     TypeLibrary.removeType(nativeType.getId());
>> 208:                     pEventType.setAnnotations(nativeType.getAnnotationElements());
> 
> This looks like accidental removal. Is it?

It's by design. When an event is defined in both metadata.xml and as a JDK event, we want the event metadata to be taken from Java. I don't remember exactly what the problem was in this case. Perhaps @RemoveFields was ignored, so there was a field mismatch.

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

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


More information about the hotspot-jfr-dev mailing list