On Thu, 19 Sep 2024 14:08:04 GMT, Claes Redestad <redes...@openjdk.org> wrote:

> This PR changes proxy code gen to avoid generating 
> `Class.forName("java.lang.Object")`, instead emitting an ldc for the class 
> literal, `ldc(CD_Object)`, java code equivalent `Object.class`. 
> 
> More types could profitably use `ldc(ClassDesc/-Entry)`, taking cues from 
> `InvokerBytecodeGenerator.isStaticallyInvocable`, but just addressing the 
> `Object` methods gets rid of most `Class.forName` emits. It's not terribly 
> important for throughput performance since these are called in the generated 
> `clinit`, so getting a quick win with few additional checks is a good 
> starting point.
> 
> Added a few unrelated minor refactors/improvements, guided by diagnostic runs 
> of the now fixed microbenchmark.

This pull request has now been integrated.

Changeset: a50440fa
Author:    Claes Redestad <redes...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/a50440fadcd1aa9d8bfddc153dbde6fd55ceb9fa
Stats:     327 lines in 4 files changed: 146 ins; 166 del; 15 mod

8340456: Reduce overhead of proxying Object methods in ProxyGenerator

Reviewed-by: liach

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

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

Reply via email to