< prev index next >

src/hotspot/share/oops/klass.cpp

Print this page

        

@@ -632,33 +632,33 @@
   assert(DumpSharedSpaces, "called only during runtime");
   _archived_mirror = CompressedOops::encode(m);
 }
 #endif // INCLUDE_CDS_JAVA_HEAP
 
-Klass* Klass::array_klass_or_null(int rank) {
+Klass* Klass::array_klass_or_null(ArrayStorageProperties storage_props, int rank) {
   EXCEPTION_MARK;
   // No exception can be thrown by array_klass_impl when called with or_null == true.
   // (In anycase, the execption mark will fail if it do so)
-  return array_klass_impl(true, rank, THREAD);
+  return array_klass_impl(storage_props, true, rank, THREAD);
 }
 
 
-Klass* Klass::array_klass_or_null() {
+Klass* Klass::array_klass_or_null(ArrayStorageProperties storage_props) {
   EXCEPTION_MARK;
   // No exception can be thrown by array_klass_impl when called with or_null == true.
   // (In anycase, the execption mark will fail if it do so)
-  return array_klass_impl(true, THREAD);
+  return array_klass_impl(storage_props, true, THREAD);
 }
 
 
-Klass* Klass::array_klass_impl(bool or_null, int rank, TRAPS) {
+Klass* Klass::array_klass_impl(ArrayStorageProperties storage_props, bool or_null, int rank, TRAPS) {
   fatal("array_klass should be dispatched to InstanceKlass, ObjArrayKlass or TypeArrayKlass");
   return NULL;
 }
 
 
-Klass* Klass::array_klass_impl(bool or_null, TRAPS) {
+Klass* Klass::array_klass_impl(ArrayStorageProperties storage_props, bool or_null, TRAPS) {
   fatal("array_klass should be dispatched to InstanceKlass, ObjArrayKlass or TypeArrayKlass");
   return NULL;
 }
 
 void Klass::check_array_allocation_length(int length, int max_length, TRAPS) {

@@ -746,10 +746,20 @@
      // print header
      obj->mark()->print_on(st);
      st->cr();
      st->print(BULLET"prototype_header: " INTPTR_FORMAT, p2i(_prototype_header));
      st->cr();
+     ArrayStorageProperties props = obj->array_storage_properties();
+     if (props.value() != 0) {
+       st->print(" - array storage properties: ");
+       if (props.is_flattened()) {
+         st->print(" flat");
+       }
+       if (props.is_null_free()) {
+         st->print(" non nullable");
+       }
+     }
   }
 
   // print class
   st->print(BULLET"klass: ");
   obj->klass()->print_value_on(st);
< prev index next >