RFR(S): 8139046: Compiler Control: IVGPrintLevel directive should set PrintIdealGraph

Liu, Xin xxinliu at amazon.com
Fri Jun 12 18:31:08 UTC 2020


Hi, Nils, 

Thanks for reviewing it. 

Another reason is combability. Previously, developers can use "-XX:-PrintIdealGraph" to disable the printer. I'd like to keep this behavior same. 
I will ask Paul to sponsor it. thanks!
--lx

On 6/12/20, 5:37 AM, "hotspot-compiler-dev on behalf of Nils Eliasson" <hotspot-compiler-dev-bounces at openjdk.java.net on behalf of nils.eliasson at oracle.com> wrote:

    CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.



    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