Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @ 9152:f36e073d56a4
7104565: trim jprt build targets
Summary: remove JPRT debug builds, remove -DDEBUG -DFASTDEBUG and use ASSERT instead in sources
Reviewed-by: dholmes, kvn, coleenp
author | drchase |
---|---|
date | Fri, 12 Apr 2013 15:53:30 -0700 |
parents | 7b835924c31c |
children | ebded0261dfc |
comparison
equal
deleted
inserted
replaced
9150:b8b081e53312 | 9152:f36e073d56a4 |
---|---|
6919 // A non-array may have been imprecisely marked; we need | 6919 // A non-array may have been imprecisely marked; we need |
6920 // to scan object in its entirety. | 6920 // to scan object in its entirety. |
6921 size = CompactibleFreeListSpace::adjustObjectSize( | 6921 size = CompactibleFreeListSpace::adjustObjectSize( |
6922 p->oop_iterate(_scanningClosure)); | 6922 p->oop_iterate(_scanningClosure)); |
6923 } | 6923 } |
6924 #ifdef DEBUG | 6924 #ifdef ASSERT |
6925 size_t direct_size = | 6925 size_t direct_size = |
6926 CompactibleFreeListSpace::adjustObjectSize(p->size()); | 6926 CompactibleFreeListSpace::adjustObjectSize(p->size()); |
6927 assert(size == direct_size, "Inconsistency in size"); | 6927 assert(size == direct_size, "Inconsistency in size"); |
6928 assert(size >= 3, "Necessary for Printezis marks to work"); | 6928 assert(size >= 3, "Necessary for Printezis marks to work"); |
6929 if (!_bitMap->isMarked(addr+1)) { | 6929 if (!_bitMap->isMarked(addr+1)) { |
6931 } else { | 6931 } else { |
6932 _bitMap->verifyNoOneBitsInRange(addr+2, addr+size-1); | 6932 _bitMap->verifyNoOneBitsInRange(addr+2, addr+size-1); |
6933 assert(_bitMap->isMarked(addr+size-1), | 6933 assert(_bitMap->isMarked(addr+size-1), |
6934 "inconsistent Printezis mark"); | 6934 "inconsistent Printezis mark"); |
6935 } | 6935 } |
6936 #endif // DEBUG | 6936 #endif // ASSERT |
6937 } else { | 6937 } else { |
6938 // an unitialized object | 6938 // an unitialized object |
6939 assert(_bitMap->isMarked(addr+1), "missing Printezis mark?"); | 6939 assert(_bitMap->isMarked(addr+1), "missing Printezis mark?"); |
6940 HeapWord* nextOneAddr = _bitMap->getNextMarkedWordAddress(addr + 2); | 6940 HeapWord* nextOneAddr = _bitMap->getNextMarkedWordAddress(addr + 2); |
6941 size = pointer_delta(nextOneAddr + 1, addr); | 6941 size = pointer_delta(nextOneAddr + 1, addr); |
7073 // Ignore mark word because we are running concurrent with mutators | 7073 // Ignore mark word because we are running concurrent with mutators |
7074 assert(p->is_oop_or_null(true), "expected an oop or null"); | 7074 assert(p->is_oop_or_null(true), "expected an oop or null"); |
7075 HeapWord* addr = (HeapWord*)p; | 7075 HeapWord* addr = (HeapWord*)p; |
7076 assert(_span.contains(addr), "we are scanning the CMS generation"); | 7076 assert(_span.contains(addr), "we are scanning the CMS generation"); |
7077 bool is_obj_array = false; | 7077 bool is_obj_array = false; |
7078 #ifdef DEBUG | 7078 #ifdef ASSERT |
7079 if (!_parallel) { | 7079 if (!_parallel) { |
7080 assert(_mark_stack->isEmpty(), "pre-condition (eager drainage)"); | 7080 assert(_mark_stack->isEmpty(), "pre-condition (eager drainage)"); |
7081 assert(_collector->overflow_list_is_empty(), | 7081 assert(_collector->overflow_list_is_empty(), |
7082 "overflow list should be empty"); | 7082 "overflow list should be empty"); |
7083 | 7083 |
7084 } | 7084 } |
7085 #endif // DEBUG | 7085 #endif // ASSERT |
7086 if (_bit_map->isMarked(addr)) { | 7086 if (_bit_map->isMarked(addr)) { |
7087 // Obj arrays are precisely marked, non-arrays are not; | 7087 // Obj arrays are precisely marked, non-arrays are not; |
7088 // so we scan objArrays precisely and non-arrays in their | 7088 // so we scan objArrays precisely and non-arrays in their |
7089 // entirety. | 7089 // entirety. |
7090 if (p->is_objArray()) { | 7090 if (p->is_objArray()) { |
7100 } else { | 7100 } else { |
7101 p->oop_iterate(_scan_closure); | 7101 p->oop_iterate(_scan_closure); |
7102 } | 7102 } |
7103 } | 7103 } |
7104 } | 7104 } |
7105 #ifdef DEBUG | 7105 #ifdef ASSERT |
7106 if (!_parallel) { | 7106 if (!_parallel) { |
7107 assert(_mark_stack->isEmpty(), "post-condition (eager drainage)"); | 7107 assert(_mark_stack->isEmpty(), "post-condition (eager drainage)"); |
7108 assert(_collector->overflow_list_is_empty(), | 7108 assert(_collector->overflow_list_is_empty(), |
7109 "overflow list should be empty"); | 7109 "overflow list should be empty"); |
7110 | 7110 |
7111 } | 7111 } |
7112 #endif // DEBUG | 7112 #endif // ASSERT |
7113 return is_obj_array; | 7113 return is_obj_array; |
7114 } | 7114 } |
7115 | 7115 |
7116 MarkFromRootsClosure::MarkFromRootsClosure(CMSCollector* collector, | 7116 MarkFromRootsClosure::MarkFromRootsClosure(CMSCollector* collector, |
7117 MemRegion span, | 7117 MemRegion span, |
8318 HeapWord* nextOneAddr = _bitMap->getNextMarkedWordAddress(addr + 2); | 8318 HeapWord* nextOneAddr = _bitMap->getNextMarkedWordAddress(addr + 2); |
8319 size = pointer_delta(nextOneAddr + 1, addr); | 8319 size = pointer_delta(nextOneAddr + 1, addr); |
8320 assert(size == CompactibleFreeListSpace::adjustObjectSize(size), | 8320 assert(size == CompactibleFreeListSpace::adjustObjectSize(size), |
8321 "alignment problem"); | 8321 "alignment problem"); |
8322 | 8322 |
8323 #ifdef DEBUG | 8323 #ifdef ASSERT |
8324 if (oop(addr)->klass_or_null() != NULL) { | 8324 if (oop(addr)->klass_or_null() != NULL) { |
8325 // Ignore mark word because we are running concurrent with mutators | 8325 // Ignore mark word because we are running concurrent with mutators |
8326 assert(oop(addr)->is_oop(true), "live block should be an oop"); | 8326 assert(oop(addr)->is_oop(true), "live block should be an oop"); |
8327 assert(size == | 8327 assert(size == |
8328 CompactibleFreeListSpace::adjustObjectSize(oop(addr)->size()), | 8328 CompactibleFreeListSpace::adjustObjectSize(oop(addr)->size()), |