harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x..@apache.org
Subject svn commit: r570028 [4/4] - in /harmony/enhanced/drlvm/trunk/vm/gc_gen/src: common/ finalizer_weakref/ gen/ los/ mark_compact/ mark_sweep/ tests/ thread/ trace_forward/ utils/ verify/
Date Mon, 27 Aug 2007 08:12:01 GMT
Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace.h?rev=570028&r1=570027&r2=570028&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace.h Mon Aug 27 01:11:57
2007
@@ -36,12 +36,12 @@
 
 typedef Blocked_Space Fspace;
 
-void fspace_initialize(GC* gc, void* start, POINTER_SIZE_INT fspace_size, POINTER_SIZE_INT
commit_size);
+Fspace *fspace_initialize(GC* gc, void* start, POINTER_SIZE_INT fspace_size, POINTER_SIZE_INT
commit_size);
 void fspace_destruct(Fspace *fspace);
 
 void* fspace_alloc(unsigned size, Allocator *allocator);
 
-void fspace_reset_for_allocation(Fspace* fspace);
+void fspace_reset_after_collection(Fspace* fspace);
 
 /* gen mode */
 void gen_forward_pool(Collector* collector); 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_alloc.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_alloc.cpp?rev=570028&r1=570027&r2=570028&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_alloc.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_alloc.cpp Mon Aug 27 01:11:57
2007
@@ -20,6 +20,8 @@
  */
 
 #include "fspace.h"
