RFR(S): 8143817: C1: Platform dependent stack space not preserved for all runtime calls
Roland Westrelin
roland.westrelin at oracle.com
Tue Dec 8 12:38:23 UTC 2015
Hi Martin,
> 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
I think this is good.
> 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”?
Why not remove the expected_arguments argument and assert(x->number_of_arguments() == 0, “”) ?
Roland.
>
> SPARC also uses out_preserve_stack_slots. Is this problem also relevant for SPARC?
>
> Best regards,
> Martin
More information about the hotspot-compiler-dev
mailing list