Integrated: 8372097: C2: PhasePrintLevel requires setting PrintPhaseLevel explicitly to be active

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Thu Nov 20 09:17:11 UTC 2025


On Wed, 19 Nov 2025 08:51:58 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> This changeset aligns the behavior of `PrintPhaseLevel` with its description in `c2_globals.hpp` in the default case of `-XX:PrintPhaseLevel=0`. In particular, after the changeset, running `java -XX:CompileCommand=PhasePrintLevel,*::*,N` does print the phase names corresponding to level `N` for the matched methods, as expected:
> 
> 
> $ java -Xbatch -XX:CompileCommand=PhasePrintLevel,java.lang.StringLatin1::equals,2
> CompileCommand: PhasePrintLevel java/lang/StringLatin1.equals intx PhasePrintLevel = 2
> 1.	After Parsing
> 2.	Iter GVN 1
> 3.	Incremental Inline
> 4.	Incremental Boxing Inline
> 5.	Before Loop Optimizations
> 6.	PhaseIdealLoop 1
> 7.	PhaseIdealLoop 2
> ...
> 
> 
> The changeset makes the behavior of the `PrintPhaseLevel` flag and `PhasePrintLevel` compile command consistent with the behavior of the pre-existing, analogous `PrintIdealGraphLevel` flag and `IGVPrintLevel` compile command. The changeset adds tests covering and documenting different combinations of flag and compile-command-specified print levels, and fixes a typo in the flag description in `c2_globals.hpp`.
> 
> **Testing:** tier1-3 (linux-x64, windows-x64, macosx-x64, linux-aarch64, macosx-aarch64).

This pull request has now been integrated.

Changeset: 6fc8e499
Author:    Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/6fc8e4998019a2f3ef05ff3e73a4c855c0366d7a
Stats:     112 lines in 3 files changed: 110 ins; 0 del; 2 mod

8372097: C2: PhasePrintLevel requires setting PrintPhaseLevel explicitly to be active

Reviewed-by: mhaessig, chagedorn

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

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


More information about the hotspot-compiler-dev mailing list