6631 return 0; |
6631 return 0; |
6632 } |
6632 } |
6633 if (_bitMap->isMarked(addr)) { |
6633 if (_bitMap->isMarked(addr)) { |
6634 // it's marked; is it potentially uninitialized? |
6634 // it's marked; is it potentially uninitialized? |
6635 if (p->klass_or_null() != NULL) { |
6635 if (p->klass_or_null() != NULL) { |
6636 if (CMSPermGenPrecleaningEnabled && !p->is_parsable()) { |
6636 // If is_conc_safe is false, the object may be undergoing |
|
6637 // change by the VM outside a safepoint. Don't try to |
|
6638 // scan it, but rather leave it for the remark phase. |
|
6639 if (CMSPermGenPrecleaningEnabled && |
|
6640 (!p->is_conc_safe() || !p->is_parsable())) { |
6637 // Signal precleaning to redirty the card since |
6641 // Signal precleaning to redirty the card since |
6638 // the klass pointer is already installed. |
6642 // the klass pointer is already installed. |
6639 assert(size == 0, "Initial value"); |
6643 assert(size == 0, "Initial value"); |
6640 } else { |
6644 } else { |
6641 assert(p->is_parsable(), "must be parsable."); |
6645 assert(p->is_parsable(), "must be parsable."); |
8069 "alignment problem"); |
8073 "alignment problem"); |
8070 |
8074 |
8071 #ifdef DEBUG |
8075 #ifdef DEBUG |
8072 if (oop(addr)->klass_or_null() != NULL && |
8076 if (oop(addr)->klass_or_null() != NULL && |
8073 ( !_collector->should_unload_classes() |
8077 ( !_collector->should_unload_classes() |
8074 || oop(addr)->is_parsable())) { |
8078 || (oop(addr)->is_parsable()) && |
|
8079 oop(addr)->is_conc_safe())) { |
8075 // Ignore mark word because we are running concurrent with mutators |
8080 // Ignore mark word because we are running concurrent with mutators |
8076 assert(oop(addr)->is_oop(true), "live block should be an oop"); |
8081 assert(oop(addr)->is_oop(true), "live block should be an oop"); |
|
8082 // is_conc_safe is checked before performing this assertion |
|
8083 // because an object that is not is_conc_safe may yet have |
|
8084 // the return from size() correct. |
8077 assert(size == |
8085 assert(size == |
8078 CompactibleFreeListSpace::adjustObjectSize(oop(addr)->size()), |
8086 CompactibleFreeListSpace::adjustObjectSize(oop(addr)->size()), |
8079 "P-mark and computed size do not agree"); |
8087 "P-mark and computed size do not agree"); |
8080 } |
8088 } |
8081 #endif |
8089 #endif |
8084 // This should be an initialized object that's alive. |
8092 // This should be an initialized object that's alive. |
8085 assert(oop(addr)->klass_or_null() != NULL && |
8093 assert(oop(addr)->klass_or_null() != NULL && |
8086 (!_collector->should_unload_classes() |
8094 (!_collector->should_unload_classes() |
8087 || oop(addr)->is_parsable()), |
8095 || oop(addr)->is_parsable()), |
8088 "Should be an initialized object"); |
8096 "Should be an initialized object"); |
|
8097 // Note that there are objects used during class redefinition |
|
8098 // (e.g., merge_cp in VM_RedefineClasses::merge_cp_and_rewrite() |
|
8099 // which are discarded with their is_conc_safe state still |
|
8100 // false. These object may be floating garbage so may be |
|
8101 // seen here. If they are floating garbage their size |
|
8102 // should be attainable from their klass. Do not that |
|
8103 // is_conc_safe() is true for oop(addr). |
8089 // Ignore mark word because we are running concurrent with mutators |
8104 // Ignore mark word because we are running concurrent with mutators |
8090 assert(oop(addr)->is_oop(true), "live block should be an oop"); |
8105 assert(oop(addr)->is_oop(true), "live block should be an oop"); |
8091 // Verify that the bit map has no bits marked between |
8106 // Verify that the bit map has no bits marked between |
8092 // addr and purported end of this block. |
8107 // addr and purported end of this block. |
8093 size = CompactibleFreeListSpace::adjustObjectSize(oop(addr)->size()); |
8108 size = CompactibleFreeListSpace::adjustObjectSize(oop(addr)->size()); |