[vmkit-commits] [vmkit] r180448 - Patch from SVN repository.

Peter Senna Tschudin peter.senna at gmail.com
Thu Apr 25 10:12:17 PDT 2013


Author: peter.senna
Date: Thu Apr 25 12:10:37 2013
New Revision: 180448

URL: http://llvm.org/viewvc/llvm-project?rev=180448&view=rev
Log:
Patch from SVN repository.
throwFromJni does not need to end known frame and enter uncooperative code. The following RETURN_FROM_JNI will do it.
Bugfix when a non-customized version was becoming a customized one. If the LLVMInfo does not know if the method is customizable, don't try to customize it.
(cherry picked from commit ca5692f3313466942d81c11e8eb3b7b26a900921)

Modified:
    vmkit/trunk/.gitignore
    vmkit/trunk/lib/j3/Compiler/JavaLLVMCompiler.cpp
    vmkit/trunk/lib/j3/Compiler/LLVMInfo.cpp
    vmkit/trunk/lib/j3/VMCore/JavaThread.h
    vmkit/trunk/lib/j3/VMCore/Jni.cpp

Modified: vmkit/trunk/.gitignore
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/.gitignore?rev=180448&r1=180447&r2=180448&view=diff
==============================================================================
--- vmkit/trunk/.gitignore (original)
+++ vmkit/trunk/.gitignore Thu Apr 25 12:10:37 2013
@@ -3,17 +3,36 @@ Debug*
 Unoptimized*
 
 Makefile.common
+Makefile.config
+Makefile.llvmbuild
 tools/llcj/LinkPaths.h
+tools/j3/FrametablesExterns.inc
+tools/j3/FrametablesSymbols.inc
+tools/llvm-config/
+tools/precompiler/FrametablesExterns.inc
+tools/precompiler/FrametablesSymbols.inc
+tools/precompiler/trainer/
+
 lib/j3/LLVMRuntime/LLVMRuntime.inc
 lib/vmkit/Compiler/LLVMRuntime.inc
 lib/j3/ClassLib/Classpath.h
 include/vmkit/config.h
 mmtk/java/src/org/j3/config/Selected.java
 mmtk/java/build.xml
+mmtk/inline/MMTkArrayWriteInline.inc
+mmtk/inline/MMTkFieldWriteInline.inc
+mmtk/inline/MMTkNonHeapWriteInline.inc
+mmtk/inline/MMTkVMKitMallocInline.inc
+mmtk/inline/MMTkVTMallocInline.inc
 
 mmtk/java/classes/
+mmtk/java/bin/
+mmtk/java/mmtk-vmkit-optimized.bc
+mmtk/java/mmtk-vmkit.bc
+
 
 config.log
+configure.out
 config.status
 
 tests/logs.zip

Modified: vmkit/trunk/lib/j3/Compiler/JavaLLVMCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/Compiler/JavaLLVMCompiler.cpp?rev=180448&r1=180447&r2=180448&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/Compiler/JavaLLVMCompiler.cpp (original)
+++ vmkit/trunk/lib/j3/Compiler/JavaLLVMCompiler.cpp Thu Apr 25 12:10:37 2013
@@ -61,7 +61,7 @@ Function* JavaLLVMCompiler::parseFunctio
   // We are jitting. Take the lock.
   vmkit::VmkitModule::protectIR();
   if (func->getLinkage() == GlobalValue::ExternalWeakLinkage) {
-    JavaJIT jit(this, meth, func, customizeFor);
+    JavaJIT jit(this, meth, func, LMI->isCustomizable? customizeFor : NULL);
     if (isNative(meth->access)) {
       jit.nativeCompile();
       vmkit::VmkitModule::runPasses(func, JavaNativeFunctionPasses);
@@ -75,11 +75,9 @@ Function* JavaLLVMCompiler::parseFunctio
     if (!LMI->isCustomizable && jit.isCustomizable) {
       // It's the first time we parsed the method and we just found
       // out it can be customized.
+    	// TODO(geoffray): return a customized version to this caller.
       meth->isCustomizable = true;
       LMI->isCustomizable = true;
-      if (customizeFor != NULL) {
-        LMI->setCustomizedVersion(customizeFor, func);
-      }
     }
   }
   vmkit::VmkitModule::unprotectIR();

Modified: vmkit/trunk/lib/j3/Compiler/LLVMInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/Compiler/LLVMInfo.cpp?rev=180448&r1=180447&r2=180448&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/Compiler/LLVMInfo.cpp (original)
+++ vmkit/trunk/lib/j3/Compiler/LLVMInfo.cpp Thu Apr 25 12:10:37 2013
@@ -209,17 +209,6 @@ Function* LLVMMethodInfo::getMethod(Clas
   return result;
 }
 
-void LLVMMethodInfo::setCustomizedVersion(Class* cl, llvm::Function* F) {
-  assert(customizedVersions.size() == 0);
-  vmkit::ThreadAllocator allocator;
-  if (Compiler->emitFunctionName()) {
-    char* buf = GetMethodName(allocator, methodDef, cl);
-    F->setName(buf);
-  }
-  methodFunction = NULL;
-  customizedVersions[cl] = F;
-}
-
 FunctionType* LLVMMethodInfo::getFunctionType() {
   if (!functionType) {
     Signdef* sign = methodDef->getSignature();

Modified: vmkit/trunk/lib/j3/VMCore/JavaThread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JavaThread.h?rev=180448&r1=180447&r2=180448&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JavaThread.h (original)
+++ vmkit/trunk/lib/j3/VMCore/JavaThread.h Thu Apr 25 12:10:37 2013
@@ -158,8 +158,7 @@ public:
   /// throwFromJNI - Throw an exception after executing JNI code.
   ///
   void throwFromJNI(word_t SP) {
-    endKnownFrame();
-    enterUncooperativeCode(SP);
+  	// Nothing to do. The RETURN_FROM_JNI will take care of it.
   }
   
   /// throwFromNative - Throw an exception after executing Native code.

Modified: vmkit/trunk/lib/j3/VMCore/Jni.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/Jni.cpp?rev=180448&r1=180447&r2=180448&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/Jni.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/Jni.cpp Thu Apr 25 12:10:37 2013
@@ -480,7 +480,7 @@ jboolean IsInstanceOf(JNIEnv *env, jobje
 
   END_JNI_EXCEPTION
 
-  return JNI_FALSE;
+  RETURN_FROM_JNI(0);
 }
 
 





More information about the vmkit-commits mailing list