review request (L): JDK changes for 7023639: JSR 292 method handle invocation needs a fast path for compiled code

John Rose john.r.rose at oracle.com
Mon Jul 23 11:31:55 PDT 2012


On Jul 23, 2012, at 2:27 AM, Aleksey Shipilev wrote:

> Global synchronization is the performance smell, and this looks to be
> potential scalability bottleneck (it sends shivers down my spine every
> time I see "static synchronized" in the same line. That is not to
> mention synchronizing on placeholder looks suspicious and error-prone.

I believe the code is correct.  The purpose is to load as many distinct "species" of BMH tuples as the application type schema requires.  The use of placeholders is patterned after the JVM's internal class loading algorithm.

The code does not need to be scalable, because the number of entries in the cache is small (order of 10-100) and scales only with type schema complexity, not workload complexity.

So in this case, "static synchronized" is the correct choice.

> Do you need help rewriting this with CHM?

No, but thanks for the help!

— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20120723/ef437ceb/attachment.html 


More information about the mlvm-dev mailing list