RFR: 8254965: Remove unused Matcher::_ruleName and make ruleName non-product

Claes Redestad redestad at openjdk.java.net
Mon Oct 19 09:32:11 UTC 2020


On Mon, 19 Oct 2020 03:04:16 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> - Matcher::_ruleName is unused - remove
>> - ruleName, defined via ad, is only used by a non-product routine. #ifdef it accordingly
>> 
>> This reduces the JVM size (-63Kb on linux-x64, or about 0.25%)
>
> Unfortunately we may soon use it (problem was found only in product VM during Graal testing). Following JDK-8247350 fix
> to catch issues in product VM we may want to use rule names:
>         tty->print_cr("fatal error context information: rule: (%s) n_size (%d), current_offset (%d), instr_offset (%d)",
>         mach->rule() == 9999999 ? "<unknown>" : ruleName[mach->rule()], n_size, current_offset, instr_offset);

Does that print really need to print the name of the rule - or would just printing `mach->rule()` suffice? For
sustainability purposes I suppose having the name spelled out is a nice to have rather than a strict necessity.

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

PR: https://git.openjdk.java.net/jdk/pull/722


More information about the hotspot-compiler-dev mailing list