RFR(S): 8143817: C1: Platform dependent stack space not preserved for all runtime calls
martin.doerr at sap.com
Mon Nov 30 14:22:20 UTC 2015
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:
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-compiler-dev