RFR: JDK-8303154: Investigate and improve instruction cache flushing during compilation
Damon Fenacci
duke at openjdk.org
Mon Mar 13 13:05:29 UTC 2023
On Fri, 10 Mar 2023 22:55:19 GMT, Vladimir Kozlov <kvn 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()."
@vnkozlov the ICache flushing was called 1596 times during adapters generation with C1. You're right, these are by far the most calls and the flush calls are also performed twice in these cases, once in `CodeBuffer::copy_code_to()` and once in `CodeCache::commit()` (I've missed it).
> I thought we would remove flush from CodeCache::commit() and not from copy_code_to().
I thought it would make more sense to keep the flush in `CodeCache::commit()` since it was generally the last call made but, in light of what you're pointing out, it would definitely make more sense to remove it from `CodeCache::commit()` and only leave it in `copy_code_to`. This also halves the number of flushing coming from adapters.
-------------
PR: https://git.openjdk.org/jdk/pull/12877
More information about the hotspot-compiler-dev
mailing list