megamorphic lambda prevention

Jochen Theodorou blackdrag at gmx.org
Thu Jun 21 12:17:15 PDT 2012


Mark,

can you explain what you mean with "depth"? if you mean the depth of a 
call path, then more than 20 is indeed more rare, but it depends on the 
circumstances. In Grails for example (web frame work in the Groovy 
world) a depth of 20 should be a much more commen case, simply because 
there is a framework around it, that already has the usual call path 
depth. As for seeing depth of the call path from the point the blokc is 
called to the point the iterator method is called, that is usually a 
quite short path of maybe depth <3. But maybe you something else by depth.

Anyway, the goal is inlining and inlining is something you get with a 
more or less constant call site. Invalidating it means to remove that 
attribute of being constant, the counter will start new. That's why you 
may be able to remove old cases from your call site structure that way, 
but for inlining it does not help at all. Well... I am sure Remi will 
correct me should I tell wrong things here ;)

bye Jochen

Am 21.06.2012 20:27, schrieb Mark Roos:
> Hi Jochen
>
> I was wondering at what depth you would consider a call site to be
> megamorphic?
>
> I have done quite a bit of profiling on Smalltalk ( which uses lots of
> blocks as iterators)
> and rarely see depths > 20.
 >
> As this depth seems to be time dependent ( at any one time its < 3 but
> over time it grows)
> I just invalidate the site when it gets past 20. But I am wondering what
> the best approach
> would be.
>
> I would like to do real time gwt chain inspection and modification but I
> don't think that is possible.
>
> regards
> mark
>
>
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev



More information about the mlvm-dev mailing list