RFR: 8255339: CodeBuffer::_last_insn is only used on AArch64

Claes Redestad redestad at openjdk.java.net
Fri Jan 8 09:19:53 UTC 2021


On Fri, 8 Jan 2021 08:46:18 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> CodeBuffer::_last_insn was used to merge consecutive memory barriers and
>> adjacent load/store on AArch64.
>> 
>> This patch marks it as AArch64 only so that 8 bytes could be dropped
>> from CodeBuffer on other architectures.
>
> I understand the desire to do this, but I really doubt that introducing arch-specific behaviors in shared code buys us enough. I believe it saves 8 bytes for a transient code buffer, so ballparking 10K methods are compiled, it saves 80K of temporary allocations? If this was saving more and for non-transient footprint, it would be interesting.

I filed this RFE while looking through and cleaning out unused code in the area. Letting arch-specific behavior like this live on in shared code means static analysis highlights it as unused which is a bit of a nuisance. Any performance benefit is decidedly slim here, though.

While macroing out code looks superficially messy I think the reading and understanding of code is overall helped when being explicit.

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

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


More information about the hotspot-compiler-dev mailing list