RFR: 8243205: Modularize JVM flags declaration

Ioi Lam iklam at openjdk.java.net
Thu Dec 3 22:01:16 UTC 2020


This is the first step for modularizing the xxx_globals.hpp. The goals are

- Improve modularization of HotSpot source
- Reduce JVM build time

To prove that this works,  I have moved compiler_globals.hpp outside of the monolithic globals.hpp. Before this fix, compiler_globals.hpp was included by 922 HotSpot .o files. After this fix, it's included by 283 .o files.

I plan to do more refactoring later, such as:

- move gc_globals.hpp out of globals.hpp
- move the flags related to tiered compilation (about 40 flags) out of globals.hpp
- move the platform-specific flags outside of globals.hpp
  - these flags should be used only by platform-specific files. They shouldn't be used by shared files.

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

Commit messages:
 - 8243205: Modularize global variable declaration for JVM flag macros

Changes: https://git.openjdk.java.net/jdk/pull/1608/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1608&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8243205
  Stats: 494 lines in 27 files changed: 303 ins; 158 del; 33 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1608.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1608/head:pull/1608

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


More information about the hotspot-dev mailing list