8209958: Clean up duplicate basic array type statics in Universe
authorcoleenp
Tue, 28 Aug 2018 18:17:01 -0400
changeset 51554 5b0d86499960
parent 51552 2c7a508ee1f4
child 51555 7e1f4a215b45
8209958: Clean up duplicate basic array type statics in Universe Reviewed-by: lfoltan, zgu
src/hotspot/share/ci/ciObjectFactory.cpp
src/hotspot/share/ci/ciReplay.cpp
src/hotspot/share/memory/heapInspection.cpp
src/hotspot/share/memory/metaspaceShared.cpp
src/hotspot/share/memory/oopFactory.hpp
src/hotspot/share/memory/universe.cpp
src/hotspot/share/memory/universe.hpp
src/hotspot/share/oops/typeArrayKlass.hpp
src/hotspot/share/prims/jni.cpp
src/hotspot/share/runtime/vmStructs.cpp
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/Universe.java
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
test/hotspot/jtreg/serviceability/sa/ClhsdbPrintStatics.java
--- a/src/hotspot/share/ci/ciObjectFactory.cpp	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/hotspot/share/ci/ciObjectFactory.cpp	Tue Aug 28 18:17:01 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -185,7 +185,7 @@
 
   get_metadata(Universe::boolArrayKlassObj());
   get_metadata(Universe::charArrayKlassObj());
-  get_metadata(Universe::singleArrayKlassObj());
+  get_metadata(Universe::floatArrayKlassObj());
   get_metadata(Universe::doubleArrayKlassObj());
   get_metadata(Universe::byteArrayKlassObj());
   get_metadata(Universe::shortArrayKlassObj());
--- a/src/hotspot/share/ci/ciReplay.cpp	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/hotspot/share/ci/ciReplay.cpp	Tue Aug 28 18:17:01 2018 -0400
@@ -809,7 +809,7 @@
         } else if (strcmp(field_signature, "[S") == 0) {
           value = oopFactory::new_shortArray(length, CHECK);
         } else if (strcmp(field_signature, "[F") == 0) {
-          value = oopFactory::new_singleArray(length, CHECK);
+          value = oopFactory::new_floatArray(length, CHECK);
         } else if (strcmp(field_signature, "[D") == 0) {
           value = oopFactory::new_doubleArray(length, CHECK);
         } else if (strcmp(field_signature, "[I") == 0) {
--- a/src/hotspot/share/memory/heapInspection.cpp	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/hotspot/share/memory/heapInspection.cpp	Tue Aug 28 18:17:01 2018 -0400
@@ -88,7 +88,7 @@
   } else {
     if (_klass == Universe::boolArrayKlassObj())         name = "<boolArrayKlass>";         else
     if (_klass == Universe::charArrayKlassObj())         name = "<charArrayKlass>";         else
-    if (_klass == Universe::singleArrayKlassObj())       name = "<singleArrayKlass>";       else
+    if (_klass == Universe::floatArrayKlassObj())        name = "<floatArrayKlass>";        else
     if (_klass == Universe::doubleArrayKlassObj())       name = "<doubleArrayKlass>";       else
     if (_klass == Universe::byteArrayKlassObj())         name = "<byteArrayKlass>";         else
     if (_klass == Universe::shortArrayKlassObj())        name = "<shortArrayKlass>";        else
--- a/src/hotspot/share/memory/metaspaceShared.cpp	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/hotspot/share/memory/metaspaceShared.cpp	Tue Aug 28 18:17:01 2018 -0400
@@ -412,7 +412,7 @@
   soc->do_tag(sizeof(Symbol));
 
   // Dump/restore miscellaneous metadata.
-  Universe::serialize(soc, true);
+  Universe::serialize(soc);
   soc->do_tag(--tag);
 
   // Dump/restore references to commonly used names and signatures.
--- a/src/hotspot/share/memory/oopFactory.hpp	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/hotspot/share/memory/oopFactory.hpp	Tue Aug 28 18:17:01 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
   // Basic type leaf array allocation
   static typeArrayOop    new_boolArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::boolArrayKlassObj  ())->allocate(length, THREAD); }
   static typeArrayOop    new_charArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::charArrayKlassObj  ())->allocate(length, THREAD); }
