[vmkit-commits] [vmkit] r121145 - in /vmkit/branches/multi-vm: find-it.sh include/mvm/Threads/Thread.h lib/J3/Makefile lib/Mvm/CommonThread/CollectionRV.cpp lib/Mvm/Compiler/JIT.cpp lib/Mvm/Compiler/mvm-runtime.ll tools/j3/Makefile tools/vmkit/Makefile

Gael Thomas gael.thomas at lip6.fr
Tue Dec 7 08:19:52 PST 2010


Author: gthomas
Date: Tue Dec  7 10:19:52 2010
New Revision: 121145

URL: http://llvm.org/viewvc/llvm-project?rev=121145&view=rev
Log:
remove IsolateID from the thread

Modified:
    vmkit/branches/multi-vm/find-it.sh
    vmkit/branches/multi-vm/include/mvm/Threads/Thread.h
    vmkit/branches/multi-vm/lib/J3/Makefile
    vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp
    vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp
    vmkit/branches/multi-vm/lib/Mvm/Compiler/mvm-runtime.ll
    vmkit/branches/multi-vm/tools/j3/Makefile
    vmkit/branches/multi-vm/tools/vmkit/Makefile

Modified: vmkit/branches/multi-vm/find-it.sh
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/find-it.sh?rev=121145&r1=121144&r2=121145&view=diff
==============================================================================
--- vmkit/branches/multi-vm/find-it.sh (original)
+++ vmkit/branches/multi-vm/find-it.sh Tue Dec  7 10:19:52 2010
@@ -6,6 +6,6 @@
 
 else
 
-		grep --exclude-dir IJvm --exclude-dir Isolate --exclude *.txt --exclude-dir autoconf --exclude config.status --exclude config.log --exclude configure --exclude *.xml --exclude *.html --exclude *.jar --exclude *.bc --exclude MMTkInline.inc --exclude-dir patches --exclude-dir N3 --exclude *.java --exclude *.class -R --exclude-dir .svn --exclude-dir Release --exclude *.s "$1" .
+		grep --exclude find-it.sh --exclude-dir IJvm --exclude-dir Isolate --exclude *.txt --exclude-dir autoconf --exclude config.status --exclude config.log --exclude configure --exclude *.xml --exclude *.html --exclude *.jar --exclude *.bc --exclude MMTkInline.inc --exclude-dir patches --exclude-dir N3 --exclude *.java --exclude *.class -R --exclude-dir .svn --exclude-dir Release --exclude *.s "$1" .
 
 fi
\ No newline at end of file

