RFR: 8335921: Fix HotSpot VM build without JVMTI
Vladimir Kozlov
kvn at openjdk.org
Wed Jul 17 03:42:07 UTC 2024
Citing David Holmes from bug report:
"We provided the ability to leave out certain VM services (JVMTI, GC's other than serial, ...) as part of the design of the MinimalVM to support Java SE Embedded, along with the Compact Profiles of JDK 8. This manifested in the source code as a set of INCLUDE_XXX ifdef guards. The build system later exposed these as individual --with-jvm-features=xxx,yyy support. However, it was never intended (and certainly not tested) that you could mix-and-match arbitrary subsets of these VM features at will. Consequently if you start trying to do this you will find things that need fixing."
I added `INCLUDE_JVMTI` guards in two places where it was missed: JVMCI and JFR. Affected code was added recently, in the past year. After that I was able to build VM on all supported platforms.
Note: building VM without JVMTI is not officially supported feature. We are not testing it and such failures (missing guards) are not unexpected.
A lot of tests failed with VM without JVMTI. All are expected failures. I listed failed tests in bug report.
I fixed (added requires `vm.jvmti`) only one which was part of [JDK-8257967](https://bugs.openjdk.org/browse/JDK-8257967) changes which introduced JFR code without `INCLUDE_JVMTI` guards.
I ran 2 rounds of testing:
First, only **tier1** with VM built without JVMTI to see if builds passed and which tests affected. I wrote comment in bug report which tests failed (all expected to fail without JVMTI).
Second round of testing with JVMTI in VM: tier1-4
-------------
Commit messages:
- 8335921: Fix HotSpot VM build without JVMTI
Changes: https://git.openjdk.org/jdk/pull/20209/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20209&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8335921
Stats: 20 lines in 8 files changed: 7 ins; 0 del; 13 mod
Patch: https://git.openjdk.org/jdk/pull/20209.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20209/head:pull/20209
PR: https://git.openjdk.org/jdk/pull/20209
More information about the build-dev
mailing list