Inlining heuristic trouble

Mark Roos mroos at roos.com
Mon Jun 20 20:43:46 PDT 2011


John Rose stated

        See section 5, "Case Study: Inline Caches and invokedynamic".

Thanks John, I have read that several times and it is very helpful

        A small (non-megamorphic) polymorphic cache can be represented as 
a cascade or decision tree of GWT               combinators, probably with 
a control block of some sort that can rebalance from time to time.

This is interesting but it seems that the jvm is in a better place to 
collect the information and
reorder the paths.  I would have to add counters and some way to remember 
the MHs ( no reflection yet)
which seems like a lot of book keeping.  My current approach is to keep 
track of the total methods in use
and then invalidate the entire set of call sites ( cache flush ).  This 
matches the ST I am using as
a reference and seems to keep the working set and depths under control.

        A megamorphic call site can be represented using the class pattern 
of a two-step dispatch plus indirect    function call. 

How about the case where the site is megamorphic in classes but has only 
one or two implementations?  I'll
study the foldArguments to see if I can see how to do this

thanks

mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20110620/d98e58a0/attachment.html 


More information about the mlvm-dev mailing list