RFR: 8255245: C1: Fix output of -XX:+PrintCFGToFile to open it with visualizer [v2]
Xin Liu
xliu at openjdk.java.net
Tue Oct 27 16:23:30 UTC 2020
On Tue, 27 Oct 2020 15:57:10 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> src/hotspot/share/c1/c1_LinearScan.hpp line 641:
>>
>>> 639: }
>>> 640: // Special version for compatibility with C1 Visualizer.
>>> 641: void print_on(outputStream* out, bool is_cfg_printer) const;
>>
>> then why not just print_on(outputStream* out, bool is_cfg_printer=false) const directly? those 3 lines can be further saved. :)
>
> This would be a good idea but unfortunately that does not compile as it complains that `virtual void AllocatedObj::print_on(outputStream*) const` was hidden.
you are right. I just figure out that print_on(outputStream*) const is virtual. we can't use that trick.
anyway, your patch looks good to me.
-------------
PR: https://git.openjdk.java.net/jdk/pull/837
More information about the hotspot-compiler-dev
mailing list