Modified: vmkit/branches/multi-vm/include/mvm/Threads/Thread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/Threads/Thread.h?rev=121145&r1=121144&r2=121145&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/Threads/Thread.h (original)
+++ vmkit/branches/multi-vm/include/mvm/Threads/Thread.h Tue Dec  7 10:19:52 2010
@@ -158,58 +158,55 @@
 // WARNING: if you modify this class, you must also change mvm-runtime.ll
 class Thread : public CircularBase<Thread> {
 public:
-  /// IsolateID - The Isolate ID of the thread's VM.
-  size_t IsolateID;                                      // 1
+  /// doYield - Flag to tell the thread to yield for GC reasons.
+  bool doYield;                                          // 1 - intrinsic
+
+#ifdef RUNTIME_DWARF_EXCEPTIONS
+  void* internalPendingException;
+#else
+  /// lastExceptionBuffer - The last exception buffer on this thread's stack.
+  ExceptionBuffer* lastExceptionBuffer;                  // 2 - intrinsic
+#endif
+
+  /// vmData - vm specific data - notice that vmkit do not consider that this field has a value
+	VMThreadData* vmData;                                  // 3 - intrinsic
+
+  /// pendingException - the pending exception
+	gc* pendingException;                                  // 4 - intrinsic
+  
+	/// vmkit - a (shortcut) pointer to vmkit that contains information on all the vms
+	mvm::VMKit* vmkit;                                     // 5
 
   /// MyVM - The VM attached to this Thread.
-  VirtualMachine* MyVM;                                  // 2
+  VirtualMachine* MyVM;                                  // 6
 
   /// baseSP - The base stack pointer.
-  void* baseSP;                                          // 3
- 
-  /// doYield - Flag to tell the thread to yield for GC reasons.
-  bool doYield;                                          // 4
+  void* baseSP;                                          // 7
 
   /// inRV - Flag to tell that the thread is being part of a rendezvous.
-  bool inRV;                                             // 5
+  bool inRV;                                             // 8
 
   /// joinedRV - Flag to tell that the thread has joined a rendezvous.
-  bool joinedRV;                                         // 6
+  bool joinedRV;                                         // 9
 
 private:
   /// lastSP - If the thread is running native code that can not be
   /// interrupted, lastSP is not null and contains the value of the
   /// stack pointer before entering native.
-  void* lastSP;                                          // 7
+  void* lastSP;                                          // 10
  
   /// internalThreadID - The implementation specific thread id.
-  void* internalThreadID;                                // 8
+  void* internalThreadID;                                // 11
 
 public:
   /// routine - The function to invoke when the thread starts.
-  void (*routine)(mvm::Thread*);                         // 9
+  void (*routine)(mvm::Thread*);                         // 12
 
   /// lastKnownFrame - The last frame that we know of, before resuming to JNI.
-  KnownFrame* lastKnownFrame;                            // 10
-  
-#ifdef RUNTIME_DWARF_EXCEPTIONS
-  void* internalPendingException;
-#else
-  /// lastExceptionBuffer - The last exception buffer on this thread's stack.
-  ExceptionBuffer* lastExceptionBuffer;                  // 11
-#endif
-
-  /// vmData - vm specific data
-	VMThreadData* vmData;                                  // 12
-
-  /// pendingException - the pending exception
-	gc* pendingException;                                  // 13
-
-	/// vmkit - a (shortcut) pointer to vmkit that contains information on all the vms
-	mvm::VMKit* vmkit;                                     // 14
+  KnownFrame* lastKnownFrame;                            // 13
 
   /// allVmsData - the array of thread specific data.
-	VMThreadData** allVmsData;                             // 15
+	VMThreadData** allVmsData;                             // 14
 
 
 protected:

Modified: vmkit/branches/multi-vm/lib/J3/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Makefile?rev=121145&r1=121144&r2=121145&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Makefile (original)
+++ vmkit/branches/multi-vm/lib/J3/Makefile Tue Dec  7 10:19:52 2010
@@ -11,12 +11,5 @@
 DIRS = LLVMRuntime VMCore Classpath Compiler
 
 include $(LEVEL)/Makefile.config
-
-ifeq ($(ISOLATE_SHARING_BUILD), 1) 
-    DIRS += Isolate
-endif
-
-
-
 include $(LEVEL)/Makefile.common
 

Modified: vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp?rev=121145&r1=121144&r2=121145&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp Tue Dec  7 10:19:52 2010
@@ -199,7 +199,7 @@
     cur->joinedRV = false;
   }
 	
-  assert(nbJoined == initiator->MyVM->NumberOfThreads && "Inconsistent state");
+  assert(nbJoined == initiator->vmkit->NumberOfThreads && "Inconsistent state");
   nbJoined = 0;
   condEndRV.broadcast();
   unlockRV();

Modified: vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp?rev=121145&r1=121144&r2=121145&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp Tue Dec  7 10:19:52 2010
@@ -326,10 +326,10 @@
   VTType            = PointerType::getUnqual(module->getTypeByName("VT"));
   MutatorThreadType = PointerType::getUnqual(module->getTypeByName("MutatorThread"));
 
-  OffsetDoYieldInThreadConstant =           ConstantInt::get(Type::getInt32Ty(Context), 4);
-  OffsetCXXExceptionInThreadConstant =      ConstantInt::get(Type::getInt32Ty(Context), 11);
-  OffsetVMDataInThreadConstant =            ConstantInt::get(Type::getInt32Ty(Context), 12);
-  OffsetPendingExceptionInThreadConstant =  ConstantInt::get(Type::getInt32Ty(Context), 13);
+  OffsetDoYieldInThreadConstant =           ConstantInt::get(Type::getInt32Ty(Context), 1);
+  OffsetCXXExceptionInThreadConstant =      ConstantInt::get(Type::getInt32Ty(Context), 2);
+  OffsetVMDataInThreadConstant =            ConstantInt::get(Type::getInt32Ty(Context), 3);
+  OffsetPendingExceptionInThreadConstant =  ConstantInt::get(Type::getInt32Ty(Context), 4);
 
 	OffsetThreadInMutatorThreadConstant =     ConstantInt::get(Type::getInt32Ty(Context), 0);
 }