+#include "../common/gc_concurrent.h"
+#include "../common/collection_scheduler.h"
 
 static Boolean fspace_alloc_block(Fspace* fspace, Allocator* allocator)
 {    
@@ -59,13 +61,15 @@
   p_return = thread_local_alloc(size, allocator);
   if (p_return)  return p_return;
 
+  if(gc_need_start_concurrent_mark(allocator->gc))
+    gc_start_concurrent_mark(allocator->gc);
   /* ran out local block, grab a new one*/  
   Fspace* fspace = (Fspace*)allocator->alloc_space;
   int attempts = 0;
   while( !fspace_alloc_block(fspace, allocator)){
     vm_gc_lock_enum();
     /* after holding lock, try if other thread collected already */
-    if ( !space_has_free_block((Blocked_Space*)fspace) ) {  
+    if ( !blocked_space_has_free_block((Blocked_Space*)fspace) ) {  
         if(attempts < 2) {
 #ifdef GC_GEN_STATS
         GC_Gen* gc = (GC_Gen*)allocator->gc;

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=570028&r1=570027&r2=570028&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 Mon
Aug 27 01:11:57 2007
@@ -354,8 +354,6 @@
   
   gc_fix_rootset(collector);
   
-  fspace_reset_for_allocation(space);  
-
   TRACE2("gc.process", "GC: collector[0] finished");
 
   return;

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=570028&r1=570027&r2=570028&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
Mon Aug 27 01:11:57 2007
@@ -308,8 +308,6 @@
   
   gc_fix_rootset(collector);
   
-  fspace_reset_for_allocation(space);
-
   TRACE2("gc.process", "GC: collector[0] finished");
 
   return;

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=570028&r1=570027&r2=570028&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 Mon Aug 27 01:11:57 2007
@@ -64,7 +64,7 @@
 */
 
 inline Boolean vector_block_is_empty(Vector_Block* block)
-{ return block->tail == block->entries; }
+{ return block->tail == block->head; }
 
 inline void vector_block_add_entry(Vector_Block* block, POINTER_SIZE_INT value)
 {
@@ -73,6 +73,95 @@
 #endif
 
   *(block->tail++) = value; 
+}
+
+inline POINTER_SIZE_INT vector_block_get_entry(Vector_Block* block)
+{
+#ifdef _DEBUG
+  assert(!vector_block_is_empty(block));
+#endif
+
+  POINTER_SIZE_INT value = *(block->head++);
+
+#ifdef _DEBUG
+  assert(value);
+#endif
+  return value;
+}
+
+#define VECTOR_BLOCK_SHARE_BIT 0x01
+#define VECTOR_BLOCK_FULL_BIT  0x02
+#define VECTOR_BLOCK_SHARE_ID_SHIFT 0x05
+#define VECTOR_BLOCK_EXCLUSIVE_ID 0xFFff
+inline Boolean vector_block_is_shared(Vector_Block* block)
+{
+  return (Boolean)((POINTER_SIZE_INT)block->next & VECTOR_BLOCK_SHARE_BIT);
+}
+
+inline Boolean vector_block_is_set_full(Vector_Block* block)
+{
+  return (Boolean)((POINTER_SIZE_INT)block->next & VECTOR_BLOCK_FULL_BIT);
+}
+
+inline Boolean vector_block_set_full(Vector_Block* block)
+{
+  POINTER_SIZE_INT old_shared_var = (POINTER_SIZE_INT) block->next;
+  POINTER_SIZE_INT new_shared_var = old_shared_var | VECTOR_BLOCK_FULL_BIT;
+
+  while(TRUE){
+    POINTER_SIZE_INT old_var = (POINTER_SIZE_INT)atomic_casptr((volatile void **)& block->next
,(void*) new_shared_var,(void*) old_shared_var);
+    if(old_var == old_shared_var) return TRUE;
+    old_shared_var = (POINTER_SIZE_INT) block->next;
+    new_shared_var = old_shared_var | VECTOR_BLOCK_FULL_BIT;
+  }
+  assert(0);
+  return FALSE;
+
+}
+
+inline Boolean vector_block_set_shared(Vector_Block* block, unsigned int share_id)
+{
+  POINTER_SIZE_INT new_shared_var = (POINTER_SIZE_INT)((share_id << VECTOR_BLOCK_SHARE_ID_SHIFT)
| VECTOR_BLOCK_SHARE_BIT);
+  POINTER_SIZE_INT old_shared_var = (POINTER_SIZE_INT) block->next;
+  if(old_shared_var != 0) return FALSE;
+
+  while(TRUE){
+    POINTER_SIZE_INT old_var = (POINTER_SIZE_INT)atomic_casptr((volatile void **)& block->next
,(void*) new_shared_var,(void*) old_shared_var);
+    if(old_var == old_shared_var) return TRUE;
+    old_shared_var = (POINTER_SIZE_INT) block->next;
+    if(old_shared_var != 0) return FALSE;
+  }    
+}
+
+inline Boolean vector_block_not_full_set_unshared(Vector_Block* block)
+{
+  POINTER_SIZE_INT new_shared_var = (POINTER_SIZE_INT) 0;
+  POINTER_SIZE_INT old_shared_var = (POINTER_SIZE_INT) block->next;
+
+  if(old_shared_var & VECTOR_BLOCK_FULL_BIT) return FALSE;
+
+  while(TRUE){
+    POINTER_SIZE_INT old_var = (POINTER_SIZE_INT)atomic_casptr((volatile void **)& block->next
,(void*) new_shared_var,(void*) old_shared_var);
+    if(old_var == old_shared_var) return TRUE;
+    old_shared_var = (POINTER_SIZE_INT) block->next;
+    if(old_shared_var & VECTOR_BLOCK_FULL_BIT) return FALSE;    
+  }
+  assert(0);
+  return FALSE;
+}
+
+inline Boolean vector_block_set_exclusive(Vector_Block* block)
+{
+  POINTER_SIZE_INT new_shared_var = (POINTER_SIZE_INT)((VECTOR_BLOCK_EXCLUSIVE_ID <<
VECTOR_BLOCK_SHARE_ID_SHIFT) | VECTOR_BLOCK_SHARE_BIT);
+  POINTER_SIZE_INT old_shared_var = (POINTER_SIZE_INT) block->next;
+  if(old_shared_var & VECTOR_BLOCK_SHARE_BIT) return FALSE;
+
+  while(TRUE){
+    POINTER_SIZE_INT old_var = (POINTER_SIZE_INT)atomic_casptr((volatile void **)& block->next
,(void*) new_shared_var,(void*) old_shared_var);
+    if(old_var == old_shared_var) return TRUE;
+    old_shared_var = (POINTER_SIZE_INT) block->next;
+    if(old_shared_var & VECTOR_BLOCK_SHARE_BIT) return FALSE;
+  }
 }
 
 inline void vector_block_clear(Vector_Block* block)

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_common.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_common.cpp?rev=570028&r1=570027&r2=570028&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_common.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_common.cpp Mon Aug 27 01:11:57
2007
@@ -83,13 +83,15 @@
 
 Boolean verify_rootset_slot(REF* p_ref, Heap_Verifier* heap_verifier)
 {
+  Partial_Reveal_Object* p_obj = read_slot(p_ref);
+  assert(address_belongs_to_gc_heap(p_obj,heap_verifier->gc));
+#ifndef USE_MARK_SWEEP_GC
   GC_Gen* gc    = (GC_Gen*)heap_verifier->gc;
   Space* mspace = gc_get_mos(gc);
   Space* lspace  = gc_get_los(gc);
 
-  Partial_Reveal_Object* p_obj = read_slot(p_ref);
   if(p_obj == NULL){
-    if(gc->collect_kind !=MINOR_COLLECTION ||(!heap_verifier->gc_is_gen_mode &&
!NOS_PARTIAL_FORWARD)){
+    if(gc_match_kind((GC*)gc, MAJOR_COLLECTION) ||(!heap_verifier->gc_is_gen_mode &&
!NOS_PARTIAL_FORWARD)){
       assert(0);
       return FALSE;
     }else{
@@ -106,12 +108,14 @@
   }
   assert(address_belongs_to_gc_heap(p_obj,heap_verifier->gc));
   if(heap_verifier->is_before_gc){
+#endif
     //if(!address_belongs_to_gc_heap(p_ref) && address_belongs_to_gc_heap(p_obj)){
     if(!address_belongs_to_gc_heap(p_obj, heap_verifier->gc)){
       printf("\nERROR: obj referenced by rootset is outside the heap error!\n");
       assert(0);
       return FALSE;
     }
+#ifndef USE_MARK_SWEEP_GC
   }else{
     if(heap_verifier->gc_verifier->is_before_fallback_collection){
       if(!address_belongs_to_gc_heap(p_obj, heap_verifier->gc)){
@@ -128,6 +132,7 @@
       return FALSE;
    }
   }
+#endif
   return TRUE;
 }
 
@@ -211,10 +216,12 @@
     gc_kind = " fallback collection.";
   }else if(gc_match_kind(gc, EXTEND_COLLECTION)){ 
     gc_kind = " extend collection.";
-  }else if(gc_match_kind(gc, MAJOR_COLLECTION)){ 
+  }else if(gc_match_kind(gc, NORMAL_MAJOR_COLLECTION)){ 
     if(gc->tuner->kind == TRANS_NOTHING)  gc_kind = "major collection (normal)";
     else if(gc->tuner->kind == TRANS_FROM_LOS_TO_MOS) gc_kind = "major collection (LOS
shrink)";
     else if(gc->tuner->kind == TRANS_FROM_MOS_TO_LOS) gc_kind = "major collection (LOS
extend)";
+  }else if(gc_match_kind(gc, MARK_SWEEP_GC)){
+    gc_kind = " mark sweep collection.";
   }
   printf(" GC_kind: %s\n", gc_kind);
 }
@@ -253,4 +260,5 @@
 {
     printf(" %-14s:    %-7s |   Before %10d   |   After %10d   |\n", "hashcode", "NUM", gc_verifier->num_hash_before_gc,
gc_verifier->num_hash_after_gc);
 }
+
 

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=570028&r1=570027&r2=570028&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 Mon Aug 27 01:11:57
2007
@@ -22,10 +22,15 @@
 #include "../common/gc_common.h"
 #include "../common/gc_space.h"
 #include "../gen/gen.h"
+#include "../mark_sweep/gc_ms.h"
 #include "../common/space_tuner.h"
 #ifdef USE_32BITS_HASHCODE
 #include "../common/hashcode.h"
 #endif
+#ifdef USE_MARK_SWEEP_GC
+#include "../mark_sweep/sspace_mark_sweep.h"
+#endif
+#include "../common/gc_concurrent.h"
 
 struct Heap_Verifier;
 struct Allocation_Verifier;
@@ -113,6 +118,22 @@
   assert(p_obj);
   assert(uncompress_vt(obj_get_vt(p_obj)));
   assert(!address_belongs_to_gc_heap(uncompress_vt(obj_get_vt(p_obj)), (GC*)heap_verifier->gc));
+
+//ynhe
+
+#ifdef USE_MARK_SWEEP_GC
+  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))
+      printf("\nERROR: obj after GC should be set its alloc color!\n");
+  }else{
+    //ynhe
+    if(gc_mark_is_concurrent())
+      assert(obj_is_mark_black_in_table(p_obj));
+  }
+#endif
 }
 
 inline void verify_all_object_slot(REF* p_ref, Heap_Verifier* heap_verifier)

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_scanner.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_scanner.cpp?rev=570028&r1=570027&r2=570028&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_scanner.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verifier_scanner.cpp Mon Aug 27 01:11:57
2007
@@ -36,6 +36,7 @@
 static FORCE_INLINE void scan_object(Heap_Verifier* heap_verifier, Partial_Reveal_Object
*p_obj) 
 {
   GC_Verifier* gc_verifier = heap_verifier->gc_verifier;
+#ifndef USE_MARK_SWEEP_GC
   if(gc_verifier->is_before_fallback_collection) {
     if(obj_belongs_to_nos(p_obj) && obj_is_fw_in_oi(p_obj)){
       assert(obj_get_vt(p_obj) == obj_get_vt(obj_get_fw_in_oi(p_obj)));
@@ -43,6 +44,7 @@
       assert(p_obj);
     }
   }
+#endif
   if(!obj_mark_in_vt(p_obj)) return;
  
   verify_object_header(p_obj, heap_verifier); 
@@ -204,9 +206,10 @@
 
 void verifier_scan_resurrect_objects(Heap_Verifier* heap_verifier)
 {
-  GC_Gen* gc    =  (GC_Gen*)heap_verifier->gc;
+  GC* gc    =  heap_verifier->gc;
   Heap_Verifier_Metadata* verifier_metadata = heap_verifier->heap_verifier_metadata;
   verifier_update_info_before_resurrect(heap_verifier);
+  return;
 #ifndef BUILD_IN_REFERENT
   heap_verifier->gc_verifier->is_tracing_resurrect_obj = TRUE;
   if(heap_verifier->is_before_gc){
@@ -361,6 +364,7 @@
 
 void verifier_scan_all_objects(Heap_Verifier* heap_verifier)
 {
+#ifndef USE_MARK_SWEEP_GC
   GC_Gen* gc       = (GC_Gen*)heap_verifier->gc;
   Space* fspace     = gc_get_nos(gc);
   Space* mspace   = gc_get_mos(gc);
@@ -369,6 +373,9 @@
   verifier_scan_nos_mos_objects(fspace, heap_verifier);
   verifier_scan_nos_mos_objects(mspace, heap_verifier);
   verifier_scan_los_objects(lspace, heap_verifier);
+#else
+  assert(0);
+#endif
 }
 /*<--------all objects scanner end--------->*/
 
@@ -405,6 +412,7 @@
 
 void verifier_scan_unreachable_objects(Heap_Verifier* heap_verifier)
 {
+#ifndef USE_MARK_SWEEP_GC
   if(heap_verifier->is_before_gc) return;
   GC_Gen* gc       = (GC_Gen*)heap_verifier->gc;  
   Space* mspace   = gc_get_mos(gc);
@@ -412,7 +420,9 @@
   
   verifier_scan_mos_unreachable_objects(mspace, heap_verifier);
   verifier_scan_los_unreachable_objects(lspace, heap_verifier);
-
+#else
+  return;
+#endif
 }
 /*<--------unreachable objects scanner end------>*/
 
@@ -421,4 +431,5 @@
   heap_verifier->live_obj_scanner = verifier_scan_live_objects;
   heap_verifier->all_obj_scanner   = verifier_scan_all_objects;
 }
+
 

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=570028&r1=570027&r2=570028&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 Mon Aug 27 01:11:57
2007
@@ -17,6 +17,9 @@
 
 #include "verifier_common.h"
 #include "verify_gc_effect.h"
+#ifdef USE_MARK_SWEEP_GC
+#include "../mark_sweep/sspace_mark_sweep.h"
+#endif
 
 static POINTER_SIZE_INT hash_obj_distance = 0;
 
@@ -144,7 +147,7 @@
   GC_Verifier* gc_verifier = heap_verifier->gc_verifier;
   assert(obj_belongs_to_space(p_obj, (Space*)fspace));
   unsigned int forwarded_first_part;
-  if(!gc_verifier->gc_collect_kind == MINOR_COLLECTION  || !NOS_PARTIAL_FORWARD || heap_verifier->gc_is_gen_mode)
+  if(!(gc_verifier->gc_collect_kind == MINOR_COLLECTION) || !NOS_PARTIAL_FORWARD || heap_verifier->gc_is_gen_mode)
     forwarded_first_part = true;
   else
     forwarded_first_part = forward_first_half^1;
@@ -293,6 +296,7 @@
   Heap_Verifier_Metadata* verifier_metadata = heap_verifier->heap_verifier_metadata;
   GC_Verifier* gc_verifier = heap_verifier->gc_verifier;
 
+#ifndef USE_MARK_SWEEP_GC
   GC_Gen* gc = (GC_Gen*)heap_verifier->gc;
   Space* mspace = gc_get_mos(gc);
   Space* nspace = gc_get_nos(gc);
@@ -313,6 +317,20 @@
       }
     }
   }
