On Mon, 17 Aug 2026 09:41:01 GMT, Markus Grönlund <[email protected]> wrote:
>> Greetings, >> >> Please see the problem description and rationale in the JIRA issue. >> >> Testing: jdk_jfr, stress testing, tier1 - 6 >> >> Thanks >> Markus >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Markus Grönlund has updated the pull request incrementally with one > additional commit since the last revision: > > change reinterpret_cast to static_cast src/hotspot/share/classfile/classLoaderData.cpp line 905: > 903: MetadataFactory::free_metadata(this, (ConstantPool*)m); > 904: } else if (m->is_klass()) { > 905: JFR_ONLY(Jfr::on_deallocation(static_cast<Klass*>(m));) This hook is necessary not directly for the JFR ClassDefine events (because those are handled after early unwinds), but for the JFR MethodTracer subsystem, which performs similar early processing. The JFR MethodTracer subsystem cannot determine whether a class that was instrumented and replaced fails later during class loading due to loading constraints, for example. We also register these deallocated classes with our unloading subsystem so JFR MethodTracer can detect these failures. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32218#discussion_r3802016024
