harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r539265 - in /harmony/enhanced/drlvm/trunk/vm: jitrino/src/jet/compiler.cpp jitrino/src/vm/drl/DrlJITInterface.cpp vmcore/src/jit/compile.cpp
Date Fri, 18 May 2007 05:45:39 GMT
Author: varlax
Date: Thu May 17 22:45:37 2007
New Revision: 539265

URL: http://svn.apache.org/viewvc?view=rev&rev=539265
Log:
Applied HARMONY-3370,HARMONY-3371,HARMONY-3728 [drlvm] known thread-unsafe operations markup

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlJITInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp?view=diff&rev=539265&r1=539264&r2=539265
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp Thu May 17 22:45:37 2007
@@ -41,6 +41,7 @@
 #include "compiler.h"
 #include "trace.h"
 #include "stats.h"
+#include "port_threadunsafe.h"
 
 #include <stack>
 using std::stack;
@@ -110,8 +111,14 @@
     assert(!method_is_native(method) && 
            "VM must not try to compile native method!");
     
+    UNSAFE_REGION_START
+    // Non-atomic increment of compiled method counter.
+    // May affect accuracy of JIT logging or a special debug mode 
+    // when a user specifies which range of methods accept/reject from compilation.
+    // Can't affect default JET execution mode.
     STATS_SET_NAME_FILER(NULL);
     m_methID = ++methodsSeen;
+    UNSAFE_REGION_END
     
     unsigned compile_flags = defaultFlags;
     initProfilingData(&compile_flags);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlJITInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlJITInterface.cpp?view=diff&rev=539265&r1=539264&r2=539265
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlJITInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlJITInterface.cpp Thu May 17 22:45:37
2007
@@ -45,6 +45,7 @@
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include "port_threadunsafe.h"
 
 #if !defined(_IPF_) // No .JET on IPF yet
     #define USE_FAST_PATH
@@ -248,7 +249,11 @@
     compilationInterface.setCompilationContext(&cs);
 
     static int method_seqnb = 0;
+    UNSAFE_REGION_START
+    // Non-atomic increment of compiled method counter,
+    // may affect accuracy of JIT logging but don't affect JIT functionality
     int current_nb = method_seqnb++;
+    UNSAFE_REGION_END
     MethodDesc* md = compilationInterface.getMethodToCompile();
     const char* methodTypeName = md->getParentType()->getName();
     const char* methodName = md->getName();

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp?view=diff&rev=539265&r1=539264&r2=539265
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp Thu May 17 22:45:37 2007
@@ -44,6 +44,7 @@
 
 #include "vm_stats.h"
 #include "dump.h"
+#include "port_threadunsafe.h"
 
 extern bool parallel_jit;
 
@@ -658,8 +659,11 @@
 
     TRACE("compile_do_compilation_jit(): returned from jit->compile_method_with_params()
for method " << method );
 
-    // Convertion from microseconds to milliseconds
+    UNSAFE_REGION_START
+    // Non-atomic increment of statistic counter
+    // Conversion from microseconds to milliseconds
     vm_env->total_compilation_time += ((apr_time_now() - start)/1000);
+    UNSAFE_REGION_END
 
     if (JIT_SUCCESS != res) {
         if (!parallel_jit) {



Mime
View raw message