RFR: 8317761: Combine two versions of print_statistics() in java.cpp

Ioi Lam iklam at openjdk.org
Mon Oct 9 23:14:17 UTC 2023


The non-product version of `print_statistics()` can be compiled in the product build as well, so there's no need to keep two different versions.

BTW, for some reason `print_method_profiling_data()` is called unconditionally in non-product builds, but is guarded by `PrintMethodData` in product builds. I made the behavior the same as before in this PR. This can probably be cleaned up in a future PR.

I verified that:

- All functions call by the original product version are also called by the non-product version (but could be in different order).
- For functions that are called by the non-product version but not call by the original product version: all such calls are guarded by non-product flags (e.g. `TimeOopMap`), or the function itself does nothing (e.g., declared as `PRODUCT_RETURN`)

Testing: tier1, tier2, build-tiers5

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

Commit messages:
 - 8317761: Combine two versions of print_statistics() in java.cpp

Changes: https://git.openjdk.org/jdk/pull/16110/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16110&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8317761
  Stats: 64 lines in 2 files changed: 12 ins; 51 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/16110.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16110/head:pull/16110

PR: https://git.openjdk.org/jdk/pull/16110


More information about the hotspot-dev mailing list