harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r510740 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp
Date Fri, 23 Feb 2007 01:01:27 GMT
Author: gshimansky
Date: Thu Feb 22 17:01:26 2007
New Revision: 510740

URL: http://svn.apache.org/viewvc?view=rev&rev=510740
Log:
Applied HARMONY-3227 [jvmti] significant performance degradation when turning-on jvmti on
linux em64t

Tests passed on SuSE9 and Gentoo x86_64


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp?view=diff&rev=510740&r1=510739&r2=510740
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp
Thu Feb 22 17:01:26 2007
@@ -41,33 +41,35 @@
 #include "dump.h"
 
 static LilCodeStub * rth_get_lil_monitor_enter_generic(LilCodeStub * cs) {
-if(!VM_Global_State::loader_env->TI->isEnabled()) {
-    return lil_parse_onto_end(cs,
-        "out platform:ref:g4;"
-        "o0 = l0;"
-        "call %0i;"
-        "jc r!=%1i,slow_path;"
-        "ret;"
-        ":slow_path;"
-        "push_m2n 0, 0;"
-        "out platform:ref:void;"
-        "o0 = l0;"
-        "call %2i;"
-        "pop_m2n;"
-        "ret;",
-        vm_monitor_try_enter,
-        TM_ERROR_NONE,
-        vm_monitor_enter);
-} else {
-    return lil_parse_onto_end(cs,
-        "push_m2n 0, 0;"
-        "out platform:ref:void;"
-        "o0 = l0;"
-        "call %0i;"
-        "pop_m2n;"
-        "ret;",
-        vm_monitor_enter);
-}
+    if(VM_Global_State::loader_env->TI->isEnabled() &&
+            VM_Global_State::loader_env->TI->get_global_capability(
+                            DebugUtilsTI::TI_GC_ENABLE_MONITOR_EVENTS) ) {
+        return lil_parse_onto_end(cs,
+            "push_m2n 0, 0;"
+            "out platform:ref:void;"
+            "o0 = l0;"
+            "call %0i;"
+            "pop_m2n;"
+            "ret;",
+            vm_monitor_enter);
+    } else {
+        return lil_parse_onto_end(cs,
+            "out platform:ref:g4;"
+            "o0 = l0;"
+            "call %0i;"
+            "jc r!=%1i,slow_path;"
+            "ret;"
+            ":slow_path;"
+            "push_m2n 0, 0;"
+            "out platform:ref:void;"
+            "o0 = l0;"
+            "call %2i;"
+            "pop_m2n;"
+            "ret;",
+            vm_monitor_try_enter,
+            TM_ERROR_NONE,
+            vm_monitor_enter);
+    }
 }
 
 NativeCodePtr rth_get_lil_monitor_enter_static() {    
@@ -185,30 +187,32 @@
 /*    MONITOR EXIT RUNTIME SUPPORT    */
 
 static LilCodeStub * rth_get_lil_monitor_exit_generic(LilCodeStub * cs) {
-if(!VM_Global_State::loader_env->TI->isEnabled()) {
-    return lil_parse_onto_end(cs,
-        "call %0i;"
-        "jc r!=%1i, illegal_monitor;"
-        "ret;"
-        ":illegal_monitor;"
-        "out managed::void;"
-        "call.noret %2i;",
-        vm_monitor_try_exit,
-        TM_ERROR_NONE,
-        lil_npc_to_fp(exn_get_rth_throw_illegal_monitor_state()));
-}else{
-    return lil_parse_onto_end(cs,
-        "locals 1;"
-        "l0 = o0;"
-        "push_m2n 0, %0i;"
-        "out platform:ref:void;"
-        "o0 = l0;"
-        "call %1i;"
-        "pop_m2n;"
-        "ret;",
-        FRAME_NON_UNWINDABLE,
-        vm_monitor_exit);
-}
+    if(VM_Global_State::loader_env->TI->isEnabled() &&
+            VM_Global_State::loader_env->TI->get_global_capability(
+                            DebugUtilsTI::TI_GC_ENABLE_MONITOR_EVENTS) ) {
+        return lil_parse_onto_end(cs,
+            "locals 1;"
+            "l0 = o0;"
+            "push_m2n 0, %0i;"
+            "out platform:ref:void;"
+            "o0 = l0;"
+            "call %1i;"
+            "pop_m2n;"
+            "ret;",
+            FRAME_NON_UNWINDABLE,
+            vm_monitor_exit);
+    } else {
+        return lil_parse_onto_end(cs,
+            "call %0i;"
+            "jc r!=%1i, illegal_monitor;"
+            "ret;"
+            ":illegal_monitor;"
+            "out managed::void;"
+            "call.noret %2i;",
+            vm_monitor_try_exit,
+            TM_ERROR_NONE,
+            lil_npc_to_fp(exn_get_rth_throw_illegal_monitor_state()));
+    }
 }
 
 NativeCodePtr rth_get_lil_monitor_exit_static() {    



Mime
View raw message