RFR: 8355970: C2: Add command line option to print the compile phases [v4]

Manuel Hässig mhaessig at openjdk.org
Tue May 13 09:13:44 UTC 2025


On Mon, 12 May 2025 16:28:35 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Manuel Hässig has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   No tty lock needed for one print
>
> src/hotspot/share/opto/compile.hpp line 671:
> 
>> 669:   bool should_print_igv(int level);
>> 670:   bool should_print_phase(int level) const;
>> 671:   bool should_print_ideal_phase(CompilerPhaseType cpt) const;
> 
> You can use macro `PRODUCT_RETURN_(return false;);` and put both methods under `#ifndef PRODUCT` in .cpp file.

Thanks for pointing this out. I actually realized that these functions only have callers from `NOT_PRODUCT` and they implement functionality for development flags. So instead of your suggestion, I moved everything into `#ifndef PRODUCT`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25183#discussion_r2086322775


More information about the hotspot-compiler-dev mailing list