harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x..@apache.org
Subject svn commit: r531387 - in /harmony/enhanced/drlvm/trunk/vm/vmcore: include/finalizer_thread.h src/init/finalizer_thread.cpp src/init/ref_enqueue_thread.cpp
Date Mon, 23 Apr 2007 09:07:30 GMT
Author: xli
Date: Mon Apr 23 02:07:29 2007
New Revision: 531387

URL: http://svn.apache.org/viewvc?view=rev&rev=531387
Log:
Harmony-3705 : increase the waiting time to make Linux64 interpreter test pass. 

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/finalizer_thread.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/finalizer_thread.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/ref_enqueue_thread.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/finalizer_thread.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/finalizer_thread.h?view=diff&rev=531387&r1=531386&r2=531387
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/finalizer_thread.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/finalizer_thread.h Mon Apr 23 02:07:29
2007
@@ -51,7 +51,7 @@
     hymutex_t mutator_block_mutex;              // mutator block mutex for heavy finalizable
obj load
     
     hythread_t *thread_ids;
-    unsigned int thread_num;
+    volatile unsigned int thread_num;
     volatile unsigned int thread_attached;
     
     volatile Boolean shutdown;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/finalizer_thread.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/finalizer_thread.cpp?view=diff&rev=531387&r1=531386&r2=531387
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/finalizer_thread.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/finalizer_thread.cpp Mon Apr 23 02:07:29
2007
@@ -111,10 +111,10 @@
         args[0] = (void *)java_vm;
         args[1] = (void *)(UDATA)(i + 1);
         fin_thread_info->thread_ids[i] = NULL;
-		clear_fin_thread_attached();
+        clear_fin_thread_attached();
         status = hythread_create(&fin_thread_info->thread_ids[i], 0, FINALIZER_THREAD_PRIORITY,
0, (hythread_entrypoint_t)finalizer_thread_func, args);
         assert(status == TM_ERROR_NONE);
-		wait_fin_thread_attached();
+       wait_fin_thread_attached();
     }    
 }
 
@@ -161,7 +161,7 @@
     hymutex_lock(&fin_thread_info->end_mutex);
     unsigned int fin_obj_num = vm_get_finalizable_objects_quantity();
     while(fin_thread_info->working_thread_num || fin_obj_num){
-        unsigned int wait_time = restrict_wait_time(fin_obj_num, FIN_MAX_WAIT_TIME <<
7);
+        unsigned int wait_time = restrict_wait_time(fin_obj_num + 100, FIN_MAX_WAIT_TIME
<< 7);
         atomic_inc32(&fin_thread_info->end_waiting_num);
         IDATA status = hycond_wait_timed(&fin_thread_info->end_cond, &fin_thread_info->end_mutex,
(I_64)wait_time, 0);
         atomic_dec32(&fin_thread_info->end_waiting_num);
@@ -246,7 +246,7 @@
     IDATA status = AttachCurrentThreadAsDaemon(java_vm, (void**)&jni_env, jni_args);
     assert(status == JNI_OK);
     assign_classloader_to_native_threads(jni_env);
-	assert(!get_fin_thread_attached());
+    assert(!get_fin_thread_attached());
     set_fin_thread_attached();
     
     /* Choice: use VM_thread or hythread to indicate the finalizer thread ?
@@ -274,6 +274,7 @@
     
     vm_heavy_finalizer_resume_mutator();
     status = DetachCurrentThread(java_vm);
+    assert(status == JNI_OK);
     dec_fin_thread_num();
     //status = jthread_detach(java_thread);
     return status;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/ref_enqueue_thread.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/ref_enqueue_thread.cpp?view=diff&rev=531387&r1=531386&r2=531387
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/ref_enqueue_thread.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/ref_enqueue_thread.cpp Mon Apr 23 02:07:29
2007
@@ -87,7 +87,7 @@
 { while(ref_thread_info->thread_attached < REF_ENQUEUE_THREAD_NUM); }
 
 void wait_native_ref_thread_detached(void)
-{ while(ref_thread_info->thread_attached); }
+{ while(ref_thread_info->thread_attached){hythread_yield();} }
 
 static void wait_ref_enqueue_end(void)
 {



Mime
View raw message