changeset 55958:f6f95cb8643e

8222843: Print Shenandoah cset map addresses in hs_err Reviewed-by: rkennke
author shade
date Wed, 24 Apr 2019 11:39:56 +0200
parents 367d9cc2b35e
children 24eb7720919c
files src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.hpp src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.hpp	Sat Apr 20 15:55:07 2019 +0800
+++ b/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.hpp	Wed Apr 24 11:39:56 2019 +0200
@@ -88,6 +88,9 @@
   void clear();
 
 private:
+  jbyte* map_address() const {
+    return _cset_map;
+  }
   jbyte* biased_map_address() const {
     return _biased_cset_map;
   }
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Sat Apr 20 15:55:07 2019 +0800
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Wed Apr 24 11:39:56 2019 +0200
@@ -537,6 +537,15 @@
                p2i(reserved_region().start()),
                p2i(reserved_region().end()));
 
+  ShenandoahCollectionSet* cset = collection_set();
+  st->print_cr("Collection set:");
+  if (cset != NULL) {
+    st->print_cr(" - map (vanilla): " PTR_FORMAT, p2i(cset->map_address()));
+    st->print_cr(" - map (biased):  " PTR_FORMAT, p2i(cset->biased_map_address()));
+  } else {
+    st->print_cr(" (NULL)");
+  }
+
   st->cr();
   MetaspaceUtils::print_on(st);