harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r649371 - in /harmony/enhanced/drlvm/trunk/vm/thread/src: thread_native_basic.c thread_native_fat_monitor.c thread_native_iterator.c thread_native_suspend.c thread_native_thin_monitor.c thread_private.h
Date Fri, 18 Apr 2008 05:26:09 GMT
Author: varlax
Date: Thu Apr 17 22:25:58 2008
New Revision: 649371

URL: http://svn.apache.org/viewvc?rev=649371&view=rev
Log:
Applied HARMONY-5734  [thread][logger] updated thread logging to use different names for thread
macros

Modified:
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_basic.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_iterator.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_suspend.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_basic.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_basic.c?rev=649371&r1=649370&r2=649371&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_basic.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_basic.c Thu Apr 17 22:25:58 2008
@@ -24,7 +24,6 @@
  * @brief hythread basic functions
  */
 
-#undef LOG_DOMAIN
 #define LOG_DOMAIN "tm.native"
 
 #ifdef PLATFORM_POSIX
@@ -184,7 +183,7 @@
     }
     assert(new_thread->os_handle);
 
-    TRACE(("TM: native attached: native: %p ", new_thread));
+    CTRACE(("TM: native attached: native: %p ", new_thread));
 
     status = hythread_set_to_group(new_thread,
         (group == NULL ? TM_DEFAULT_GROUP : group));
@@ -754,7 +753,7 @@
     thread = start_proc_data.thread;
     start_proc = start_proc_data.proc;
 
