for review (M): 6812831 factor megamorphic invokeinterface (for 6655638)
John Rose
John.Rose at Sun.COM
Fri Mar 6 11:35:53 PST 2009
On Mar 6, 2009, at 11:11 AM, Vladimir Kozlov wrote:
> 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);
You are right. Frankly, I don't remember how that diff got in there;
maybe just an excess of caution. I'll nuke it.
> 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);
My changes increased the size slightly, because I peeled the loop a
little bit for speed.
I found those numbers (like 28, 66) by running with PrintMisc. The
new print logic tells exactly how many instruction bytes are wasted.
I aimed at a slop of 4 bytes, so as not to overflow when really large
itable offsets are encountered. I'll note this in the comments before
I push!
Thanks,
-- John
More information about the hotspot-compiler-dev
mailing list