Request for reviews (S): 6827505: sizing logic for vtable and itable stubs needs self-check

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Tue Apr 7 16:42:16 PDT 2009


John Rose wrote:
> Here are some simple asserts and comments which should make it easier to 
> maintain the correct sizing of certain stubs:
>   http://cr.openjdk.java.net/~jrose/6827505/webrev.00/

Why the assert checks the room only for first 9 entries?:
"table_index > 10 ||"

Why you did not add +5 for sparc LP64 for slop?:

int slop = (2 LP64_ONLY(+5))*BytesPerInstWord;


For x64 (64-bit x86) the address could be unreachable,
so the slop should be large:

void MacroAssembler::jump(AddressLiteral dst) {
   if (reachable(dst)) {
     jmp_literal(dst.target(), dst.rspec());
   } else {
     lea(rscratch1, dst);
     jmp(rscratch1);
   }
}

Thanks,
Vladimir

> 
> This is a follow-up to my push regarding itable stubs, which changed the 
> sizing:
>   http://cr.openjdk.java.net/~jrose/6812831/webrev.01/
> 
> On retrospect, I wasn't satisfied with the robustness of the sizing 
> logic.  Clearly something more automatic could be done, but I'll leave 
> that for someone else to do.  Meanwhile, these comments and asserts are 
> safe and simple.
> 
> -- John



More information about the hotspot-compiler-dev mailing list