+#else
+  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))
+      printf("\nERROR: obj after GC should be set its alloc color!\n");
+  }else{
+    //ynhe
+    if(gc_mark_is_concurrent())
+      assert(obj_is_mark_black_in_table(p_obj));
+  }
+#endif
+
    /*store the object information*/
   void* p_obj_information =  verifier_copy_obj_information(p_obj);
   void* obj_hash_info = verifier_copy_hashcode(p_obj, heap_verifier, heap_verifier->is_before_gc);
@@ -532,4 +550,5 @@
 
 void verifier_reset_hash_distance()
 { hash_obj_distance = 0;}
+
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_live_heap.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_live_heap.cpp?rev=570028&r1=570027&r2=570028&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_live_heap.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_live_heap.cpp Mon Aug 27 01:11:57
2007
@@ -115,7 +115,7 @@
 void event_gc_collect_kind_changed(GC* gc)
 {
   /*GC collection kind were changed from normal MINOR or MAJOR  to FALLBACK MAJOR*/
-  assert(gc->collect_kind == FALLBACK_COLLECTION);
+  assert(gc_match_kind(gc, FALLBACK_COLLECTION));
   if(!heap_verifier->need_verify_gc) return;
   
   /*finish the fallbacked gc verify*/
@@ -145,6 +145,7 @@
 
 Heap_Verifier* get_heap_verifier()
 { return heap_verifier; }
+
 
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_mutator_effect.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_mutator_effect.cpp?rev=570028&r1=570027&r2=570028&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_mutator_effect.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/verify/verify_mutator_effect.cpp Mon Aug 27
01:11:57 2007
@@ -330,7 +330,7 @@
 void verifier_mark_wb_slots(Heap_Verifier* heap_verifier)
 {
   GC_Gen* gc = (GC_Gen*)(heap_verifier->gc);
-  if(gc->collect_kind != MINOR_COLLECTION ||!gc_is_gen_mode()) return;
+  if(gc_match_kind((GC*)gc, MAJOR_COLLECTION) ||!gc_is_gen_mode()) return;
 
   GC_Metadata*gc_metadata = gc->metadata;
   Space* nspace  = gc_get_nos(gc);
@@ -363,7 +363,7 @@
 void verify_write_barrier(REF* p_ref, Heap_Verifier* heap_verifier)
 {
   GC_Gen* gc    = (GC_Gen*)heap_verifier->gc;
-  if(gc->collect_kind != MINOR_COLLECTION ||!gc_is_gen_mode()) return;
+  if(gc_match_kind((GC*)gc, MAJOR_COLLECTION) ||!gc_is_gen_mode()) return;
   
   Space* nspace  = gc_get_nos(gc);
   assert(address_belongs_to_gc_heap((void*)p_ref, (GC *) gc));
@@ -432,5 +432,6 @@
   if(heap_verifier->need_verify_allocation)  verify_allocation(heap_verifier);
 }
  
+
 
 



Mime
View raw message