harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x..@apache.org
Subject svn commit: r597313 [2/2] - in /harmony/enhanced/drlvm/trunk/vm/gc_gen/src: common/ finalizer_weakref/ gen/ jni/ mark_compact/ mark_sweep/ thread/ trace_forward/ utils/ verify/
Date Thu, 22 Nov 2007 06:40:40 GMT
Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/thread/collector_alloc.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/thread/collector_alloc.h?rev=597313&r1=597312&r2=597313&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/thread/collector_alloc.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/thread/collector_alloc.h Wed Nov 21 22:40:31
2007
@@ -47,9 +47,14 @@
   if(obj_is_set_hashcode) size += GC_OBJECT_ALIGNMENT;
 #endif
 
-  Partial_Reveal_Object* p_targ_obj = thread_local_alloc(size, (Allocator*)collector);
-  if(!p_targ_obj)
+  Partial_Reveal_Object* p_targ_obj = NULL;
+  if(is_collector_local_alloc){
+    p_targ_obj = thread_local_alloc(size, (Allocator*)collector);
+    if(!p_targ_obj)
+      p_targ_obj = (Partial_Reveal_Object*)mos_alloc(size, (Allocator*)collector);
+  } else {
     p_targ_obj = (Partial_Reveal_Object*)mos_alloc(size, (Allocator*)collector);
+  }
     
   if(p_targ_obj == NULL){
     /* failed to forward an obj */

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_gen_forward_pool.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_gen_forward_pool.cpp?rev=597313&r1=597312&r2=597313&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_gen_forward_pool.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_gen_forward_pool.cpp Wed
Nov 21 22:40:31 2007
@@ -76,13 +76,12 @@
   }
 
   /* scan non-array object */
-  int *offset_scanner = init_object_scanner(p_obj);
-  while (true) {
-    p_ref = (REF *)offset_get_ref(offset_scanner, p_obj);
-    if (p_ref == NULL) break;
-  
+  unsigned int num_refs = object_ref_field_num(p_obj);
+  int *ref_iterator = object_ref_iterator_init(p_obj);
+            
+  for(unsigned int i=0; i<num_refs; i++){
+    REF* p_ref = object_ref_iterator_get(ref_iterator+i, p_obj);        
     scan_slot(collector, p_ref);
-    offset_scanner = offset_next_ref(offset_scanner);
   }
 
 #ifndef BUILD_IN_REFERENT
@@ -350,9 +349,9 @@
       gc_update_weakref_ignore_finref(gc);
     }
 #endif
-  identify_dead_weak_roots(gc, gc->metadata->weak_roots_pool);
+  gc_identify_dead_weak_roots(gc);
   
-  gc_fix_rootset(collector);
+  gc_fix_rootset(collector, FALSE);
   
   TRACE2("gc.process", "GC: collector[0] finished");
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_nongen_forward_pool.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_nongen_forward_pool.cpp?rev=597313&r1=597312&r2=597313&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_nongen_forward_pool.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_nongen_forward_pool.cpp
Wed Nov 21 22:40:31 2007
@@ -304,9 +304,9 @@
       gc_update_weakref_ignore_finref(gc);
     }
 #endif
-  identify_dead_weak_roots(gc, gc->metadata->weak_roots_pool);
+  gc_identify_dead_weak_roots(gc);
   
-  gc_fix_rootset(collector);
+  gc_fix_rootset(collector, FALSE);
   
   TRACE2("gc.process", "GC: collector[0] finished");
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_pool.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_pool.h?rev=597313&r1=597312&r2=597313&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_pool.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_pool.h Wed Nov 21 22:40:31 2007
@@ -29,7 +29,7 @@
 inline Pool* sync_pool_create(){ return sync_stack_init(); }
 inline void sync_pool_destruct(Pool* pool){ sync_stack_destruct(pool); }
 
-FORCE_INLINE Boolean pool_is_empty(Pool* pool){ return sync_stack_is_empty(pool);}
+inline Boolean pool_is_empty(Pool* pool){ return sync_stack_is_empty(pool);}
 inline void pool_empty(Pool* pool) { sync_stack_empty(pool); }
 
 inline unsigned int pool_size(Pool* pool){ return sync_stack_size(pool); }
