Request for review (L): 7087838: JSR 292: add throttling logic for optimistic call site optimizations

John Rose john.r.rose at oracle.com
Mon Sep 19 12:44:45 PDT 2011


On Sep 19, 2011, at 12:57 AM, Christian Thalinger wrote:

> On Sep 18, 2011, at 7:16 PM, Mark Roos wrote:
> 
>> In looking at my code. 
>> 
>> In general 98% of the callsites are < 3 targets. 
>> 
>> Those that are larger I can catch and use a different lookup.  I also believe that Charles Nutter limits his 
>> depth to 5. 
>> 
>> So the general case I see will not exceed the < 10. 
>> 
>> But I do have some cases where 10 is not the right number 
> 
> You can adjust that number in your runtime startup script since the switch that drives that number is a product switch:
> 
> -XX:PerCallSiteSetTargetTrapLimit=50

This is the right short-term answer to see how our technique will affect Mark's system.

In choosing heuristics like this it is best to start simple and then see whether it causes problems in practice.  In addition, providing tuning knobs allows customers to perform experiments to see if their performance is affected by the heuristic.

If there are only a few "megamutable" call sites, it may be the case that their performance is best managed by special techniques, rather than by adjusting the heuristics that affect all the other call sites.  In particular, indirect (non-inlined) calls through method handles are slow right now; I'm working on fixing this.

-- John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20110919/05adea9b/attachment.html 


More information about the mlvm-dev mailing list