harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wjwashb...@apache.org
Subject svn commit: r467997 - in /incubator/harmony/enhanced/drlvm/trunk: build/make/components/vm/ vm/include/ vm/include/open/ vm/jitrino/src/codegenerator/ia32/ vm/jitrino/src/jet/ vm/jitrino/src/vm/ vm/jitrino/src/vm/drl/ vm/thread/src/ vm/vmcore/src/class...
Date Thu, 26 Oct 2006 13:25:01 GMT
Author: wjwashburn
Date: Thu Oct 26 06:24:58 2006
New Revision: 467997

URL: http://svn.apache.org/viewvc?view=rev&rev=467997
Log:
HARMONY-1942, back-branch polling TLS offset is incorrect.
Smoke tests pass on windowsxp and Linux w/ gcc 4.0.2


Modified:
    incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/jitrino.xml
    incubator/harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h
    incubator/harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h
    incubator/harmony/enhanced/drlvm/trunk/vm/include/open/hythread_ext.h
    incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/sconsts.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/sconsts.h
    incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h
    incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlVMInterface.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def
    incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp
    incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_tls.c
    incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_stats.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/nt_platform_utils.cpp

Modified: incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/jitrino.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/jitrino.xml?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/jitrino.xml (original)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/jitrino.xml Thu Oct 26
06:24:58 2006
@@ -26,7 +26,7 @@
 
 <project name="vm.jitrino">
     <target name="init">
-        <property name="build.depends" value="extra.apr,vm.vmcore,vm.encoder" />
+        <property name="build.depends" value="extra.apr,vm.vmcore,vm.encoder,vm.hythr"
/>
         <property name="outtype" value="shared" />
         <property name="libname" value="jitrino" />
 
@@ -134,7 +134,7 @@
             <select os="win">
                 <compilerarg value="/Fo${build.semi.dir}/vm/jitrino/_obj/" />
 
-                <defineset define="PLATFORM_NT,_WINDLL,_MBCS,_REENTRANT,__SMP__" />
+                <defineset define="PLATFORM_NT,_WINDLL,_MBCS,_REENTRANT,__SMP__,WIN32,_WIN32"
/>
 
                 <compilerarg value="/nologo" />
                 <compilerarg value="/EHsc" />
@@ -221,15 +221,11 @@
                       # thus causes problems during parralel build.
                     -->
                 </select>
-
-                <select arch="ia32">
-                    <defineset define="_WIN32_" />
-                </select>
             </select>
 
             <!-- linux specific -->
             <select os="lnx">
-                <defineset define="PLATFORM_POSIX" />
+                <defineset define="PLATFORM_POSIX,LINUX" />
 
                 <select cxx="gcc" arch="ia32,em64t">
                     <compilerarg value="-msse2" />
@@ -326,6 +322,8 @@
 
                 <libset libs="${vm.vmcore.lib}" dir="${vm.vmcore.libdir}" />
                 <libset libs="${vm.encoder.lib}" dir="${vm.encoder.libdir}" />
+                <libset libs="${vm.hythr.lib}" dir="${vm.hythr.libdir}" />
+
             </select>
 
             <select os="lnx">

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h Thu Oct 26 06:24:58 2006
@@ -305,11 +305,6 @@
                                                                   unsigned index);
 VMEXPORT const char  *const_pool_get_interface_method_descriptor(Class_Handle cl,
                                                                   unsigned index);
-
-VMEXPORT unsigned thread_get_suspend_request_offset();
-
-VMEXPORT unsigned thread_get_thread_state_flag_offset(); //temporary: for EscapeAnalysis
prototype
-
 VMEXPORT Compile_Handle jit_get_comp_handle(JIT_Handle j);
 
 // Needed for DLL problems

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h Thu Oct 26 06:24:58
2006
@@ -330,7 +330,7 @@
     // Return value: none.
     // Use this helper to notify GC about safe point in managed code
 
