[jdk21u-dev] Integrated: 8342958: Use jvmArgs consistently in microbenchmarks
SendaoYan
syan at openjdk.org
Thu Mar 27 01:41:20 UTC 2025
On Thu, 13 Feb 2025 12:06:57 GMT, SendaoYan <syan at openjdk.org> wrote:
> Hi all,
>
> - This is PR contains two backport to jdk21u-dev
>
> 1. Uncleanly backport of [JDK-8342958](https://bugs.openjdk.org/browse/JDK-8342958).
> 2. Cleanly backport of [JDK-8343345](https://bugs.openjdk.org/browse/JDK-8343345).
>
> - Why do we need these two backport?
>
> 1. [Suggests using jvmArgs consistently](https://github.com/openjdk/jdk/pull/21683#issue-2611685724).
> 2. This backport will make several JMH tests run normally after this backport. Before this backport, 'org.openjdk.bench.java.net.NetworkInterfaceLookup.bound' report fails "java.lang.IllegalAccessException: class org.openjdk.bench.java.net.NetworkInterfaceLookup cannot access a member of class java.net.NetworkInterface (in module java.base) with package access", after this backport this JMH test will run passes.
>
> Why this backport can not backport cleanly?
>
> 1. Some JMH tests added after jdk21u, such as test/micro/org/openjdk/bench/java/lang/CallerClassBench.java was added by jdk22.
> 2. Some JMH tests removed after jdk21u, such as test/micro/org/openjdk/bench/java/lang/StringTemplateFMT.java wad removed by JDK-8329948
> 3. Some JMH tests has diffrent file name ater jdk21u, such as rename from test/micro/org/openjdk/bench/jdk/classfile/GenerateStackMaps.java to test/micro/org/openjdk/bench/jdk/classfile/CodeAttributeTools.java by JDK-8323183
>
>
> Testing:
>
> - [x] Run all the touch JMH tests locally.
>
> Test commands:
>
> wget https://patch-diff.githubusercontent.com/raw/openjdk/jdk21u-dev/pull/1403.diff -O JDK-8342958-21u.patch
> grep "diff --git" JDK-8342958-21u.patch | awk '{print $3}' | grep "^a/test" | sed "s|^a/test/micro/||" | sed "s|/|.|g" | sed "s|.java$||" > list.txt
> rm -rf build/jmh-result/ ; mkdir -p build/jmh-result/ ; time for test in `cat list.txt` ; do time make test TEST="micro:$test" MICRO="FORK=1;WARMUP_ITER=2" CONF=release &> build/jmh-result/$test.log ; done
>
>
> Test result:
> 5 tests fails, the fails unrelated to this PR, I have create a new [issue](https://bugs.openjdk.org/browse/JDK-8350051) to record this failure. All other tests passes.
>
> [jmh-result.zip](https://github.com/user-attachments/files/18792902/jmh-result.zip)
This pull request has now been integrated.
Changeset: 7ae30385
Author: SendaoYan <syan at openjdk.org>
URL: https://git.openjdk.org/jdk21u-dev/commit/7ae30385fc9858b9fdfefbac16ca5988333ba08d
Stats: 119 lines in 94 files changed: 0 ins; 0 del; 119 mod
8342958: Use jvmArgs consistently in microbenchmarks
8343345: Use -jvmArgsPrepend when running microbenchmarks in RunTests.gmk
Reviewed-by: phh
Backport-of: 90bd544512de541cd98889bec58f419bc69a723d
-------------
PR: https://git.openjdk.org/jdk21u-dev/pull/1403
More information about the jdk-updates-dev
mailing list