@@ -51,6 +51,7 @@
 inline Vector_Block* pool_iterator_next(Pool* pool){ return (Vector_Block*)sync_stack_iterate_next(pool);}
 
 #endif /* #ifndef _SYNC_POOL_H_ */
+
 
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_stack.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_stack.h?rev=597313&r1=597312&r2=597313&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_stack.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_stack.h Wed Nov 21 22:40:31 2007
@@ -142,7 +142,7 @@
 
 /* it does not matter whether this is atomic or not, because
    it is only invoked when there is no contention or only for rough idea */
-FORCE_INLINE Boolean sync_stack_is_empty(Sync_Stack* stack)
+inline Boolean sync_stack_is_empty(Sync_Stack* stack)
 {
   return (stack_top_get_entry(stack->top) == NULL);
 }

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/vector_block.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/vector_block.h?rev=597313&r1=597312&r2=597313&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/vector_block.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/vector_block.h Wed Nov 21 22:40:31 2007
@@ -201,7 +201,7 @@
 #endif
 }
 
-FORCE_INLINE Boolean vector_stack_is_empty(Vector_Block* block)
+inline Boolean vector_stack_is_empty(Vector_Block* block)
 {  return (block->head == block->tail); }
 
 /*
@@ -209,10 +209,10 @@
 { return (block->head - block->entries) == VECTOR_BLOCK_ENTRY_NUM; }
 */
 
-FORCE_INLINE Boolean vector_stack_is_full(Vector_Block* block)
+inline Boolean vector_stack_is_full(Vector_Block* block)
 {  return (block->head == block->entries); }
 
-FORCE_INLINE void vector_stack_push(Vector_Block* block, POINTER_SIZE_INT value)
+inline void vector_stack_push(Vector_Block* block, POINTER_SIZE_INT value)
 { 
   block->head--;
 #ifdef _DEBUG
@@ -221,7 +221,7 @@
   *(block->head) = value;
 }
 
-FORCE_INLINE POINTER_SIZE_INT vector_stack_pop(Vector_Block* block)
+inline POINTER_SIZE_INT vector_stack_pop(Vector_Block* block)
 {   
   POINTER_SIZE_INT value = *block->head;
 #ifdef _DEBUG

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_common.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_common.h?rev=597313&r1=597312&r2=597313&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_common.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_common.h Wed Nov 21 22:40:31
2007
@@ -125,8 +125,8 @@
   GC_MS* gc = (GC_MS*)heap_verifier->gc;
   if(!heap_verifier->is_before_gc){
     /*in GC_MS mark sweep algorithm, all live objects should be set their mark bit*/
-    assert(obj_is_alloc_color_in_table(p_obj));
-    if(!obj_is_alloc_color_in_table(p_obj))
+    assert(obj_is_alloc_in_color_table(p_obj));
+    if(!obj_is_alloc_in_color_table(p_obj))
       printf("\nERROR: obj after GC should be set its alloc color!\n");
   }else{
     //ynhe

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_gc_effect.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_gc_effect.cpp?rev=597313&r1=597312&r2=597313&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_gc_effect.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_gc_effect.cpp Wed Nov 21 22:40:31
2007
@@ -321,8 +321,8 @@
   GC_MS* gc = (GC_MS*)heap_verifier->gc;
   if(!heap_verifier->is_before_gc){
     /*in GC_MS mark sweep algorithm, all live objects should be set their mark bit*/
-    assert(obj_is_alloc_color_in_table(p_obj));
-    if(!obj_is_alloc_color_in_table(p_obj))
+    assert(obj_is_alloc_in_color_table(p_obj));
+    if(!obj_is_alloc_in_color_table(p_obj))
       printf("\nERROR: obj after GC should be set its alloc color!\n");
   }else{
     //ynhe
@@ -550,5 +550,6 @@
 
 void verifier_reset_hash_distance()
 { hash_obj_distance = 0;}
+
 
 



Mime
View raw message