8209758: 2 classes with same name G1PrintCollectionSetClosure cause crash when logging is enabled
Reviewed-by: tschatzl, kbarrett
--- a/src/hotspot/share/gc/g1/g1CollectionSet.cpp Tue Aug 21 14:14:28 2018 +0200
+++ b/src/hotspot/share/gc/g1/g1CollectionSet.cpp Tue Aug 21 13:17:29 2018 -0700
@@ -328,10 +328,10 @@
return cl.valid();
}
-class G1PrintCollectionSetClosure : public HeapRegionClosure {
+class G1PrintCollectionSetDetailClosure : public HeapRegionClosure {
outputStream* _st;
public:
- G1PrintCollectionSetClosure(outputStream* st) : HeapRegionClosure(), _st(st) { }
+ G1PrintCollectionSetDetailClosure(outputStream* st) : HeapRegionClosure(), _st(st) { }
virtual bool do_heap_region(HeapRegion* r) {
assert(r->in_collection_set(), "Region %u should be in collection set", r->hrm_index());
@@ -347,7 +347,7 @@
void G1CollectionSet::print(outputStream* st) {
st->print_cr("\nCollection_set:");
- G1PrintCollectionSetClosure cl(st);
+ G1PrintCollectionSetDetailClosure cl(st);
iterate(&cl);
}
#endif // !PRODUCT