8259882: Reduce the inclusion of perfData.hpp #2123
perfData.hpp is about 1000 lines long, and is included by 829 out of about 1000 HotSpot .o files.
Several popular headers (such as synchronizer.hpp, objectMonitor.hpp, threadLocalAllocBuffer.hpp) include perfData.hpp. However, since these headers just declare pointers like
there's no need to include perfData.hpp. A forward declaration of the PerfCount type would suffice.
With forward declaration, we can remove perfData.hpp from these headers. This reduces the number of .o files that include perfData.hpp to 183. Build time of HotSpot is reduced by about 0.4%.
Note: the forward declaration is in the new file perfDataTypes.hpp. It contains typedefs to make "aliases" of the types. These are probably relics from the past, where new classes like
The HotSpot code uses both the "real" type and the "alias" type (mostly the latter). I don't want to deal with the alises for now, so I just moved them from perfData.hpp to perfDataTypes.hpp. We should probably just rename
Tested with mach5: tier1, builds-tier2, builds-tier3, builds-tier4 and builds-tier5. Also locally: aarch64, arm, ppc64, s390, x86, and zero.
The text was updated successfully, but these errors were encountered:
@iklam this pull request can not be integrated into
git checkout 8259882-reduce-inclusion-of-perfData.hpp git fetch https://git.openjdk.java.net/jdk master git merge FETCH_HEAD # resolve conflicts and follow the instructions given by git merge git commit -m "Merge master" git push
@iklam This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been no new commits pushed to the