harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r594179 - in /harmony/enhanced/drlvm/trunk/vm/vmcore: include/classloader.h src/class_support/classloader.cpp src/gc/root_set_enum_common.cpp
Date Mon, 12 Nov 2007 15:21:44 GMT
Author: gshimansky
Date: Mon Nov 12 07:21:44 2007
New Revision: 594179

URL: http://svn.apache.org/viewvc?rev=594179&view=rev
Log:
Applied patch from HARMONY-5104
[drlvm] Assertion during root enumeration


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/classloader.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/classloader.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/classloader.h?rev=594179&r1=594178&r2=594179&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/classloader.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/classloader.h Mon Nov 12 07:21:44 2007
@@ -174,6 +174,7 @@
         return klass?*klass:NULL;
     }
     void RemoveFromReported(const String* name){
+        assert(!hythread_is_suspend_enabled());
         if(m_reportedClasses->Lookup(name)) {
             m_reportedClasses->Remove(name);
         }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp?rev=594179&r1=594178&r2=594179&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp Mon Nov 12 07:21:44
2007
@@ -510,6 +510,7 @@
 void ClassLoader::ClearMarkBits()
 {
     TRACE2("classloader.unloading.clear", "Clearing mark bits");
+    assert(!hythread_is_suspend_enabled());
     LMAutoUnlock aulock( &(ClassLoader::m_tableLock) );
     ClassTable::iterator cti;
     for(unsigned i = 0; i < m_nextEntry; i++) {
@@ -698,6 +699,7 @@
 void ClassLoader::FailedLoadingClass(const String* className)
 {
     LOG2("classloader", "Failed loading class " << className << " with loader
" << this);
+    tmn_suspend_disable();
     LMAutoUnlock aulock( &m_lock );
 
     LoadingClass* lc = m_loadingClasses->Lookup(className);
@@ -706,6 +708,8 @@
         RemoveLoadingClass(className, lc);
     }
     RemoveFromReported(className);
+    aulock.ForceUnlock();
+    tmn_suspend_enable();
 }
 
 
@@ -1714,6 +1718,7 @@
         }
     }
 
+    tmn_suspend_disable();
     LMAutoUnlock aulock(&m_lock);
     m_loadedClasses->Insert(clss->get_name(), clss);
     if (!IsBootstrap()){
@@ -1721,6 +1726,8 @@
     }
     
     m_initiatedClasses->Insert(clss->get_name(), clss);
+    aulock.ForceUnlock();
+    tmn_suspend_enable();
     return true;
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp?rev=594179&r1=594178&r2=594179&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp Mon Nov 12 07:21:44
2007
@@ -118,6 +118,7 @@
 void vm_enumerate_static_fields()
 {
     TRACE2("enumeration", "vm_enumerate_static_fields()");
+    assert(!hythread_is_suspend_enabled());
     GlobalClassLoaderIterator ClIterator;
     Boolean do_class_unloading = gc_supports_class_unloading();
     ClassLoader *cl = ClIterator.first();



Mime
View raw message