for review (M): 6812831 factor megamorphic invokeinterface (for 6655638)

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Fri Mar 6 11:11:58 PST 2009


vtableStubs_sparc.cpp:
Why you changed 2* to 6* for CompressedOops? There is only 1 load_klass
and with CompressedOops it need only 2 additional instructions (shift;add)
to decode it.

-      // save, ld, ld, sll, and, add, add, ld, cmp, br, add, ld, add, ld, ld, jmp, restore, sethi, 
jmpl, restore
-      const int basic = (20 LP64_ONLY(+ 6)) * BytesPerInstWord +
-                        // shift;add for load_klass
-                        (UseCompressedOops ? 2*BytesPerInstWord : 0);
+      const int basic = (28 LP64_ONLY(+ 6)) * BytesPerInstWord +
+                        // shift;add for load_klass, decode, and encode
+                        (UseCompressedOops ? 6*BytesPerInstWord : 0);


vtableStubs_x86_32.cpp:
Did your changes increase the size or it was wrong before?
Or it is upper/rounded limit on the size?

-    return (DebugVtables ? 144 : 64) + (CountCompiledCalls ? 6 : 0);
+    return (DebugVtables ? 256 : 66) + (CountCompiledCalls ? 6 : 0);

Otherwise looks good.

Vladimir

John Rose wrote:
> In response to a review request (thanks, Vladimir!) I've split the 
> refactoring of the itable lookup logic into a separate change request.
> 
> Here it is; please (re-)review:
>  http://cr.openjdk.java.net/~jrose/6812831/webrev
> 
> It is a little different from the corresponding changes in the mega-review.
> I cleaned it up slightly, so that the interface search loop is tighter.  
> (Should fit on an I$ line now.)
> I also make it work on x86 (32 and 64) and SPARC.
> 
> -- John



More information about the hotspot-compiler-dev mailing list