RFR: 8252526: Remove excessive inclusion of jvmti.h and jvmtiExport.hpp [v2]

Ioi Lam iklam at openjdk.java.net
Thu Nov 12 01:49:11 UTC 2020


> jvmti.h is included 905 times and jvmtiExport.hpp is included 776 times (out of 971 hotspot .o files). Most of these are unnecessarily included by the following 3 popular header files:
> 
> * javaClasses.hpp: `java_lang_Class::ThreadStatus` (which depends on jvmti.h) this type is rarely used. Move this type to a separate header file. The enum is also changed to an enum class for better type safety.
> * os.hpp: No need to include jvmti.h. Use forward declaration for `struct jvmtiTimerInfo;` instead.
> * thread.hpp: No need to include jvmExport.hpp. Use forward declaration for `JvmtiSampledObjectAllocEventCollector` and `JvmtiVMObjectAllocEventCollector` instead.
> 
> Tested with mach5 tier1-2 and build tiers 3-5.
> 
> Note: Many files are changed, but most of the changes are adding a missing jvmtiExports.hpp.
> 
> Original review thread: https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-August/041509.html

Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - Merge branch 'master' of https://github.com/openjdk/jdk into 8252526-include-jvmti-hpp
 - 8252526: Remove excessive inclusion of jvmti.h and jvmtiExport.hpp

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1152/files
  - new: https://git.openjdk.java.net/jdk/pull/1152/files/becd1f67..4d0171e6

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1152&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1152&range=00-01

  Stats: 8837 lines in 139 files changed: 5759 ins; 2203 del; 875 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1152.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1152/head:pull/1152

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


More information about the hotspot-dev mailing list