harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r486439 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_lock_rt_support_ia32.cpp
Date Wed, 13 Dec 2006 00:55:09 GMT
Author: gshimansky
Date: Tue Dec 12 16:55:09 2006
New Revision: 486439

URL: http://svn.apache.org/viewvc?view=rev&rev=486439
Log:
Applied HARMONY-2440 [drlvm][jvmti] Disable monitor_exit fast path only on can_generate_monitor_events
capability

Tests passed on Ubuntu6 x86, windows XP and SuSE9 x86_64


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_lock_rt_support_ia32.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_lock_rt_support_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_lock_rt_support_ia32.cpp?view=diff&rev=486439&r1=486438&r2=486439
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_lock_rt_support_ia32.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_lock_rt_support_ia32.cpp
Tue Dec 12 16:55:09 2006
@@ -191,20 +191,21 @@
     ss = test(ss,  ecx_opnd,   ecx_opnd);
     ss = branch8(ss, Condition_Z,  Imm_Opnd(size_8, 0));
     char *backpatch_address__null_pointer = ((char *)ss) - 1;
-// skip fast path if ti is enabled
-// so all TI events will be generated
-if(!VM_Global_State::loader_env->TI->isEnabled()) {
-    ss = alu(ss, add_opc, ecx_opnd, Imm_Opnd(header_offset));
-    ss = gen_monitor_exit_helper(ss, ecx_opnd);
-} else {
-    ss = gen_setup_j2n_frame(ss);
-    ss = push(ss,  M_Base_Opnd(esp_reg, m2n_sizeof_m2n_frame));
+    // skip fast path if can_generate_monitor_events capability
+    // was requested, so all TI events will be generated
+    if (!VM_Global_State::loader_env->TI->get_global_capability(
+                DebugUtilsTI::TI_GC_ENABLE_MONITOR_EVENTS)) {
+        ss = alu(ss, add_opc, ecx_opnd, Imm_Opnd(header_offset));
+        ss = gen_monitor_exit_helper(ss, ecx_opnd);
+    } else {
+        ss = gen_setup_j2n_frame(ss);
+        ss = push(ss,  M_Base_Opnd(esp_reg, m2n_sizeof_m2n_frame));
 
-    ss = call(ss, (char *)oh_convert_to_local_handle);
-    ss = alu(ss, add_opc, esp_opnd, Imm_Opnd(4)); // pop parameters
-    ss = gen_monitorexit_slow_path_helper(ss, eax_opnd);
-    ss = gen_pop_j2n_frame(ss);
-}
+        ss = call(ss, (char *)oh_convert_to_local_handle);
+        ss = alu(ss, add_opc, esp_opnd, Imm_Opnd(4)); // pop parameters
+        ss = gen_monitorexit_slow_path_helper(ss, eax_opnd);
+        ss = gen_pop_j2n_frame(ss);
+    }
     ss = test(ss,  eax_opnd,   eax_opnd);
     ss = branch8(ss, Condition_NZ,  Imm_Opnd(size_8, 0));
     char *backpatch_address__fast_monitor_failed = ((char *)ss) - 1;



Mime
View raw message