changeset 1988:c53baab9d988

6988018: dtrace/hotspot/MethodInvocation/MethodInvocation002 crashes with client compiler Reviewed-by: iveresov, kvn, kamg
author never
date Tue, 05 Oct 2010 11:16:12 -0700
parents 243e95e6a37d
children 61e2d45faa7f
files src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Wed Sep 08 20:28:57 2010 -0700
+++ b/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Tue Oct 05 11:16:12 2010 -0700
@@ -420,7 +420,8 @@
   }
 
   if (compilation()->env()->dtrace_method_probes()) {
-    jobject2reg(method()->constant_encoding(), O0);
+    __ mov(G2_thread, O0);
+    jobject2reg(method()->constant_encoding(), O1);
     __ call(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), relocInfo::runtime_call_type);
     __ delayed()->nop();
   }
--- a/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Wed Sep 08 20:28:57 2010 -0700
+++ b/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Tue Oct 05 11:16:12 2010 -0700
@@ -488,7 +488,9 @@
   }
 
   if (compilation()->env()->dtrace_method_probes()) {
-    __ movoop(Address(rsp, 0), method()->constant_encoding());
+    __ get_thread(rax);
+    __ movptr(Address(rsp, 0), rax);
+    __ movoop(Address(rsp, sizeof(void*)), method()->constant_encoding());
     __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit)));
   }