RFR(S): 8143817: C1: Platform dependent stack space not preserved for all runtime calls

Doerr, Martin martin.doerr at sap.com
Mon Nov 30 14:22:20 UTC 2015


Hi,

Runtime calls usually use the c_calling_convention to compute the layout of the stack frames.

Currently, C1 does not use c_calling_convention for runtime calls without arguments, e.g. for calling os::javaTimeNanos. Hence, the platform dependent out_preserve_stack_slots is not accounted for.
A possible way to fix this is implemented in this webrev:
http://cr.openjdk.java.net/~mdoerr/8143817_c1_runtime_call/webrev.00

These ones are the 3 callers of the respective function which don't call c_calling_convention:
    do_RuntimeCall(CAST_FROM_FN_PTR(address, TRACE_TIME_METHOD), 0, x);
    do_RuntimeCall(CAST_FROM_FN_PTR(address, os::javaTimeMillis), 0, x);
    do_RuntimeCall(CAST_FROM_FN_PTR(address, os::javaTimeNanos), 0, x);

I think it would be more error prone to call it in all of them. The parameter "expected_arguments" is always 0.
Would it be better to assert "expected_arguments == 0"?

SPARC also uses out_preserve_stack_slots. Is this problem also relevant for SPARC?

Best regards,
  Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20151130/2dc96df8/attachment.html>


More information about the hotspot-compiler-dev mailing list