RFR (XS): 8003268: SharedRuntime::generate_native_wrapper doesn't save all registers across runtime tracing calls for JNI critical native methods

Christian Thalinger christian.thalinger at oracle.com
Mon Jun 10 16:28:00 PDT 2013


http://cr.openjdk.java.net/~twisti/8003268

8003268: SharedRuntime::generate_native_wrapper doesn't save all registers across runtime tracing calls for JNI critical native methods
Reviewed-by:

SharedRuntime::generate_native_wrapper calculates c_arg as: 

  int c_arg = total_c_args - total_in_args;

which is then used for save_args/restore_args to save all already loaded arguments when calling out to the runtime. For JNI critical methods we add one additional argument to total_c_args for each array passed which means that c_arg is not zero and we skip the first argument(s) when saving them across runtime calls. 

There are two runtime calls in a native wrapper: SharedRuntime::dtrace_method_entry and SharedRuntime::rc_trace_method_entry 

The former is guarded by a SkipIfEqual and normally not executed. The latter is guarded by TraceRedefineClasses which is the reason why we crash. Using dtrace should also crash but I never tried.

src/cpu/x86/vm/sharedRuntime_x86_64.cpp



More information about the hotspot-compiler-dev mailing list