-  static typeArrayOop    new_singleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::singleArrayKlassObj())->allocate(length, THREAD); }
+  static typeArrayOop    new_floatArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::floatArrayKlassObj())->allocate(length, THREAD); }
   static typeArrayOop    new_doubleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::doubleArrayKlassObj())->allocate(length, THREAD); }
   static typeArrayOop    new_byteArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::byteArrayKlassObj  ())->allocate(length, THREAD); }
   static typeArrayOop    new_shortArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::shortArrayKlassObj ())->allocate(length, THREAD); }
--- a/src/hotspot/share/memory/universe.cpp	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/hotspot/share/memory/universe.cpp	Tue Aug 28 18:17:01 2018 -0400
@@ -83,16 +83,8 @@
 #include "utilities/preserveException.hpp"
 
 // Known objects
-Klass* Universe::_boolArrayKlassObj                 = NULL;
-Klass* Universe::_byteArrayKlassObj                 = NULL;
-Klass* Universe::_charArrayKlassObj                 = NULL;
-Klass* Universe::_intArrayKlassObj                  = NULL;
-Klass* Universe::_shortArrayKlassObj                = NULL;
-Klass* Universe::_longArrayKlassObj                 = NULL;
-Klass* Universe::_singleArrayKlassObj               = NULL;
-Klass* Universe::_doubleArrayKlassObj               = NULL;
-Klass* Universe::_typeArrayKlassObjs[T_VOID+1]      = { NULL /*, NULL...*/ };
-Klass* Universe::_objectArrayKlassObj               = NULL;
+Klass* Universe::_typeArrayKlassObjs[T_LONG+1]        = { NULL /*, NULL...*/ };
+Klass* Universe::_objectArrayKlassObj                 = NULL;
 oop Universe::_int_mirror                             = NULL;
 oop Universe::_float_mirror                           = NULL;
 oop Universe::_double_mirror                          = NULL;
@@ -176,7 +168,7 @@
   }
 }
 
