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

Vladimir Kozlov kvn at openjdk.java.net
Mon Oct 19 18:12:16 UTC 2020


On Mon, 19 Oct 2020 17:30:19 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>>> 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.
>> 
>> mach->rule() value is only available in files generated from .ad file during build. If you don't have those files
>> available it will be hard to map the value to mach instruction. You have to rebuild VM again and for that you need to
>> have exact sources as one failed. It is doable but hassle.
>
>> > 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.
>> 
>> mach->rule() value is only available in files generated from .ad file during build. If you don't have those files
>> available it will be hard to map the value to mach instruction. You have to rebuild VM again and for that you need to
>> have exact sources as one failed. It is doable but hassle.
> 
> A hassle surely, but sustaining engineers routinely must set up exact source to debug an issue. So I think it's a
> judgement call, and if you prefer keeping it in I'm ok with that: reducing static footprint is nice, but a lump of
> things like this should never be paged in anyhow.  A side-note: Matcher has several of these fields that only take a
> pointer to a .ad-defined array, e.g., _ruleName, _must_clone, _swallowed, ... - does this do any good, or could the
> code refer to the static globals directly? If only used for debugging or printouts like _ruleName it can surely go, but
> how about the others?

_mist_clone[] and _swallowed[] (which should be boolean) are used for code generation.
Looks like ruleName[] is not use in product but again it is useful for debugging product VM.

I am not sure how you can convert array element references to static globals.

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

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


More information about the hotspot-compiler-dev mailing list