harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x..@apache.org
Subject svn commit: r602896 - in /harmony/enhanced/drlvm/trunk/vm: gc_cc/build/gc_cc.exp gc_cc/src/collect.cpp gc_cc/src/gc_for_vm.cpp gc_cc/src/gc_types.h gc_cc/src/selector.cpp vmcore/build/vmcore.exp
Date Mon, 10 Dec 2007 13:31:11 GMT
Author: xli
Date: Mon Dec 10 05:31:09 2007
New Revision: 602896

URL: http://svn.apache.org/viewvc?rev=602896&view=rev
Log:
HARMONY-5262: [drlvm][gc_cc] GC_CC does not work in debug mode since r583223 

Modified:
    harmony/enhanced/drlvm/trunk/vm/gc_cc/build/gc_cc.exp
    harmony/enhanced/drlvm/trunk/vm/gc_cc/src/collect.cpp
    harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_for_vm.cpp
    harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_types.h
    harmony/enhanced/drlvm/trunk/vm/gc_cc/src/selector.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp

Modified: harmony/enhanced/drlvm/trunk/vm/gc_cc/build/gc_cc.exp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_cc/build/gc_cc.exp?rev=602896&r1=602895&r2=602896&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_cc/build/gc_cc.exp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_cc/build/gc_cc.exp Mon Dec 10 05:31:09 2007
@@ -5,6 +5,8 @@
     gc_add_root_set_entry;
     gc_add_root_set_entry_interior_pointer;
     gc_add_weak_root_set_entry;
+    gc_add_compressed_root_set_entry;
+    gc_supports_compressed_references;
     gc_alloc;
     gc_alloc_fast;
     gc_alloc_pinned;

Modified: harmony/enhanced/drlvm/trunk/vm/gc_cc/src/collect.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_cc/src/collect.cpp?rev=602896&r1=602895&r2=602896&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_cc/src/collect.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_cc/src/collect.cpp Mon Dec 10 05:31:09 2007
@@ -114,6 +114,7 @@
 }
 
 void clear_thread_local_buffers() {
+    int disable_count = hythread_reset_suspend_disable();
     hythread_iterator_t it = hythread_iterator_create(0);
     int count = (int)hythread_iterator_size (it);
     for (int i = 0; i < count; i++){
@@ -124,6 +125,7 @@
         info.set_tls_current_ceiling(0);
     }
     hythread_iterator_release(&it);
+    hythread_set_suspend_disable(disable_count);
 }
 
 static void enumerate_universe() {
@@ -310,7 +312,7 @@
 }
 
 static unsigned char*