-    TRACE(("TM: native thread started: native: %p tm: %p",
+    CTRACE(("TM: native thread started: native: %p tm: %p",
         apr_os_thread_current(), thread));
 
     // check hythread library state
@@ -774,7 +773,7 @@
         // zero hythread_self() because we don't do it in hythread_detach_ex()
         hythread_set_self(NULL);
 
-        TRACE(("TM: native thread terminated due to shutdown: native: %p tm: %p",
+        CTRACE(("TM: native thread terminated due to shutdown: native: %p tm: %p",
             apr_os_thread_current(), thread));
 
         // release hythread global lock
@@ -948,7 +947,7 @@
         // check interruption and other problems
         status = hycond_wait(&lib->nondaemon_thread_cond, &lib->TM_LOCK);
 
-        TRACE(("TM wait for nondaemons notified, count: %d",
+        CTRACE(("TM wait for nondaemons notified, count: %d",
                lib->nondaemon_thread_count));
 
         if (status != TM_ERROR_NONE) {
@@ -989,13 +988,13 @@
         return TM_ERROR_ILLEGAL_STATE;
     }
 
-    TRACE(("TM: nondaemons decreased, thread: %p count: %d\n", thread,
+    CTRACE(("TM: nondaemons decreased, thread: %p count: %d\n", thread,
            lib->nondaemon_thread_count));
 
     lib->nondaemon_thread_count--;
     if (lib->nondaemon_thread_count - threads_to_keep <= 0) {
         status = hycond_notify_all(&lib->nondaemon_thread_cond);
-        TRACE(("TM: nondaemons all dead, thread: %p count: %d\n", thread,
+        CTRACE(("TM: nondaemons all dead, thread: %p count: %d\n", thread,
                lib->nondaemon_thread_count));
         if (status != TM_ERROR_NONE) {
             port_mutex_unlock(&lib->TM_LOCK);

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c?rev=649371&r1=649370&r2=649371&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c Thu Apr 17 22:25:58
2008
@@ -24,8 +24,8 @@
  */
 //@{
 
-#undef LOG_DOMAIN
 #define LOG_DOMAIN "tm.locks"
+
 #include <open/hythread_ext.h>
 #include "port_mutex.h"
 #include "thread_private.h"
@@ -143,7 +143,7 @@
     assert(mon_ptr->recursion_count >= 0);
 
     if (mon_ptr->owner != tm_self_tls) {
-        TRACE(("exit TM_ERROR_ILLEGAL_STATE  owner: %d self: %d, rec: %d\n",
+        CTRACE(("exit TM_ERROR_ILLEGAL_STATE  owner: %d self: %d, rec: %d\n",
                 mon_ptr->owner ? mon_ptr->owner->thread_id : 0,
                 tm_self_tls->thread_id, mon_ptr->recursion_count));
         return TM_ERROR_ILLEGAL_STATE;

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_iterator.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_iterator.c?rev=649371&r1=649370&r2=649371&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_iterator.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_iterator.c Thu Apr 17 22:25:58
2008
@@ -19,8 +19,6 @@
  * @file thread_native_iterator.c
  * @brief Hythread iterator related functions
  */
-
-#undef LOG_DOMAIN
 #define LOG_DOMAIN "tm.iterator"
 
 #include "thread_private.h"
@@ -38,7 +36,7 @@
     status = hythread_global_lock();
     assert(status == TM_ERROR_NONE);
     group = (group)?group:TM_DEFAULT_GROUP;
-    TRACE(("TM iterator created: %p head: %p", group->thread_list, group->thread_list->next));
+    CTRACE(("TM iterator created: %p head: %p", group->thread_list, group->thread_list->next));
     return (hythread_iterator_t)group->thread_list->next;
 }
 
@@ -49,7 +47,7 @@
  * @param[in] it thread group iterator
  */
 IDATA VMCALL hythread_iterator_release(hythread_iterator_t *it) {
-    TRACE(("TM iterator released: %p", (*it)->group->thread_list));
+    CTRACE(("TM iterator released: %p", (*it)->group->thread_list));
     return hythread_global_unlock();
 }
 
@@ -60,7 +58,7 @@
  */
 IDATA VMCALL hythread_iterator_reset(hythread_iterator_t *it) {
    (*it) = (*it)->group->thread_list->next;
-   TRACE(("TM iterator reset: %p head: %p", (*it)->group->thread_list, (*it))); 
+   CTRACE(("TM iterator reset: %p head: %p", (*it)->group->thread_list, (*it))); 
    return TM_ERROR_NONE;   
 }
 
@@ -74,13 +72,13 @@
     hythread_t res;
     
     if ((*it) == ((hythread_t)*it)->group->thread_list) {
-        TRACE(("TM iterator %p next: NULL", (*it)->group->thread_list));
+        CTRACE(("TM iterator %p next: NULL", (*it)->group->thread_list));
         return NULL;
     } 
     
     res = *it;
     (*it) = (*it)->next;
-    TRACE(("TM iterator %p next: %p", (*it)->group->thread_list, res));
+    CTRACE(("TM iterator %p next: %p", (*it)->group->thread_list, res));
     return res;
 } 
 
@@ -91,7 +89,7 @@
  */
 IDATA VMCALL hythread_iterator_has_next(hythread_iterator_t it) {
     IDATA res = (it != ((hythread_t)it)->group->thread_list)? 1 : 0 ;
-    TRACE(("TM iterator %p has next: %d", it->group->thread_list, res));
+    CTRACE(("TM iterator %p has next: %d", it->group->thread_list, res));
     return res;
     
 }
@@ -103,6 +101,6 @@
  */
 IDATA VMCALL hythread_iterator_size(hythread_iterator_t iterator) {
     IDATA size = ((hythread_t )iterator)->group->threads_count;
-    TRACE(("TM iterator %p size: %d", iterator->group->thread_list, size));
+    CTRACE(("TM iterator %p size: %d", iterator->group->thread_list, size));
     return size;
 }

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_suspend.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_suspend.c?rev=649371&r1=649370&r2=649371&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_suspend.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_suspend.c Thu Apr 17 22:25:58
2008
@@ -20,7 +20,6 @@
  * @brief Hythread suspend/resume related functions
  */
 
-#undef LOG_DOMAIN
 #define LOG_DOMAIN "tm.suspend"
 
 #include <open/hythread_ext.h>
@@ -131,13 +130,13 @@
     port_rw_barrier();
 
     do {
-        TRACE(("safe point enter: thread: %p, suspend_count: %d, request: %d",
+        CTRACE(("safe point enter: thread: %p, suspend_count: %d, request: %d",
                thread, thread->suspend_count, thread->request));
 
         // wait for resume event
         hysem_wait(thread->resume_event);
 
-        TRACE(("safe point exit: thread: %p, suspend_count: %d, request: %d",
+        CTRACE(("safe point exit: thread: %p, suspend_count: %d, request: %d",
                thread, thread->suspend_count, thread->request));
     } while (thread->suspend_count);
 
@@ -188,7 +187,7 @@
         }
         hythread_yield();
     }
-    TRACE(("suspend wait exit safe region thread: "
+    CTRACE(("suspend wait exit safe region thread: "
            "%p, suspend_count: %d, request: %d",
            thread, thread->suspend_count, thread->request));
     port_mutex_lock(&thread->mutex);
@@ -246,7 +245,7 @@
 {
     hythread_t self = tm_self_tls;
 
-    TRACE(("suspend enter, self: %p, thread: %p, "
+    CTRACE(("suspend enter, self: %p, thread: %p, "
            "suspend_count: %d, request: %d", self, thread,
            thread->suspend_count, thread->request));
 
@@ -262,7 +261,7 @@
         hythread_resume(thread);
         return TM_ERROR_EBUSY;
     }
-    TRACE(("suspend exit, self: %p, thread: %p, "
+    CTRACE(("suspend exit, self: %p, thread: %p, "
            "suspend_count: %d, request: %d", self, thread,
            thread->suspend_count, thread->request));
     return TM_ERROR_NONE;
@@ -283,7 +282,7 @@
     int count;
     hythread_t self = tm_self_tls;
 
-    TRACE(("start resume, self: %p, thread: %p, "
+    CTRACE(("start resume, self: %p, thread: %p, "
            "suspend_count: %d, request: %d", self, thread,
            thread->suspend_count, thread->request));
 
@@ -307,7 +306,7 @@
     thread->state &= ~TM_THREAD_STATE_SUSPENDED;
     port_mutex_unlock(&thread->mutex);
 
-    TRACE(("sent resume, self: %p, thread: %p, "
+    CTRACE(("sent resume, self: %p, thread: %p, "
            "suspend_count: %d, request: %d", self, thread,
            thread->suspend_count, thread->request));
 
@@ -369,7 +368,7 @@
     hythread_t self = tm_self_tls;
     hythread_t next;
     hythread_iterator_t iter;
-    TRACE(("suspend all threads"));
+    CTRACE(("suspend all threads"));
 
     assert(hythread_is_suspend_enabled());
 
@@ -380,7 +379,7 @@
     hythread_global_lock();
 
     // send suspend requests to all threads
-    TRACE(("send suspend requests"));
+    CTRACE(("send suspend requests"));
     iter = hythread_iterator_create(group);
     while ((next = hythread_iterator_next(&iter)) != NULL) {
         if (next != self) {
@@ -390,7 +389,7 @@
     hythread_iterator_reset(&iter);
 
     // all threads should be stoped in safepoints or be in safe region.
-    TRACE(("wait suspend responses"));
+    CTRACE(("wait suspend responses"));
     while ((next = hythread_iterator_next(&iter)) != NULL) {
         if (next == self) {
             continue;
@@ -421,7 +420,7 @@
     hythread_t next;
     hythread_iterator_t iter;
 
-    TRACE(("resume all threads"));
+    CTRACE(("resume all threads"));
 
     // send resume requests to all threads
     iter = hythread_iterator_create(group);

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c?rev=649371&r1=649370&r2=649371&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c Thu Apr 17 22:25:58
2008
@@ -141,11 +141,11 @@
 void unreserve_self_lock(hythread_thin_monitor_t *lockword_ptr) {
     U_32 lockword = *lockword_ptr;
     U_32 lockword_new;
-    TRACE(("unreserve self_id %d lock owner %d", hythread_get_self_id(), THREAD_ID(lockword)));
+    CTRACE(("unreserve self_id %d lock owner %d", hythread_get_self_id(), THREAD_ID(lockword)));
     assert(hythread_get_self_id() == THREAD_ID(lockword));
     assert (!IS_FAT_LOCK(*lockword_ptr));
     assert (IS_RESERVED(lockword));
-    TRACE(("Unreserved self %d \n", ++unreserve_count_self/*, vm_get_object_class_name(lockword_ptr-1)*/));
 
+    CTRACE(("Unreserved self %d \n", ++unreserve_count_self/*, vm_get_object_class_name(lockword_ptr-1)*/));
 
        
     // Set reservation bit to 1 and reduce recursion count
     lockword_new = (lockword | RESERVED_BITMASK);
@@ -156,7 +156,7 @@
         *lockword_ptr = lockword_new;
     }
     assert(!IS_RESERVED(*lockword_ptr));
-    TRACE(("unreserved self"));
+    CTRACE(("unreserved self"));
 }
 
 /**
@@ -183,7 +183,7 @@
     }
     lock_id = THREAD_ID(lockword);
     owner = hythread_get_thread(lock_id);
-    TRACE(("Unreserved other %d \n", ++unreserve_count/*, vm_get_object_class_name(lockword_ptr-1)*/));
+    CTRACE(("Unreserved other %d \n", ++unreserve_count/*, vm_get_object_class_name(lockword_ptr-1)*/));
     if (!IS_RESERVED(lockword) || IS_FAT_LOCK(lockword)) {
         // port_mutex_unlock(&TM_LOCK);
         return TM_ERROR_NONE;
@@ -223,7 +223,7 @@
     // prepare new unreserved lockword and try to CAS it with old one.
     while (IS_RESERVED(lockword)) {
         assert(!IS_FAT_LOCK(lockword));
-        TRACE(("unreserving lock"));
+        CTRACE(("unreserving lock"));
         if (RECURSION(lockword) != 0) {
             lockword_new = (lockword | RESERVED_BITMASK);
             assert(RECURSION(lockword) > 0);
@@ -235,7 +235,7 @@
         }
         if (lockword == apr_atomic_cas32 (((volatile apr_uint32_t*) lockword_ptr), 
                                           (apr_uint32_t) lockword_new, lockword)) {
-            TRACE(("unreserved lock"));
+            CTRACE(("unreserved lock"));
             break;
         }
         lockword = *lockword_ptr;
@@ -309,7 +309,7 @@
     
     lockword = *lockword_ptr;       
     lock_id = THREAD_ID(lockword);
-    //TRACE(("try lock %x %d", this_id, RECURSION(lockword)));
+    //CTRACE(("try lock %x %d", this_id, RECURSION(lockword)));
     
     // Check if the lock is already reserved or owned by this thread
     if (lock_id == this_id) {    
@@ -323,7 +323,7 @@
             return hythread_monitor_try_enter(fat_monitor);
             //break FAT_LOCK;
         } else {
-            TRACE(("try lock %x count:%d", this_id, res_lock_count++)); 
+            CTRACE(("try lock %x count:%d", this_id, res_lock_count++)); 
             // increase recursion
             RECURSION_INC(lockword_ptr, lockword);
             return TM_ERROR_NONE;
@@ -356,17 +356,17 @@
 #ifdef LOCK_RESERVATION
             //lockword = *lockword_ptr; // this reloading of lockword may be odd, need to
investigate;
             if (IS_RESERVED(lockword)) {
-                TRACE(("initially reserve lock %x count: %d ", *lockword_ptr, init_reserve_cout++));
+                CTRACE(("initially reserve lock %x count: %d ", *lockword_ptr, init_reserve_cout++));
                 RECURSION_INC(lockword_ptr, *lockword_ptr);
             }
 #endif
-            TRACE(("CAS lock %x count: %d ", *lockword_ptr, cas_cout++));
+            CTRACE(("CAS lock %x count: %d ", *lockword_ptr, cas_cout++));
             return TM_ERROR_NONE;
         } else 
 
             // Fat monitor
             if (IS_FAT_LOCK(lockword)) {
-                TRACE(("FAT MONITOR %d \n", ++fat_lock2_count/*, vm_get_object_class_name(lockword_ptr-1)*/));
 
+                CTRACE(("FAT MONITOR %d \n", ++fat_lock2_count/*, vm_get_object_class_name(lockword_ptr-1)*/));
 
                 fat_monitor = locktable_get_fat_monitor(FAT_LOCK_ID(lockword)); //  find
fat_monitor in lock table
             
                 status = hythread_monitor_try_enter(fat_monitor);
@@ -420,7 +420,7 @@
     while (hythread_thin_monitor_try_enter(lockword_ptr) == TM_ERROR_EBUSY) {
         if (IS_FAT_LOCK(*lockword_ptr)) {
             fat_monitor = locktable_get_fat_monitor(FAT_LOCK_ID(*lockword_ptr)); //  find
fat_monitor in lock table
-            TRACE((" lock %d\n", FAT_LOCK_ID(*lockword_ptr)));
+            CTRACE((" lock %d\n", FAT_LOCK_ID(*lockword_ptr)));
             saved_disable_count = hythread_reset_suspend_disable();
             status = hythread_monitor_enter(fat_monitor);
             hythread_set_suspend_disable(saved_disable_count);
@@ -433,7 +433,7 @@
         // lock already inflated
         return TM_ERROR_NONE;
     }
-    TRACE(("inflate_contended  thin_lcok%d\n", ++inflate_contended));   
+    CTRACE(("inflate_contended  thin_lcok%d\n", ++inflate_contended));   
     fat_monitor = hythread_inflate_lock(lockword_ptr);
 
     if (fat_monitor == NULL) {
@@ -458,24 +458,24 @@
         if (RECURSION(lockword)==0) {
 #ifdef LOCK_RESERVATION
             if (IS_RESERVED(lockword)) {
-                TRACE(("ILLEGAL_STATE %x\n", lockword));
+                CTRACE(("ILLEGAL_STATE %x\n", lockword));
                 return TM_ERROR_ILLEGAL_STATE;
             }
 #endif
             *lockword_ptr = lockword & 0xffff;
         } else {
             RECURSION_DEC(lockword_ptr, lockword);
-            //TRACE(("recursion_dec: 0x%x", *lockword_ptr)); 
+            //CTRACE(("recursion_dec: 0x%x", *lockword_ptr)); 
         }
-        //TRACE(("unlocked: 0x%x id: %d\n", *lockword_ptr, THREAD_ID(*lockword_ptr)));
+        //CTRACE(("unlocked: 0x%x id: %d\n", *lockword_ptr, THREAD_ID(*lockword_ptr)));
         //hythread_safe_point();
         return TM_ERROR_NONE;     
     }  else if (IS_FAT_LOCK(lockword)) {
-        TRACE(("exit fat monitor %d thread: %d\n", FAT_LOCK_ID(lockword), tm_self_tls->thread_id));
+        CTRACE(("exit fat monitor %d thread: %d\n", FAT_LOCK_ID(lockword), tm_self_tls->thread_id));
         fat_monitor = locktable_get_fat_monitor(FAT_LOCK_ID(lockword)); // find fat_monitor
         return hythread_monitor_exit(fat_monitor); // unlock fat_monitor
     }
-    TRACE(("ILLEGAL_STATE %d\n", FAT_LOCK_ID(lockword)));
+    CTRACE(("ILLEGAL_STATE %d\n", FAT_LOCK_ID(lockword)));
     return TM_ERROR_ILLEGAL_STATE;
 }
 
@@ -519,10 +519,10 @@
     if (!IS_FAT_LOCK(lockword)) {
         // check if the current thread owns lock
         if (!hythread_owns_thin_lock(this_thread, lockword)) {
-            TRACE(("ILLEGAL_STATE %wait d\n", FAT_LOCK_ID(lockword)));
+            CTRACE(("ILLEGAL_STATE %wait d\n", FAT_LOCK_ID(lockword)));
             return TM_ERROR_ILLEGAL_STATE;  
         }    
-        TRACE(("inflate_wait%d\n", ++inflate_waited));  
+        CTRACE(("inflate_wait%d\n", ++inflate_waited));  
         // if it is not a thin lock, inflate it
         fat_monitor = hythread_inflate_lock(lockword_ptr);
         if (fat_monitor == NULL) {
@@ -679,7 +679,7 @@
     assert(hythread_owns_thin_lock(tm_self_tls, lockword));
     assert(!hythread_is_suspend_enabled());
 
-    TRACE (("inflation begin for %x thread: %d", lockword, tm_self_tls->thread_id));
+    CTRACE(("inflation begin for %x thread: %d", lockword, tm_self_tls->thread_id));
     status = hythread_monitor_init(&fat_monitor, 0); // allocate fat fat_monitor    
     //assert(status == TM_ERROR_NONE);  
     if (status != TM_ERROR_NONE) {
@@ -691,15 +691,15 @@
     } 
     
     for (i = RECURSION(lockword); i > 0; i--) {
-        TRACE( ("inflate recursion monitor"));
+        CTRACE(("inflate recursion monitor"));
         status = hythread_monitor_enter(fat_monitor);  // transfer recursion count to fat
fat_monitor   
         assert(status == TM_ERROR_NONE);     
     }     
     fat_monitor_id = locktable_put_fat_monitor(fat_monitor); // put fat_monitor into lock
table
     set_fat_lock_id(lockword_ptr, fat_monitor_id);
-    TRACE(("hythread_inflate_lock  %d thread: %d\n", FAT_LOCK_ID(*lockword_ptr), tm_self_tls->thread_id));
+    CTRACE(("hythread_inflate_lock  %d thread: %d\n", FAT_LOCK_ID(*lockword_ptr), tm_self_tls->thread_id));
     //assert(FAT_LOCK_ID(*lockword_ptr) != 2);
-    TRACE(("FAT ID : 0x%x", *lockword_ptr));
+    CTRACE(("FAT ID : 0x%x", *lockword_ptr));
 #ifdef LOCK_RESERVATION
     assert(!IS_RESERVED(*lockword_ptr));
 #endif
@@ -824,7 +824,7 @@
  */
 hythread_monitor_t locktable_get_fat_monitor(IDATA lock_id) {
     hythread_monitor_t fat_monitor;
-    TRACE(("LOCK ID in table %x\n", lock_id));
+    CTRACE(("LOCK ID in table %x\n", lock_id));
 
     assert(lock_id >=0 && (U_32)lock_id < lock_table->size);
     // we don't need to protect this read, because monitor can't vanish or
@@ -956,7 +956,7 @@
     }
     locktable_writer_exit();
 #ifdef DEBUG_NATIVE_RESOURCE_COLLECTION
-    TRACE(("hythread_reclaim_resources(): old = %d, new = %d\n", 
+    CTRACE(("hythread_reclaim_resources(): old = %d, new = %d\n", 
            old_slots_occupied,
            new_slots_occupied));
 #endif

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h?rev=649371&r1=649370&r2=649371&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h Thu Apr 17 22:25:58 2008
@@ -34,15 +34,15 @@
 #include <pthread.h>
 #endif // __linux__
 
-// temporary remove logging
-//#define TRACE(a) //printf a; printf("\n")
-
-#ifdef __linux__
-#include "clog.h"
+#if 1
+#define CTRACE(a)
 #else
-#define TRACE(a) //printf a; printf("\n")
-#define DIE(A) //exit(55);
+#define CTRACE(a) printf a; printf("\n"); fflush(stdout)
 #endif
+#define DIE(a) \
+    printf("Thread manager aborted\n"); \
+    printf a; printf("\n"); fflush(stdout); \
+    exit(55);
 
 // FIXME move to the global header, add error converter 
 #define RET_ON_ERROR(stat) if (stat) { return -1; }



Mime
View raw message