-    VM_RT_GC_GET_THREAD_SUSPEND_FLAG_PTR=602,
+    VM_RT_GC_GET_TLS_BASE=602,
     // Arguments: none
     // Return value: pointer to int-sized suspension request flag
     //

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/include/open/hythread_ext.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/include/open/hythread_ext.h?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/include/open/hythread_ext.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/include/open/hythread_ext.h Thu Oct 26 06:24:58
2006
@@ -176,6 +176,10 @@
 void* VMCALL hythread_get_private_data(hythread_t  t);
 IDATA VMCALL hythread_set_private_data(hythread_t  t, void* data);
 
+UDATA VMCALL hythread_tls_get_offset(hythread_tls_key_t key);
+UDATA VMCALL hythread_tls_get_suspend_request_offset();
+
+
 //@}
 /** @name Conditional variable
  */

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
(original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
Thu Oct 26 06:24:58 2006
@@ -272,19 +272,21 @@
          // TLS base can be obtained by calling get_thread_ptr()  (from vm_threads.h)
          Opnd * target=irManager.newImmOpnd( irManager.getTypeManager().getUnmanagedPtrType(irManager.getTypeManager().getIntPtrType()),
                                              Opnd::RuntimeInfo::Kind_HelperAddress,
-                                            (void*)CompilationInterface::Helper_GetSuspReqFlag
+                                            (void*)CompilationInterface::Helper_GetTLSBase
                                            );
-         bbpFlagAddrBlock->appendInst(irManager.newCallInst(target, &CallingConvention_STDCALL,
0, NULL, tlsBaseReg));
+         Opnd* tlsBase  = irManager.newOpnd(typeInt32);
+         bbpFlagAddrBlock->appendInst(irManager.newCallInst(target, &CallingConvention_STDCALL,
0, NULL, tlsBase));
 #else // PLATFORM_POSIX
         // TLS base can be obtained from [fs:0x14]
         Opnd* tlsBase = irManager.newMemOpnd(typeInt32, MemOpndKind_Any, NULL, 0x14, RegName_FS);
+#endif // PLATFORM_POSIX
+
         if (version == 4 || version == 6) {
             Opnd * offset = irManager.newImmOpnd(typeInt32, gcFlagOffsetOffset);
             bbpFlagAddrBlock->appendInst(irManager.newInstEx(Mnemonic_ADD, 1, tlsBaseReg,
tlsBase, offset));
         } else {
             bbpFlagAddrBlock->appendInst(irManager.newInst(Mnemonic_MOV, tlsBaseReg, tlsBase));
         }
-#endif // PLATFORM_POSIX
 
         // inserting bbpFlagAddrBlock before the given loopHeader
         uint32 startIndex = otherStartNdx[id];
@@ -362,16 +364,13 @@
     bbpBBController->appendInsts(dbgCall);
 #endif
 
-#ifdef PLATFORM_POSIX
-    Opnd* gcFlag = irManager.newMemOpnd(typeInt32, MemOpndKind_Any, tlsBaseReg, 0);
-#else
     Opnd* gcFlag = NULL;
     if (version == 4 || version == 6) {
         gcFlag = irManager.newMemOpnd(typeInt32, MemOpndKind_Any, tlsBaseReg, 0);
     } else {
         gcFlag = irManager.newMemOpnd(typeInt32, MemOpndKind_Any, tlsBaseReg, gcFlagOffsetOffset);
     }
-#endif
+
     Opnd* zero = irManager.newImmOpnd(typeInt32, 0);
     bbpBBController->appendInst(irManager.newInst(Mnemonic_CMP, gcFlag, zero));
     bbpBBController->appendInst(irManager.newBranchInst(Mnemonic_JNZ, bbpBBHelpCaller,
bbpReturn));

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp Thu Oct 26 06:24:58
2006
@@ -67,9 +67,9 @@
     //      test [eax+rt_suspend_req_flag_offset], 0
     // I don't believe this will gain any improvements for .jet, so using 
     // portable and 'official' way:
-    gen_call_vm(cs_v, rt_helper_get_thread_suspend_ptr, 0);
+    gen_call_vm(cs_v, rt_helper_get_tls_base_ptr, 0);
     // The address of flag is now in gr_ret
-    Opnd mem(i32, gr_ret, 0);
+    Opnd mem(i32, gr_ret, rt_suspend_req_flag_offset);
     alu(alu_cmp, mem, Opnd(0));
     unsigned br_off = br(z, 0, 0, taken);
     gen_call_vm_restore(false, cs_v, rt_helper_gc_safepoint, 0);

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp Thu Oct 26 06:24:58
2006
@@ -28,10 +28,12 @@
 #include <malloc.h>
 
 #include "open/vm.h"
+#include "open/hythread_ext.h"
 #include "jit_import.h"
 #include "jit_runtime_support.h"
 #include "jit_intf.h"
 
+
 #include "../shared/mkernel.h"
 //FIXME: needed for NOPs fix only, to be removed
 #include "enc_ia32.h"
@@ -1408,8 +1410,8 @@
 
     rt_helper_gc_safepoint = 
                 (char*)vm_get_rt_support_addr(VM_RT_GC_SAFE_POINT);
-    rt_helper_get_thread_suspend_ptr = 
-                (char*)vm_get_rt_support_addr(VM_RT_GC_GET_THREAD_SUSPEND_FLAG_PTR);
+    rt_helper_get_tls_base_ptr= 
+                (char*)vm_get_rt_support_addr(VM_RT_GC_GET_TLS_BASE);
     //
     rt_helper_ti_method_enter = 
             (char*)vm_get_rt_support_addr(VM_RT_JVMTI_METHOD_ENTER_CALLBACK);
@@ -1426,7 +1428,7 @@
     // Collect runtime constants
     //
     rt_array_length_offset = vector_length_offset();
-    rt_suspend_req_flag_offset = thread_get_suspend_request_offset();
+    rt_suspend_req_flag_offset = hythread_tls_get_suspend_request_offset();
     rt_vtable_offset = object_get_vtable_offset();
     
     Class_Handle clss;

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/sconsts.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/sconsts.cpp?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/sconsts.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/sconsts.cpp Thu Oct 26 06:24:58
2006
@@ -60,7 +60,7 @@
 
 
 char *  StaticConsts::rt_helper_gc_safepoint = NULL;
-char *  StaticConsts::rt_helper_get_thread_suspend_ptr = NULL;
+char *  StaticConsts::rt_helper_get_tls_base_ptr= NULL;
 
 unsigned StaticConsts::rt_array_length_offset = NOTHING;
 unsigned StaticConsts::rt_suspend_req_flag_offset = NOTHING;

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/sconsts.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/sconsts.h?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/sconsts.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/sconsts.h Thu Oct 26 06:24:58
2006
@@ -78,19 +78,19 @@
     static char*        rt_helper_gc_safepoint;
     /**
      * @brief An offset of 'thread suspend requiest' flag in TIB.
-     * @see rt_helper_get_thread_suspend_ptr
+     * @see rt_helper_get_tls_base_ptr
      * @see rt_helper_gc_safepoint
      * @todo seems unused after the recent ThreadManager changes.
      */
     static unsigned     rt_suspend_req_flag_offset;
     
     /**
-     * @brief Address of helper that returns a pointer to the thread 
-     *        suspension request flag.
+     * @brief Address of helper that returns a pointer to 
+        thread local struct.
      * @param none
      * @return read-only pointer to an int32 flag.
      */
-    static char*        rt_helper_get_thread_suspend_ptr;
+    static char*        rt_helper_get_tls_base_ptr;
 
     /**
      * @brief An offset of vtable in the object's header.

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h Thu Oct 26 06:24:58
2006
@@ -371,7 +371,7 @@
         Helper_ConvDtoI32,    // int32  x        = f(double x) 
         Helper_ConvDtoI64,    // int64  x        = f(double x) 
         Helper_EnableThreadSuspension,//           f()
-        Helper_GetSuspReqFlag,// int *           = f()
+        Helper_GetTLSBase,    // int *           = f()
         Helper_MethodEntry, // f(MethodHandle)
         Helper_MethodExit,   // f(MethodHandle, void* ret_value)
         Num_Helpers

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlVMInterface.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlVMInterface.cpp?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlVMInterface.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlVMInterface.cpp Thu Oct
26 06:24:58 2006
@@ -30,6 +30,7 @@
 #include "Log.h"
 #include "JITInstanceContext.h"
 #include "jit_intf.h"
+#include "open/hythread_ext.h"
 
 
 namespace Jitrino {
@@ -76,14 +77,22 @@
     return (size - sizeof(void *));     // skip the header
 }
 
+// TODO: move both methods below to the base VMInterface level
+// TODO: free TLS key on JIT deinitilization
 uint32
 flagTLSSuspendRequestOffset(){
-        return thread_get_suspend_request_offset();
+    return hythread_tls_get_suspend_request_offset();
 }
 
 uint32
 flagTLSThreadStateOffset() {
-    return thread_get_thread_state_flag_offset();
+    static hythread_tls_key_t key = 0;
+    static size_t offset = 0;
+    if (key == 0) {
+        hythread_tls_alloc(&key);
+        offset = hythread_tls_get_offset(key);
+    }
+    return offset;
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -559,7 +568,7 @@
     case Helper_DivideByZeroException: vmHelperId = VM_RT_DIVIDE_BY_ZERO_EXCEPTION; break;
     case Helper_Throw_LinkingException: vmHelperId = VM_RT_THROW_LINKING_EXCEPTION; break;
     case Helper_EnableThreadSuspension: vmHelperId = VM_RT_GC_SAFE_POINT; break;
-    case Helper_GetSuspReqFlag:        vmHelperId = VM_RT_GC_GET_THREAD_SUSPEND_FLAG_PTR;
break;
+    case Helper_GetTLSBase:            vmHelperId = VM_RT_GC_GET_TLS_BASE; break;
     case Helper_CharArrayCopy:         vmHelperId = VM_RT_CHAR_ARRAYCOPY_NO_EXC; break;
     case Helper_DivI32:                vmHelperId = VM_RT_IDIV; break;
     case Helper_DivU32:                assert(0); break;

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def Thu Oct 26 06:24:58 2006
@@ -36,6 +36,8 @@
 hythread_monitor_notify
 hythread_get_priority
 hythread_tls_get
+hythread_tls_get_suspend_request_offset
+hythread_tls_get_offset
 hythread_global_lock
 hythread_global_unlock
 hythread_attach_to_group

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp Thu Oct 26 06:24:58 2006
@@ -35,6 +35,8 @@
 hythread_monitor_notify;
 hythread_get_priority;
 hythread_tls_get;
+hythread_tls_get_suspend_request_offset;
+hythread_tls_get_offset;
 hythread_global_lock;
 hythread_global_unlock;
 hythread_attach_to_group;

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_tls.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_tls.c?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_tls.c (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_tls.c Thu Oct 26 06:24:58
2006
@@ -118,4 +118,20 @@
     return TM_ERROR_NONE;
 }
 
+/**
+ * Returns 'suspend_request' field offset in HyThread struct
+ */
+UDATA VMCALL hythread_tls_get_suspend_request_offset() {
+    return (UDATA)&((hythread_t)0)->suspend_request;
+}
+
+/**
+ * Return value's offset for the given key from the HyThread struct start.
+ */
+UDATA VMCALL hythread_tls_get_offset(hythread_tls_key_t key) {
+    assert(key < (UDATA)tm_tls_capacity);
+    return ((UDATA)&((hythread_t)0)->thread_local_storage) + (key * sizeof(void*));
+}
+
+
 //@}

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h Thu Oct 26 06:24:58
2006
@@ -176,11 +176,7 @@
      * Number of suspend requests made for this thread.
      */
     int32 suspend_request;
-    /**
-     * Field reserved for JIT proprietary needs.
-     */
-    int32 jit_private_data; 
-
+    
     /**
      * Flag indicating that thread can safely be suspended.
      */

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp Thu
Oct 26 06:24:58 2006
@@ -2665,18 +2665,6 @@
     return CC_Vm;
 } //vm_managed_calling_convention
 
