RFR(S): 8139046: Compiler Control: IVGPrintLevel directive should set PrintIdealGraph
Nils Eliasson
nils.eliasson at oracle.com
Fri Jun 12 12:35:42 UTC 2020
On 2020-06-11 21:30, Liu, Xin wrote:
> Hi, Nils,
>
> Thank you to look into the webrev.
>
> Can you change the text for -1 to "printing is disabled" - because that
> is the practical difference between 0 and -1.
>
> Got it. here is the revision change the description.
> http://cr.openjdk.java.net/~xliu/8139046/03/webrev/src/hotspot/share/opto/c2_globals.hpp.udiff.html
>
> For a future fix I would suggest creating the printer on demand. Then
> the -1 value wouldn't be needed anymore.
>
> I don't quite understand here. This patch does create the printer on demand.
Yes it does, I misread it.
> A compiler thread only creates the instance of printer when should_print(level) returns true. PrintIdealGraphLevel=-1 roles a global switch to disable IdealGraph dumping.
>
> I think in this way. JDK-8139046 can also be treated as a feature, right? 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.
Yes, It is a good solution with minimal complexity. I don't know why
anyone would like to turn PrintIdealGraph off - but who knows.
Best regards,
Nils
> Thanks,
> --lx
>
>
More information about the hotspot-compiler-dev
mailing list