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

Vladimir Ivanov vlivanov at openjdk.org
Tue Oct 10 18:08:10 UTC 2023


On Tue, 10 Oct 2023 17:05:12 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> 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
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   call print_method_profiling_data() unconditionally

FTR a slight difference in behavior between product and non-product builds when it comes to `-XX:CompileCommand=print,...` command is whether MDOs are printed or not. 

I'm fine with aligning all builds flavors include MDOs into `-XX:CompileCommand=print,...` output.

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

Marked as reviewed by vlivanov (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16110#pullrequestreview-1668523656


More information about the hotspot-dev mailing list