harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfur...@apache.org
Subject svn commit: r556943 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src: jet/cg.cpp jet/jet.cpp jet/rt.cpp shared/ControlFlowGraph.cpp shared/ControlFlowGraph.h shared/HashTable.h
Date Tue, 17 Jul 2007 15:12:14 GMT
Author: mfursov
Date: Tue Jul 17 08:12:13 2007
New Revision: 556943

URL: http://svn.apache.org/viewvc?view=rev&rev=556943
Log:
Cosmetic fixes (UNUSED markers) for
HARMONY-3855
HARMONY-4004
HARMONY-4047
HARMONY-4048

+ removal of deprecated parameter in ControlFlowGraph.cpp.


Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/ControlFlowGraph.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/ControlFlowGraph.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/HashTable.h

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp?view=diff&rev=556943&r1=556942&r2=556943
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp Tue Jul 17 08:12:13 2007
@@ -34,7 +34,7 @@
 #include <jit_runtime_support.h>
 #include <jit_intf.h>
 #include <jni_types.h>
-
+#include "port_threadunsafe.h"
 
 /**
  * @file
@@ -122,7 +122,9 @@
 {
     assert(obj.jt() == jobj);
     if (obj.has(VA_NZ)) {
+        UNSAFE_REGION_START
         STATS_INC(Stats::npesEliminated,1);
+        UNSAFE_REGION_END
         if (is_set(DBG_TRACE_CG)) {
             dbg(";;>check.npe for %s - skipped\n", 
                                             to_str(obj.as_opnd()).c_str());

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp?view=diff&rev=556943&r1=556942&r2=556943
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp Tue Jul 17 08:12:13 2007
@@ -630,14 +630,14 @@
 
 
 static TlsStore<TlsLogStreams> tlslogstreams;
-
+static Mutex logInfoLock;
 
 /*
     Because CompilationContext is a transient object (it created on start of compilation
     and destroyed on end of compilation for every method), LogStreams table cannot reside
     in it. Thread-local storage (TLS) is used to keep LogStreams.
     On the other hand, different Jits can run on the same thread, so several LogStreams
-    have to be keept for single thread.
+    have to be kept for single thread.
     To optimize access, pointer to LogStreams is cached in CompilationContext.
 
  */
@@ -654,7 +654,9 @@
     TlsLogStreams* sp = tlslogstreams.get();
     if (sp == 0)
     {   // new thread
+        logInfoLock.lock();
         ++thread_nb;
+        logInfoLock.unlock();
         sp = new TlsLogStreams();
         tlslogstreams.put(sp);
     }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp?view=diff&rev=556943&r1=556942&r2=556943
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp Tue Jul 17 08:12:13 2007
@@ -31,6 +31,8 @@
 #include "jit_import.h"
 #include "jit_intf.h"
 
+#include "port_threadunsafe.h"
+
 #if !defined(_IPF_)
 #include "enc_ia32.h"
 #endif
@@ -164,6 +166,7 @@
     // restore callee-save regs
     //
 #ifdef _DEBUG
+    UNSAFE_REGION_START
     // presumption: only GP registers can be callee-save
     static bool do_check = true;
     for (unsigned i=0; do_check && i<ar_num; i++) {
@@ -171,6 +174,7 @@
         assert(!is_callee_save(ar) || is_gr(ar));
     }
     do_check = false;
+    UNSAFE_REGION_END
 #endif
 
 #if defined(_EM64T_) || defined(_IPF_)

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/ControlFlowGraph.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/ControlFlowGraph.cpp?view=diff&rev=556943&r1=556942&r2=556943
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/ControlFlowGraph.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/ControlFlowGraph.cpp Tue Jul 17 08:12:13
2007
@@ -697,13 +697,13 @@
 }
 
 
-void ControlFlowGraph::spliceFlowGraphInline(CFGInst* instAfter, ControlFlowGraph& inlineFG,
bool keepDispatch) {
+void ControlFlowGraph::spliceFlowGraphInline(CFGInst* instAfter, ControlFlowGraph& inlineFG)
{
     Node* node = instAfter->getNode();
     Edge* edgeToInlined = NULL;
     if (node->getLastInst() == instAfter) {
         edgeToInlined =  node->getUnconditionalEdge();
     } else {//WARN: no label inst created -> possible problems if method is used in HLO
-        Node* newBlock = splitNodeAtInstruction(instAfter, true, keepDispatch, NULL);
+        Node* newBlock = splitNodeAtInstruction(instAfter, true, false, NULL);
         assert(newBlock->getInDegree() == 1);
         edgeToInlined = newBlock->getInEdges().front();
     }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/ControlFlowGraph.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/ControlFlowGraph.h?view=diff&rev=556943&r1=556942&r2=556943
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/ControlFlowGraph.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/ControlFlowGraph.h Tue Jul 17 08:12:13
2007
@@ -1467,12 +1467,8 @@
    *                           inlined after this instruction
    * @param[in] inlineFG     - the flow graph to inline. Must have valid unwind 
    *                           and return nodes
-   * @param[in] keepDispatch - indicates if both nodes after the splitting must  
-   *                           have the same dispatch as the initial node had.
-   *                           If <code>FALSE</code> the <code>Dispatch</code>
node 
-   *                           is moved to the node with a higher post-num.
    */
-    void spliceFlowGraphInline(CFGInst* instAfter, ControlFlowGraph& inlineFG, bool keepDispatch=true);
+    void spliceFlowGraphInline(CFGInst* instAfter, ControlFlowGraph& inlineFG);
     
   /** 
    * Inlines <code>inlineFG</code> info given CFG retargeting the edge to the


Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/HashTable.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/HashTable.h?view=diff&rev=556943&r1=556942&r2=556943
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/HashTable.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/HashTable.h Tue Jul 17 08:12:13 2007
@@ -27,6 +27,7 @@
 #include <assert.h>
 #include "Dlink.h"
 #include "MemoryManager.h"
+#include "port_threadunsafe.h"
 
 namespace Jitrino {
 
@@ -110,15 +111,21 @@
 protected:
     virtual HashTableLink* lookupEntry(void* key) const {
 #ifdef _DEBUG
+        UNSAFE_REGION_START
         ((HashTableImpl *)this)->numLookup++;
+        UNSAFE_REGION_END
 #endif
         for (HashTableLink* e = table[getTableIndex(key)]; e != NULL; e = e->next) {
 #ifdef _DEBUG
+            UNSAFE_REGION_START
             ((HashTableImpl *)this)->numLookupEntry++;
+            UNSAFE_REGION_END
 #endif
             if (equals(e->keyPtr,key)) {
 #ifdef _DEBUG
+                UNSAFE_REGION_START
                 ((HashTableImpl *)this)->numFound++;
+                UNSAFE_REGION_END
 #endif
                 return e;
             }



Mime
View raw message