Polimorphic vs Megamorphic calls
ionutb83 at yahoo.com
Thu Mar 31 10:08:49 UTC 2016
Thank you very much for recommended docs/articles. I have stuff to read now.
On Wednesday, March 30, 2016 8:30 PM, "forax at univ-mlv.fr" <forax at univ-mlv.fr> wrote:
This remember me that i should enroll Aleksey to do the same for the basic strategies based on invokedynamic used by the dynamic languages.
----- Mail original -----
> De: "Dawid Weiss" <dawid.weiss at gmail.com>
> À: "Remi Forax" <forax at univ-mlv.fr>
> Cc: "Ionut" <ionutb83 at yahoo.com>, "Hotspot-dev Developers" <hotspot-dev at openjdk.java.net>
> Envoyé: Mercredi 30 Mars 2016 19:19:51
> Objet: Re: Polimorphic vs Megamorphic calls
> Aleksey has a very nice and relevant blog post about it:
> On Wed, Mar 30, 2016 at 5:12 PM, Remi Forax <forax at univ-mlv.fr> wrote:
> > ----- Mail original -----
> >> De: "Ionut" <ionutb83 at yahoo.com>
> >> À: "Hotspot-dev Developers" <hotspot-dev at openjdk.java.net>
> >> Envoyé: Mardi 29 Mars 2016 10:32:40
> >> Objet: Polimorphic vs Megamorphic calls
> >> Hello All,
> > Hi,
> >> Could you please explain what is the difference between a Polimorphic
> >> and a Megamorphic call?
> > It's a dynamic property of a method call instruction (invokeinterface and
> > invokevirtual in the Java bytecode).
> > This is related to an optimization technique called inlining-cache ,
> > For Hotspot,
> > - if the instruction has always been called the same method
> > implementation, the callsite is monomorphic,
> > and the inlining cache is just a comparison and a jump,
> > - if the instruction has been called a small number of method
> > implementations (for Hotspot, it's 2),
> > the inlining cache do several comparison/jump checks.
> > - if the instruction has been called with a lot of different
> > implementations,
> > there is no inlining cache, a virtual call  is generated instead.
> >> If you have some documentation on this topic or how it is handled by
> >> HotSpot would be great.
> > There is a wiki, (not updated as i should be)
> > https://wiki.openjdk.java.net/display/HotSpot/PerformanceTechniques
> > (see sections Profiling, Deoptimization, Methods)
> >> Regards,
> >> Ionut
> > Rémi
> >  https://en.wikipedia.org/wiki/Inline_caching
> >  https://wiki.openjdk.java.net/display/HotSpot/VirtualCalls
More information about the hotspot-dev