jmx-dev RFR: 8373464: Test JdkManagementCheckSince.java fails after JDK-8369736
Ioi Lam
iklam at openjdk.org
Thu Dec 11 14:36:34 UTC 2025
On Thu, 11 Dec 2025 06:01:15 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Please review this small fix and the plan of action for backporting JDK-8369736 to JDK 26.
>>
>> (JDK-8369736 is under https://openjdk.org/jeps/3#Late-Enhancement-Request-Process)
>>
>> **Background**
>>
>> The "actually introduced version" for `HotSpotAOTCacheMXBean` is found using the `ct.sym` file (JdkManagementCheckSince.java uses test/jdk/tools/sincechecker/SinceChecker.java, which doesn't read `ct.sym` directly, but uses `JavacTool` with `--release N`, which in turn loads `ct.sym`)
>>
>>
>> $ unzip -l ./images/jdk/lib/ct.sym | grep HotSpotAOTCacheMXBean.sig
>> 167 2025-12-11 03:16 R/jdk.management/jdk/management/HotSpotAOTCacheMXBean.sig
>>
>>
>> "R" is JDK 27 ("1" is JDK 1, "A" is JDK 10, "B" is JDK 11, etc ...)
>>
>> In comparison, `VirtualThreadSchedulerMXBean` was first introduced in "O" = JDK 24, and its API has not changed since)
>>
>>
>> $ unzip -l ./images/jdk/lib/ct.sym | grep VirtualThreadSchedulerMXBean.sig
>> 313 2025-12-11 03:16 OPQR/jdk.management/jdk/management/VirtualThreadSchedulerMXBean.sig
>>
>>
>> Note that if an API has evolved over time, we may have several `.sig` files:
>>
>>
>> $ unzip -l ./images/jdk/lib/ct.sym | grep util/Vector.sig
>> 3058 2025-12-11 03:16 8/java.base/java/util/Vector.sig
>> 3182 2025-12-11 03:16 9A/java.base/java/util/Vector.sig
>> 3272 2025-12-11 03:16 BCDEFGHIJKLMNOPQR/java.base/java/util/Vector.sig
>>
>>
>> `ct.sym` is generated from files in [src/jdk.compiler/share/data/symbols](https://github.com/openjdk/jdk/tree/master/src/jdk.compiler/share/data/symbols)
>>
>>
>> $ cd src/jdk.compiler/share/data/symbols
>> $ grep VirtualThreadSchedulerMXBean *
>> jdk.management-O.sym.txt:class name jdk/management/VirtualThreadSchedulerMXBean
>>
>>
>> Because `HotSpotAOTCacheMXBean` is not listed in any of the `.sym.txt` files, it's added as version "R" in `ct.sym`
>>
>>
>> $ grep HotSpotAOTCacheMXBean * | wc
>> 0 0 0
>>
>>
>> **Proposed plan of action**
>>
>> 1. In the mainline, update HotSpotAOTCacheMXBean.java to use `@since 27` (this PR) to fix the current test failure in the mainline.
>>
>> 2. When backporting HotSpotAOTCacheMXBean.java to JDK 26 (with approval), it should have `@since 26`.
>>
>> 3. After JDK 26 is finalized, update the mainline:
>> - Add HotSpotAOTCacheMXBean to `jdk.management-Q.sym.txt`
>> - Update HotSpotAOTCacheMXBean.java to use `@since 26`.
>
> Good and trivial. Thanks for fixing.
Thanks @dholmes-ora @shipilev @kevinjwalls for the review
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28760#issuecomment-3642210642
More information about the jmx-dev
mailing list