RFR: JDK-8303154: Investigate and improve instruction cache flushing during compilation [v2]
Vladimir Kozlov
kvn at openjdk.org
Mon Mar 13 17:51:11 UTC 2023
On Mon, 13 Mar 2023 15:35:36 GMT, Damon Fenacci <duke at openjdk.org> wrote:
>> Did you look on how many times we flush ICache during adapters generation?
>> It has most numerous cases when I looked on it:
>> "CodeCache::commit() is also used for adapters. But adapters uses RuntimeBlob which calls CodeBuffer::copy_code_to()."
>>
>> I thought we would remove flush from CodeCache::commit() and not from copy_code_to().
>
> @vnkozlov @TobiHartmann I pushed the changes if you want to have a look at them again. Thanks a lot!
@dafedafe I look on stack traces you collected. Please look on this:
732 Stack:
ICache::invalidate_range(unsigned char *, int) icache_bsd_aarch64.hpp:41
AbstractAssembler::flush() assembler.cpp:110
SharedRuntime::generate_i2c2i_adapters(MacroAssembler *, int, int, const BasicType *, const VMRegPair *, AdapterFingerPrint *) sharedRuntime_aarch64.cpp:794
AdapterHandlerLibrary::create_adapter(AdapterBlob *&, int, BasicType *, bool) sharedRuntime.cpp:2970
`generate_i2c2i_adapters` is called for temporary buffer so we don't need to flush it:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/sharedRuntime.cpp#L2870
-------------
PR: https://git.openjdk.org/jdk/pull/12877
More information about the hotspot-compiler-dev
mailing list