RFR: 8261106: Reduce inclusion of jniHandles.hpp

Ioi Lam iklam at openjdk.java.net
Thu Feb 4 01:38:49 UTC 2021


niHandles.hpp is included by about 800 out of 1000 HotSpot .o files. Most of these are transitively included from these header files, which don't actually need to include jniHandles.hpp.

- ci/ciBaseObject.hpp
- ci/ciMetadata.hpp
- ci/ciObject.hpp
- classfile/moduleEntry.hpp
- gc/shared/gcVMOperations.hpp
- jvmci/jvmciJavaClasses.hpp
- runtime/thread.hpp
- services/threadService.hpp

Fixing these headers reduces the number of .o files that include jniHandles.hpp to 145.

Note: 43 files were changed in this PR. Most of them were using jniHandles.hpp but were not including it directly.

Tested with mach5: tier1, builds-tier2, builds-tier3, builds-tier4 and builds-tier5. Also locally: aarch64, arm, ppc64, s390, x86, and zero.

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

Commit messages:
 - 8261106: Reduce inclusion of jniHandles.hpp

Changes: https://git.openjdk.java.net/jdk/pull/2393/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2393&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8261106
  Stats: 44 lines in 43 files changed: 36 ins; 8 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2393.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2393/head:pull/2393

PR: https://git.openjdk.java.net/jdk/pull/2393


More information about the shenandoah-dev mailing list