JDK-8139046 : Compiler Control: IGVPrintLevel directive should set PrintIdealGraph
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,10,11,16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-10-07
  • Updated: 2024-11-13
  • Resolved: 2020-06-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 16
11.0.16Fixed 16 b02Fixed
Related Reports
Relates :  
Description
Right now when you use IGVPrintLevel in a directive file you also need to specify -XX:+PrintIdealGraph on the command line for it to take effect.
This is especially problematic if one is trying to add this directive through jcmd and PrintIdealGraph was not set at startup, since then you will need to restart the JVM.
Comments
Fix Request (11u): This fix enables usage of IGV printing only for a selected method in non-Product builds, e.g.: -XX:PrintIdealGraphFile=igv.xml -XX:CompileCommand=option,TestKlass::testMethod,intx,IGVPrintLevel,3 Without this fix, no igv.xml gets created. We would like to use it to debug C2 crashes which don't reproduce in later JDK releases. Risk: Low. Only fixes a non-Product diagnostic feature. Doesn't apply cleanly (see PR). Testing: Opened igv.xml with IdealGraphVisualizer from JDK 17. Looks reasonable. No regression.
23-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/1102 Date: 2022-05-20 12:56:12 +0000
20-05-2022

Changeset: 892d9985 Author: Xin Liu <xliu@openjdk.org> Date: 2020-06-12 13:33:29 +0000 URL: https://git.openjdk.java.net/lanai/commit/892d9985
02-07-2020

Changeset: 892d9985 Author: Xin Liu <xliu@openjdk.org> Date: 2020-06-12 13:33:29 +0000 URL: https://git.openjdk.java.net/panama-foreign/commit/892d9985
02-07-2020

Changeset: 892d9985 Author: Xin Liu <xliu@openjdk.org> Date: 2020-06-12 13:33:29 +0000 URL: https://git.openjdk.java.net/amber/commit/892d9985
02-07-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/bce848d15840 User: phh Date: 2020-06-12 20:33:48 +0000
12-06-2020

This can also be treated as a feature. Previously, we can use PrintIdealGraph as a global switch. Without it, c2 just ignore whatever you write in directives. After C2 picks up IGVPrintLevel directive automatically, hotspot loses that feature. -XX:PrintIdealGraphLevel=-1 and its synonym -XX:-PrintIdealGraph serve as the global switch. It's useful when developers have written a lot of directives in their commands and just want to temporarily disable PrintIdealGraph.
12-06-2020

[~xliu] Please go ahead!
02-06-2020

it's a non-op when user just specify "option Demo.* intx IGVPrintLevel = 3" using compiler directive. Users have to amend -XX:+PrintIdealGraph.
02-06-2020

This is still true. hi [~neliasso], May I assign this to me?
02-06-2020