RFR: JDK-8303154: Investigate and improve instruction cache flushing during compilation [v2]

Damon Fenacci duke at openjdk.org
Tue Mar 14 13:22:23 UTC 2023


On Tue, 14 Mar 2023 08:22:42 GMT, Damon Fenacci <duke at openjdk.org> wrote:

>> Good. What are new numbers of of calls to flush the ICache?
>
>> Good. What are new numbers of of calls to flush the ICache?
> 
> The total number of flushes for the _HelloWorld_ on Mac OSX aarch64 go from 3569 to 2756 on C1 (22.8% improvement) and from 3572 to 2685 on C2 (24.1% improvement).

> @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:


Yes, thanks a lot @vnkozlov! I've removed the flushing there too.
Now the number of flushes for _HelloWorld_ is down to 2028 with C1 (43% improvement).

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

PR: https://git.openjdk.org/jdk/pull/12877


More information about the hotspot-compiler-dev mailing list