RFR: 8318609: Upcall stubs should be smaller
Martin Doerr
mdoerr at openjdk.org
Sat Oct 21 12:02:52 UTC 2023
On Fri, 20 Oct 2023 16:17:17 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
> We can use `resolve_global_jobject` (introduced by [JDK-8299089](https://bugs.openjdk.org/browse/JDK-8299089)) because we know that the handle is created by `JNIHandles::make_global` in `UL_MakeUpcallStub`. That creates much shorter code.
>
> Size reduced from 1360 bytes to 648 bytes on x64 for a trivial upcall using G1.
> 1584 bytes to 936 bytes using ShenandoahGC.
> 1064 bytes to 848 bytes using Generational ZGC.
> As I remember it was measured before: [#12908 (comment)](https://github.com/openjdk/jdk/pull/12908#issuecomment-1461390976)
>
> I would take another look.
You have convinced me that resolve_global_jobject is still too long for some GCs. I've moved it into the C code.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16290#issuecomment-1773769152
More information about the hotspot-compiler-dev
mailing list