-unsigned thread_get_suspend_request_offset() {
-    //FIXME: 
-    //return APR_OFFSETOF(VM_thread, suspend_request);
-    return 0;
-}
-
-
-    //temporary: for EscapeAnalysis prototype
-unsigned thread_get_thread_state_flag_offset() { 
-    return 0;//APR_OFFSETOF(hythread_t, state);
-}
-
 
 
 void vm_properties_set_value(const char* name, const char* value) 

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp Thu Oct
26 06:24:58 2006
@@ -1633,32 +1633,7 @@
     return addr;
 }
 
-static NativeCodePtr rth_get_lil_gc_thread_suspend_flag_ptr(int * dyn_count) {
-    /*static NativeCodePtr addr = NULL;
-    if (addr) {
-        return addr;
-    }
-
-    LilCodeStub* cs = lil_parse_code_stub("entry 0:managed::pint;");
-    assert(cs);
-    if (dyn_count) {
-        cs = lil_parse_onto_end(cs, "inc [%0i:pint];", dyn_count);
-        assert(cs);
-    }
-
-    cs = lil_parse_onto_end(cs,
-        "r=ts;"
-        "r=r+%0i:pint;"
-        "ret;",
-        thread_get_suspend_request_offset());
-    assert(cs && lil_is_valid(cs));
-    addr = LilCodeGenerator::get_platform()->compile(cs);
-
-    DUMP_STUB(addr, "rth_get_lil_gc_thread_suspend_flag_ptr", lil_cs_get_code_size(cs));
-
-    lil_free_code_stub(cs);
-    */
-    //assert(0);
+static NativeCodePtr rth_get_lil_tls_base(int * dyn_count) {
     return (NativeCodePtr)hythread_self;
 }
 
@@ -1967,8 +1942,8 @@
         return rth_get_lil_initialize_class(dyn_count);
     case VM_RT_GC_SAFE_POINT:
         return rth_get_lil_gc_safe_point(dyn_count);
-    case VM_RT_GC_GET_THREAD_SUSPEND_FLAG_PTR:
-        return rth_get_lil_gc_thread_suspend_flag_ptr(dyn_count);
+    case VM_RT_GC_GET_TLS_BASE:
+        return rth_get_lil_tls_base(dyn_count);
     // JVMTI
     case VM_RT_JVMTI_METHOD_ENTER_CALLBACK:
         return rth_get_lil_jvmti_method_enter_callback(dyn_count);

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_stats.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_stats.cpp?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_stats.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_stats.cpp Thu Oct 26 06:24:58
2006
@@ -78,7 +78,7 @@
 
     {VM_RT_GC_HEAP_WRITE_REF,                  "VM_RT_GC_HEAP_WRITE_REF",               
  3},
     {VM_RT_GC_SAFE_POINT,                      "VM_RT_GC_SAFE_POINT",                   
  0},
-    {VM_RT_GC_GET_THREAD_SUSPEND_FLAG_PTR,     "VM_RT_GC_GET_THREAD_SUSPEND_FLAG_PTR",  
  0},
+    {VM_RT_GC_GET_TLS_BASE,                    "VM_RT_GET_TLS_BASE",                    
  0},
 
     {VM_RT_JVMTI_METHOD_ENTER_CALLBACK,        "VM_RT_JVMTI_METHOD_ENTER_CALLBACK",     
  1},
     {VM_RT_JVMTI_METHOD_EXIT_CALLBACK,         "VM_RT_JVMTI_METHOD_EXIT_CALLBACK",      
  2},

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/nt_platform_utils.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/nt_platform_utils.cpp?view=diff&rev=467997&r1=467996&r2=467997
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/nt_platform_utils.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/nt_platform_utils.cpp Thu
Oct 26 06:24:58 2006
@@ -22,7 +22,6 @@
 
 #define LOG_DOMAIN "port.old"
 #include "cxxlog.h"
-
 #include "platform_lowlevel.h"
 
 #include <stdlib.h>



Mime
View raw message