-finish_slide_gc(int size, int stage) {
+finish_slide_gc(int size, int stage, int dis_count) {
     if (stage == 0) {
         gc_slide_process_special_references(soft_references);
         gc_slide_process_special_references(weak_references);
@@ -336,6 +338,7 @@
     unsigned char *res = try_alloc(size);
 
     vm_resume_threads_after();
+    hythread_set_suspend_disable(dis_count);
     notify_gc_end();
     TRACE2("gc.mem", "finish_slide_compact = " << res);
     return res;
@@ -351,8 +354,9 @@
     gc_type = GC_SLIDE_COMPACT;
     gc_allocate_mark_bits();
 
+    int disable_count = hythread_reset_suspend_disable();
     TIME(enumerate_universe,());
-    return finish_slide_gc(size, 0);
+    return finish_slide_gc(size, 0, disable_count);
 }
 
 void transition_copy_to_sliding_compaction(fast_list<Slot,65536>& slots) {
@@ -371,11 +375,12 @@
     pinned_areas_unsorted.clear();
     roots_clear();
 
+    int disable_count = hythread_reset_suspend_disable();
     gc_type = GC_COPY;
     TIME(enumerate_universe,());
 
     if (gc_type == GC_SLIDE_COMPACT) {
-        unsigned char *res = finish_slide_gc(size, 0);
+        unsigned char *res = finish_slide_gc(size, 0, disable_count);
         heap.Tcopy = (float) gc_time.dt();
         return res;
     }
@@ -384,7 +389,7 @@
     process_special_roots(weak_roots);
     process_finalizable_objects();
     if (gc_type == GC_SLIDE_COMPACT) {
-        unsigned char *res = finish_slide_gc(size, 1);
+        unsigned char *res = finish_slide_gc(size, 1, disable_count);
         heap.Tcopy = (float) gc_time.dt();
         return res;
     }
@@ -404,6 +409,7 @@
 
     unsigned char *res = try_alloc(size);
     vm_resume_threads_after();
+    hythread_set_suspend_disable(disable_count);
     notify_gc_end();
     TRACE2("gc.mem", "copy_gc = " << res);
     return res;
@@ -415,6 +421,7 @@
 
     roots_clear();
 
+    int disable_count = hythread_reset_suspend_disable();
     gc_type = GC_FORCED;
     TIME(enumerate_universe,());
     TIME(process_special_references,(soft_references));
@@ -433,6 +440,7 @@
     //clear_thread_local_buffers();
 
     TIME(vm_resume_threads_after,());
+    hythread_set_suspend_disable(disable_count);
     notify_gc_end();
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_for_vm.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_for_vm.cpp?rev=602896&r1=602895&r2=602896&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_for_vm.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_for_vm.cpp Mon Dec 10 05:31:09 2007
@@ -38,11 +38,13 @@
 
 static unsigned int pending_finalizers_hint_counter = 0;
 
-#ifdef POINTER64
 GCExport Boolean gc_supports_compressed_references() {
-    return true;
-}
+#ifdef POINTER64
+  return true;
+#else
+  return false;
 #endif
+}
 
 GCExport void gc_write_barrier(Managed_Object_Handle p_base_of_obj_with_slot) {
     TRACE2("gc.wb", "gc_write_barrier");
@@ -568,4 +570,5 @@
     }
 }
 #endif
+
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_types.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_types.h?rev=602896&r1=602895&r2=602896&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_types.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_cc/src/gc_types.h Mon Dec 10 05:31:09 2007
@@ -164,9 +164,14 @@
 class Partial_Reveal_Object {
     private:
     Partial_Reveal_Object();
-    VT32 vt_raw;
-    unsigned info;
-    int array_len;
+    union {
+      VT32 vt_raw;
+      POINTER_SIZE_INT padding;
+    };
+    union {
+      unsigned info;
+      POINTER_SIZE_INT info_padding;
+    };
 
     public:
     VT32 &vt() { assert(/* alignment check */ !((POINTER_SIZE_INT)this & (GC_OBJECT_ALIGNMENT
- 1))); return vt_raw; }
@@ -185,13 +190,6 @@
 
     int array_length() { return ((VM_Vector*)this)->get_length(); }
 
-    Partial_Reveal_Object **get_array_elements(GC_VTable_Info *gcvt) {
-        assert(gcvt->is_array());
-        assert(gcvt->has_slots());
-        return (Partial_Reveal_Object**)
-            ((unsigned char*) this + (gcvt->flags() >> GC_VT_ARRAY_FIRST_SHIFT));
-    }
-
 #if _DEBUG
     void valid() {
         assert((vt() & FORWARDING_BIT) == 0);
@@ -378,4 +376,5 @@
 #endif
 
 #endif /* __GC_TYPES_H__ */
+
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_cc/src/selector.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_cc/src/selector.cpp?rev=602896&r1=602895&r2=602896&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_cc/src/selector.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_cc/src/selector.cpp Mon Dec 10 05:31:09 2007
@@ -303,7 +303,9 @@
         copy_gc(0);
     }
     vm_gc_unlock_enum();
+    hythread_suspend_disable();
     vm_hint_finalize();
+    hythread_suspend_enable();
 }
 
 void init_select_gc() {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp?rev=602896&r1=602895&r2=602896&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp Mon Dec 10 05:31:09 2007
@@ -672,6 +672,9 @@
     apr_atomic_cas32;
     apr_time_now;
     apr_atomic_casptr;
+# Workaround for API used by GC_CC
+    apr_atomic_xchg32;
+    *MemoryPool*;
 # Workaround for ManagedObject::_tag_pointer used in interpreter
     *ManagedObject*;
 # Workaround for C++ functions unspecified in interface used by interpreter



Mime
View raw message