Modified: vmkit/branches/multi-vm/lib/Mvm/Compiler/mvm-runtime.ll
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Compiler/mvm-runtime.ll?rev=121145&r1=121144&r2=121145&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Compiler/mvm-runtime.ll (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Compiler/mvm-runtime.ll Tue Dec  7 10:19:52 2010
@@ -8,22 +8,21 @@
 %CircularBase = type { %VT*, %CircularBase*, %CircularBase* }
 
 ;;; Field 0:  the parent (circular base)
-;;; Field 1:  size_t IsolateID
-;;; Field 2:  void*  MyVM
-;;; Field 3:  void*  baseSP
-;;; Field 4:  char   doYield
-;;; Field 5:  char   inRV
-;;; Field 6:  char   joinedRV
-;;; Field 7:  void*  lastSP
-;;; Field 8:  void*  internalThreadID
-;;; field 9:  void*  routine
-;;; field 10: void*  lastKnownFrame
-;;; field 11: void*  lastExceptionBuffer
-;;; field 12: void*  vmData
-;;; field 13: gc*    pendingException
-;;; field 14: VMkit* vmkit
-;;; field 15: void*  allVMDatas
-%Thread       = type { %CircularBase, i32, i8*, i8*, i1, i1, i1, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
+;;; Field 1:  bool   doYield
+;;; field 2:  void*  lastExceptionBuffer/internalPendingException
+;;; field 3:  void*  vmData
+;;; field 4:  gc*    pendingException
+;;; field 5:  VMkit* vmkit
+;;; Field 6:  void*  MyVM
+;;; Field 7:  void*  baseSP
+;;; Field 8:  bool   inRV
+;;; Field 9:  bool   joinedRV
+;;; Field 10: void*  lastSP
+;;; Field 11: void*  internalThreadID
+;;; field 12: void*  routine
+;;; field 13: void*  lastKnownFrame
+;;; field 14: void*  allVMDatas
+%Thread       = type { %CircularBase, i1, i8*, i8*, i8*, i8*, i8*, i8*, i1, i1, i8*, i8*, i8*, i8*, i8* }
 
 ;;; field 0: VT
 ;;; field 1: mvm::MutatorThread*  mut

Modified: vmkit/branches/multi-vm/tools/j3/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/tools/j3/Makefile?rev=121145&r1=121144&r2=121145&view=diff
==============================================================================
--- vmkit/branches/multi-vm/tools/j3/Makefile (original)
+++ vmkit/branches/multi-vm/tools/j3/Makefile Tue Dec  7 10:19:52 2010
@@ -24,10 +24,6 @@
     USEDMODULES += $(GCLIB).bc
   endif
 
-  ifeq ($(ISOLATE_SHARING_BUILD), 1) 
-    USEDMODULES += Isolate.bc
-  endif
-
   BUILT_SOURCES = j3.s
   SOURCES = j3.s $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp))
 
@@ -36,10 +32,6 @@
 USEDLIBS = J3.a Classpath.a J3.a J3Compiler.a Allocator.a \
 	   Mvm.a MvmCompiler.a $(GCLIB).a Allocator.a CommonThread.a
 
-  ifeq ($(ISOLATE_SHARING_BUILD), 1) 
-    USEDLIBS += Isolate
-  endif
-
 endif
 
 LINK_COMPONENTS = jit nativecodegen scalaropts instrumentation ipa ipo bitreader asmparser linker

Modified: vmkit/branches/multi-vm/tools/vmkit/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/tools/vmkit/Makefile?rev=121145&r1=121144&r2=121145&view=diff
==============================================================================
--- vmkit/branches/multi-vm/tools/vmkit/Makefile (original)
+++ vmkit/branches/multi-vm/tools/vmkit/Makefile Tue Dec  7 10:19:52 2010
@@ -21,10 +21,6 @@
     USEDMODULES += J3.bc Classpath.bc J3Compiler.bc
   endif
 
-  ifeq ($(ISOLATE_SHARING_BUILD), 1) 
-    USEDMODULES += Isolate.bc
-  endif
-
   ifeq ($(WITH_N3_PNETLIB), 1)
     USEDMODULES += N3.bc PNetLib.bc
   endif
@@ -42,21 +38,17 @@
 
 
 else
-  
+
   USEDLIBS += Allocator.a Mvm.a MvmCompiler.a $(GCLIB).a CommonThread.a
 
   ifeq ($(WITH_J3), 1)
     USEDLIBS += J3.a Classpath.a J3.a J3Compiler.a
   endif
 
-  ifeq ($(ISOLATE_SHARING_BUILD), 1) 
-    USEDLIBS += Isolate.a
-  endif
-
   ifeq ($(WITH_N3_PNETLIB), 1)
     USEDLIBS += N3.a PNetLib.a
   endif
-  
+
   USEDLIBS += Allocator.a Mvm.a MvmCompiler.a $(GCLIB).a CommonThread.a
 
 endif





More information about the vmkit-commits mailing list