-void Universe::oops_do(OopClosure* f, bool do_all) {
+void Universe::oops_do(OopClosure* f) {
 
   f->do_oop((oop*) &_int_mirror);
   f->do_oop((oop*) &_float_mirror);
@@ -220,15 +212,7 @@
 }
 
 void Universe::metaspace_pointers_do(MetaspaceClosure* it) {
-  it->push(&_boolArrayKlassObj);
-  it->push(&_byteArrayKlassObj);
-  it->push(&_charArrayKlassObj);
-  it->push(&_intArrayKlassObj);
-  it->push(&_shortArrayKlassObj);
-  it->push(&_longArrayKlassObj);
-  it->push(&_singleArrayKlassObj);
-  it->push(&_doubleArrayKlassObj);
-  for (int i = 0; i < T_VOID+1; i++) {
+  for (int i = 0; i < T_LONG+1; i++) {
     it->push(&_typeArrayKlassObjs[i]);
   }
   it->push(&_objectArrayKlassObj);
@@ -248,29 +232,13 @@
 }
 
 // Serialize metadata and pointers to primitive type mirrors in and out of CDS archive
-void Universe::serialize(SerializeClosure* f, bool do_all) {
+void Universe::serialize(SerializeClosure* f) {
 
-  f->do_ptr((void**)&_boolArrayKlassObj);
-  f->do_ptr((void**)&_byteArrayKlassObj);
-  f->do_ptr((void**)&_charArrayKlassObj);
-  f->do_ptr((void**)&_intArrayKlassObj);
-  f->do_ptr((void**)&_shortArrayKlassObj);
-  f->do_ptr((void**)&_longArrayKlassObj);
-  f->do_ptr((void**)&_singleArrayKlassObj);
-  f->do_ptr((void**)&_doubleArrayKlassObj);
-  f->do_ptr((void**)&_objectArrayKlassObj);
-
-  {
-    for (int i = 0; i < T_VOID+1; i++) {
-      if (_typeArrayKlassObjs[i] != NULL) {
-        assert(i >= T_BOOLEAN, "checking");
-        f->do_ptr((void**)&_typeArrayKlassObjs[i]);
-      } else if (do_all) {
-        f->do_ptr((void**)&_typeArrayKlassObjs[i]);
-      }
-    }
+  for (int i = 0; i < T_LONG+1; i++) {
+    f->do_ptr((void**)&_typeArrayKlassObjs[i]);
   }
 
+  f->do_ptr((void**)&_objectArrayKlassObj);
 #if INCLUDE_CDS_JAVA_HEAP
   // The mirrors are NULL if MetaspaceShared::is_heap_object_archiving_allowed
   // is false.
@@ -333,23 +301,9 @@
       compute_base_vtable_size();
 
       if (!UseSharedSpaces) {
-        _boolArrayKlassObj      = TypeArrayKlass::create_klass(T_BOOLEAN, sizeof(jboolean), CHECK);
-        _charArrayKlassObj      = TypeArrayKlass::create_klass(T_CHAR,    sizeof(jchar),    CHECK);
-        _singleArrayKlassObj    = TypeArrayKlass::create_klass(T_FLOAT,   sizeof(jfloat),   CHECK);
-        _doubleArrayKlassObj    = TypeArrayKlass::create_klass(T_DOUBLE,  sizeof(jdouble),  CHECK);
-        _byteArrayKlassObj      = TypeArrayKlass::create_klass(T_BYTE,    sizeof(jbyte),    CHECK);
-        _shortArrayKlassObj     = TypeArrayKlass::create_klass(T_SHORT,   sizeof(jshort),   CHECK);
-        _intArrayKlassObj       = TypeArrayKlass::create_klass(T_INT,     sizeof(jint),     CHECK);
-        _longArrayKlassObj      = TypeArrayKlass::create_klass(T_LONG,    sizeof(jlong),    CHECK);
-
-        _typeArrayKlassObjs[T_BOOLEAN] = _boolArrayKlassObj;
-        _typeArrayKlassObjs[T_CHAR]    = _charArrayKlassObj;
-        _typeArrayKlassObjs[T_FLOAT]   = _singleArrayKlassObj;
-        _typeArrayKlassObjs[T_DOUBLE]  = _doubleArrayKlassObj;
-        _typeArrayKlassObjs[T_BYTE]    = _byteArrayKlassObj;
-        _typeArrayKlassObjs[T_SHORT]   = _shortArrayKlassObj;
-        _typeArrayKlassObjs[T_INT]     = _intArrayKlassObj;
-        _typeArrayKlassObjs[T_LONG]    = _longArrayKlassObj;
+        for (int i = T_BOOLEAN; i < T_LONG+1; i++) {
+          _typeArrayKlassObjs[i] = TypeArrayKlass::create_klass((BasicType)i, CHECK);
+        }
 
         ClassLoaderData* null_cld = ClassLoaderData::the_null_class_loader_data();
 
@@ -389,7 +343,7 @@
 
     initialize_basic_type_klass(boolArrayKlassObj(), CHECK);
     initialize_basic_type_klass(charArrayKlassObj(), CHECK);
-    initialize_basic_type_klass(singleArrayKlassObj(), CHECK);
+    initialize_basic_type_klass(floatArrayKlassObj(), CHECK);
     initialize_basic_type_klass(doubleArrayKlassObj(), CHECK);
     initialize_basic_type_klass(byteArrayKlassObj(), CHECK);
     initialize_basic_type_klass(shortArrayKlassObj(), CHECK);
--- a/src/hotspot/share/memory/universe.hpp	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/hotspot/share/memory/universe.hpp	Tue Aug 28 18:17:01 2018 -0400
@@ -112,16 +112,7 @@
 
  private:
   // Known classes in the VM
-  static Klass* _boolArrayKlassObj;
-  static Klass* _byteArrayKlassObj;
-  static Klass* _charArrayKlassObj;
-  static Klass* _intArrayKlassObj;
-  static Klass* _shortArrayKlassObj;
-  static Klass* _longArrayKlassObj;
-  static Klass* _singleArrayKlassObj;
-  static Klass* _doubleArrayKlassObj;
-  static Klass* _typeArrayKlassObjs[T_VOID+1];
-
+  static Klass* _typeArrayKlassObjs[T_LONG+1];
   static Klass* _objectArrayKlassObj;
 
   // Known objects in the VM
@@ -270,21 +261,20 @@
 
  public:
   // Known classes in the VM
-  static Klass* boolArrayKlassObj()                 { return _boolArrayKlassObj;   }
-  static Klass* byteArrayKlassObj()                 { return _byteArrayKlassObj;   }
-  static Klass* charArrayKlassObj()                 { return _charArrayKlassObj;   }
-  static Klass* intArrayKlassObj()                  { return _intArrayKlassObj;    }
-  static Klass* shortArrayKlassObj()                { return _shortArrayKlassObj;  }
-  static Klass* longArrayKlassObj()                 { return _longArrayKlassObj;   }
-  static Klass* singleArrayKlassObj()               { return _singleArrayKlassObj; }
-  static Klass* doubleArrayKlassObj()               { return _doubleArrayKlassObj; }
+  static Klass* boolArrayKlassObj()                 { return typeArrayKlassObj(T_BOOLEAN); }
+  static Klass* byteArrayKlassObj()                 { return typeArrayKlassObj(T_BYTE); }
+  static Klass* charArrayKlassObj()                 { return typeArrayKlassObj(T_CHAR); }
+  static Klass* intArrayKlassObj()                  { return typeArrayKlassObj(T_INT); }
+  static Klass* shortArrayKlassObj()                { return typeArrayKlassObj(T_SHORT); }
+  static Klass* longArrayKlassObj()                 { return typeArrayKlassObj(T_LONG); }
+  static Klass* floatArrayKlassObj()                { return typeArrayKlassObj(T_FLOAT); }
+  static Klass* doubleArrayKlassObj()               { return typeArrayKlassObj(T_DOUBLE); }
 
-  static Klass* objectArrayKlassObj() {
-    return _objectArrayKlassObj;
-  }
+  static Klass* objectArrayKlassObj()               { return _objectArrayKlassObj; }
 
   static Klass* typeArrayKlassObj(BasicType t) {
-    assert((uint)t < T_VOID+1, "range check for type: %s", type2name(t));
+    assert((uint)t >= T_BOOLEAN, "range check for type: %s", type2name(t));
+    assert((uint)t < T_LONG+1,   "range check for type: %s", type2name(t));
     assert(_typeArrayKlassObjs[t] != NULL, "domain check");
     return _typeArrayKlassObjs[t];
   }
@@ -375,17 +365,6 @@
   static oop out_of_memory_error_realloc_objects()    { return gen_out_of_memory_error(_out_of_memory_error_realloc_objects);  }
   static oop delayed_stack_overflow_error_message()   { return _delayed_stack_overflow_error_message; }
 
-  // Accessors needed for fast allocation
-  static Klass** boolArrayKlassObj_addr()           { return &_boolArrayKlassObj;   }
-  static Klass** byteArrayKlassObj_addr()           { return &_byteArrayKlassObj;   }
-  static Klass** charArrayKlassObj_addr()           { return &_charArrayKlassObj;   }
-  static Klass** intArrayKlassObj_addr()            { return &_intArrayKlassObj;    }
-  static Klass** shortArrayKlassObj_addr()          { return &_shortArrayKlassObj;  }
-  static Klass** longArrayKlassObj_addr()           { return &_longArrayKlassObj;   }
-  static Klass** singleArrayKlassObj_addr()         { return &_singleArrayKlassObj; }
-  static Klass** doubleArrayKlassObj_addr()         { return &_doubleArrayKlassObj; }
-  static Klass** objectArrayKlassObj_addr()         { return &_objectArrayKlassObj; }
-
   // The particular choice of collected heap.
   static CollectedHeap* heap() { return _collectedHeap; }
 
@@ -478,10 +457,10 @@
 
   // Apply "f" to the addresses of all the direct heap pointers maintained
   // as static fields of "Universe".
-  static void oops_do(OopClosure* f, bool do_all = false);
+  static void oops_do(OopClosure* f);
 
   // CDS support
-  static void serialize(SerializeClosure* f, bool do_all = false);
+  static void serialize(SerializeClosure* f);
 
   // Apply "f" to all klasses for basic types (classes not present in
   // SystemDictionary).
--- a/src/hotspot/share/oops/typeArrayKlass.hpp	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/hotspot/share/oops/typeArrayKlass.hpp	Tue Aug 28 18:17:01 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,10 +56,8 @@
   // klass allocation
   static TypeArrayKlass* create_klass(BasicType type, const char* name_str,
                                TRAPS);
-  static inline Klass* create_klass(BasicType type, int scale, TRAPS) {
-    TypeArrayKlass* tak = create_klass(type, external_name(type), CHECK_NULL);
-    assert(scale == (1 << tak->log2_element_size()), "scale must check out");
-    return tak;
+  static TypeArrayKlass* create_klass(BasicType type, TRAPS) {
+    return create_klass(type, external_name(type), THREAD);
   }
 
   int oop_size(oop obj) const;
--- a/src/hotspot/share/prims/jni.cpp	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/hotspot/share/prims/jni.cpp	Tue Aug 28 18:17:01 2018 -0400
@@ -2687,7 +2687,7 @@
 DEFINE_NEWSCALARARRAY(jlongArray,    new_longArray,   Long,
                       HOTSPOT_JNI_NEWLONGARRAY_ENTRY(env, len),
                       HOTSPOT_JNI_NEWLONGARRAY_RETURN(_ret_ref))
-DEFINE_NEWSCALARARRAY(jfloatArray,   new_singleArray, Float,
+DEFINE_NEWSCALARARRAY(jfloatArray,   new_floatArray,  Float,
                       HOTSPOT_JNI_NEWFLOATARRAY_ENTRY(env, len),
                       HOTSPOT_JNI_NEWFLOATARRAY_RETURN(_ret_ref))
 DEFINE_NEWSCALARARRAY(jdoubleArray,  new_doubleArray, Double,
--- a/src/hotspot/share/runtime/vmStructs.cpp	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/hotspot/share/runtime/vmStructs.cpp	Tue Aug 28 18:17:01 2018 -0400
@@ -372,14 +372,6 @@
   /* Universe */                                                                                                                     \
   /************/                                                                                                                     \
                                                                                                                                      \
-     static_field(Universe,                    _boolArrayKlassObj,                            Klass*)                                \
-     static_field(Universe,                    _byteArrayKlassObj,                            Klass*)                                \
-     static_field(Universe,                    _charArrayKlassObj,                            Klass*)                                \
-     static_field(Universe,                    _intArrayKlassObj,                             Klass*)                                \
-     static_field(Universe,                    _shortArrayKlassObj,                           Klass*)                                \
-     static_field(Universe,                    _longArrayKlassObj,                            Klass*)                                \
-     static_field(Universe,                    _singleArrayKlassObj,                          Klass*)                                \
-     static_field(Universe,                    _doubleArrayKlassObj,                          Klass*)                                \
      static_field(Universe,                    _mirrors[0],                                   oop)                                   \
      static_field(Universe,                    _main_thread_group,                            oop)                                   \
      static_field(Universe,                    _system_thread_group,                          oop)                                   \
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/Universe.java	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/Universe.java	Tue Aug 28 18:17:01 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,16 +53,6 @@
   private static sun.jvm.hotspot.types.OopField mainThreadGroupField;
   private static sun.jvm.hotspot.types.OopField systemThreadGroupField;
 
-  // single dimensional primitive array klasses
-  private static sun.jvm.hotspot.types.AddressField boolArrayKlassField;
-  private static sun.jvm.hotspot.types.AddressField byteArrayKlassField;
-  private static sun.jvm.hotspot.types.AddressField charArrayKlassField;
-  private static sun.jvm.hotspot.types.AddressField intArrayKlassField;
-  private static sun.jvm.hotspot.types.AddressField shortArrayKlassField;
-  private static sun.jvm.hotspot.types.AddressField longArrayKlassField;
-  private static sun.jvm.hotspot.types.AddressField singleArrayKlassField;
-  private static sun.jvm.hotspot.types.AddressField doubleArrayKlassField;
-
   private static AddressField narrowOopBaseField;
   private static CIntegerField narrowOopShiftField;
   private static AddressField narrowKlassBaseField;
@@ -114,15 +104,6 @@
     mainThreadGroupField   = type.getOopField("_main_thread_group");
     systemThreadGroupField = type.getOopField("_system_thread_group");
 
-    boolArrayKlassField      = type.getAddressField("_boolArrayKlassObj");
-    byteArrayKlassField      = type.getAddressField("_byteArrayKlassObj");
-    charArrayKlassField      = type.getAddressField("_charArrayKlassObj");
-    intArrayKlassField       = type.getAddressField("_intArrayKlassObj");
-    shortArrayKlassField     = type.getAddressField("_shortArrayKlassObj");
-    longArrayKlassField      = type.getAddressField("_longArrayKlassObj");
-    singleArrayKlassField    = type.getAddressField("_singleArrayKlassObj");
-    doubleArrayKlassField    = type.getAddressField("_doubleArrayKlassObj");
-
     narrowOopBaseField = type.getAddressField("_narrow_oop._base");
     narrowOopShiftField = type.getCIntegerField("_narrow_oop._shift");
     narrowKlassBaseField = type.getAddressField("_narrow_klass._base");
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java	Tue Aug 28 18:03:33 2018 -0400
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java	Tue Aug 28 18:17:01 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,53 +50,6 @@
     DEBUG = System.getProperty("sun.jvm.hotspot.oops.ObjectHeap.DEBUG") != null;
   }
 
-  private Address              boolArrayKlassHandle;
-  private Address              byteArrayKlassHandle;
-  private Address              charArrayKlassHandle;
-  private Address              intArrayKlassHandle;
-  private Address              shortArrayKlassHandle;
-  private Address              longArrayKlassHandle;
-  private Address              singleArrayKlassHandle;
-  private Address              doubleArrayKlassHandle;
-
-  private TypeArrayKlass         boolArrayKlassObj;
-  private TypeArrayKlass         byteArrayKlassObj;
-  private TypeArrayKlass         charArrayKlassObj;
-  private TypeArrayKlass         intArrayKlassObj;
-  private TypeArrayKlass         shortArrayKlassObj;
-  private TypeArrayKlass         longArrayKlassObj;
-  private TypeArrayKlass         singleArrayKlassObj;
-  private TypeArrayKlass         doubleArrayKlassObj;
-
-  public void initialize(TypeDataBase db) throws WrongTypeException {
-    // Lookup the roots in the object hierarchy.
-    Type universeType = db.lookupType("Universe");
-
-    boolArrayKlassHandle      = universeType.getAddressField("_boolArrayKlassObj").getValue();
-    boolArrayKlassObj         = new TypeArrayKlass(boolArrayKlassHandle);
-
-    byteArrayKlassHandle      = universeType.getAddressField("_byteArrayKlassObj").getValue();
-    byteArrayKlassObj         = new TypeArrayKlass(byteArrayKlassHandle);
-
-    charArrayKlassHandle      = universeType.getAddressField("_charArrayKlassObj").getValue();
-    charArrayKlassObj         = new TypeArrayKlass(charArrayKlassHandle);
-
-    intArrayKlassHandle       = universeType.getAddressField("_intArrayKlassObj").getValue();
-    intArrayKlassObj          = new TypeArrayKlass(intArrayKlassHandle);
-
-    shortArrayKlassHandle     = universeType.getAddressField("_shortArrayKlassObj").getValue();
-    shortArrayKlassObj        = new TypeArrayKlass(shortArrayKlassHandle);
-
-    longArrayKlassHandle      = universeType.getAddressField("_longArrayKlassObj").getValue();
-    longArrayKlassObj         = new TypeArrayKlass(longArrayKlassHandle);
-
-    singleArrayKlassHandle    = universeType.getAddressField("_singleArrayKlassObj").getValue();
-    singleArrayKlassObj       = new TypeArrayKlass(singleArrayKlassHandle);
-
-    doubleArrayKlassHandle    = universeType.getAddressField("_doubleArrayKlassObj").getValue();
-    doubleArrayKlassObj       = new TypeArrayKlass(doubleArrayKlassHandle);
-  }
-
   public ObjectHeap(TypeDataBase db) throws WrongTypeException {
     // Get commonly used sizes of basic types
     oopSize     = VM.getVM().getOopSize();
@@ -108,8 +61,6 @@
     longSize    = db.getJLongType().getSize();
     floatSize   = db.getJFloatType().getSize();
     doubleSize  = db.getJDoubleType().getSize();
-
-    initialize(db);
   }
 
   /** Comparison operation for oops, either or both of which may be null */
@@ -139,30 +90,6 @@
   public long getFloatSize()   { return floatSize;   }
   public long getDoubleSize()  { return doubleSize;  }
 
-  // Accessors for well-known system classes (from Universe)
-  public TypeArrayKlass         getBoolArrayKlassObj()         { return boolArrayKlassObj; }
-  public TypeArrayKlass         getByteArrayKlassObj()         { return byteArrayKlassObj; }
-  public TypeArrayKlass         getCharArrayKlassObj()         { return charArrayKlassObj; }
-  public TypeArrayKlass         getIntArrayKlassObj()          { return intArrayKlassObj; }
-  public TypeArrayKlass         getShortArrayKlassObj()        { return shortArrayKlassObj; }
-  public TypeArrayKlass         getLongArrayKlassObj()         { return longArrayKlassObj; }
-  public TypeArrayKlass         getSingleArrayKlassObj()       { return singleArrayKlassObj; }
-  public TypeArrayKlass         getDoubleArrayKlassObj()       { return doubleArrayKlassObj; }
-
-  /** Takes a BasicType and returns the corresponding primitive array
-      klass */
-  public Klass typeArrayKlassObj(int t) {
-    if (t == BasicType.getTBoolean()) return getBoolArrayKlassObj();
-    if (t == BasicType.getTChar())    return getCharArrayKlassObj();
-    if (t == BasicType.getTFloat())   return getSingleArrayKlassObj();
-    if (t == BasicType.getTDouble())  return getDoubleArrayKlassObj();
-    if (t == BasicType.getTByte())    return getByteArrayKlassObj();
-    if (t == BasicType.getTShort())   return getShortArrayKlassObj();
-    if (t == BasicType.getTInt())     return getIntArrayKlassObj();
-    if (t == BasicType.getTLong())    return getLongArrayKlassObj();
-    throw new RuntimeException("Illegal basic type " + t);
-  }
-
   /** an interface to filter objects while walking heap */
   public static interface ObjectFilter {
     public boolean canInclude(Oop obj);
--- a/test/hotspot/jtreg/serviceability/sa/ClhsdbPrintStatics.java	Tue Aug 28 18:03:33 2018 -0400
+++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbPrintStatics.java	Tue Aug 28 18:17:01 2018 -0400
@@ -75,8 +75,7 @@
                     "Static fields of Universe",
                     "uintptr_t Universe::_verify_oop_mask",
                     "intptr_t Universe::_non_oop_bits",
-                    "bool Universe::_fully_initialized",
-                    "Universe::_doubleArrayKlassObj"));
+                    "bool Universe::_fully_initialized"));
             expStrMap.put("printstatics JvmtiExport", List.of(
                     "Static fields of JvmtiExport",
                     "bool JvmtiExport::_can_access_local_variables",