Integrated: 8323065: Unneccesary CodeBlob lookup in CompiledIC::internal_set_ic_destination

Aleksey Shipilev shade at openjdk.org
Mon Jan 8 10:29:31 UTC 2024


On Fri, 5 Jan 2024 14:37:16 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> I was looking at hotpath for IC stub cleaning (happens at safepoint), and one obvious thing is that we look-up `CodeBlob` from `call->instruction_address()` only to assert that is compiled one. It used to be protected by `#ifdef ASSERT` before [JDK-8212681](https://bugs.openjdk.org/browse/JDK-8212681), and pulled from it to be used in Mutex in JDK 12: https://hg.openjdk.org/jdk/jdk/rev/d6dc479bcdd3#l15.62 And the Mutex was shortly gone after [JDK-8214257](https://bugs.openjdk.org/browse/JDK-8214257). So we are exposing this code to product binaries since JDK 12. 
> 
> This fix reinstates the `ASSERT` block again. There are small improvements (~1..10us) for safepoint cleanup on small ad-hoc tests in release builds on my Mac. But since this whole thing involves looking up things in code cache, it may cost quite a lot.

This pull request has now been integrated.

Changeset: eb9e754b
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/eb9e754b3a439cc3ce36c2c9393bc8b250343844
Stats:     4 lines in 1 file changed: 3 ins; 1 del; 0 mod

8323065: Unneccesary CodeBlob lookup in CompiledIC::internal_set_ic_destination

Reviewed-by: dlong, thartmann

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

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


More information about the hotspot-compiler-dev mailing list