diff --git a/src/share/vm/memory/oopFactory.cpp b/src/share/vm/memory/oopFactory.cpp index 7ef11b15f086acc3f090e55471fa0040f4eadc24..c8b45b68a04301751009774f54e16d7afe0fbdc4 100644 --- a/src/share/vm/memory/oopFactory.cpp +++ b/src/share/vm/memory/oopFactory.cpp @@ -92,21 +92,12 @@ objArrayOop oopFactory::new_objArray(klassOop klass, int length, TRAPS) { } } -objArrayOop oopFactory::new_system_objArray(int length, bool in_perm_gen, TRAPS) { +objArrayOop oopFactory::new_system_objArray(int length, TRAPS) { int size = objArrayOopDesc::object_size(length); KlassHandle klass (THREAD, Universe::systemObjArrayKlassObj()); - oop o; - if (in_perm_gen) { - o = Universe::heap()->permanent_array_allocate(klass, size, length, CHECK_NULL); - } else { - o = Universe::heap()->array_allocate(klass, size, length, CHECK_NULL); - } + objArrayOop o = (objArrayOop) + Universe::heap()->permanent_array_allocate(klass, size, length, CHECK_NULL); // initialization not needed, allocated cleared - return (objArrayOop) o; -} - -objArrayOop oopFactory::new_system_objArray(int length, TRAPS) { - objArrayOop o = oopFactory::new_system_objArray(length, true, CHECK_NULL); return o; } diff --git a/src/share/vm/memory/oopFactory.hpp b/src/share/vm/memory/oopFactory.hpp index a2b34de8cda2792fd174cb9fee245b46cd2f1213..49b89bc3b17a8ae28e81ad1158076a6ab44bb78d 100644 --- a/src/share/vm/memory/oopFactory.hpp +++ b/src/share/vm/memory/oopFactory.hpp @@ -102,7 +102,6 @@ public: // System object arrays static objArrayOop new_system_objArray(int length, TRAPS); - static objArrayOop new_system_objArray(int length, bool in_perm_gen, TRAPS); // Regular object arrays static objArrayOop new_objArray(klassOop klass, int length, TRAPS); diff --git a/src/share/vm/services/management.cpp b/src/share/vm/services/management.cpp index fb2bda70712b7c87888f0fcd94d65d726a452cab..3c4f1481c75ddf5311cc5d2ac1bed433b435483f 100644 --- a/src/share/vm/services/management.cpp +++ b/src/share/vm/services/management.cpp @@ -1311,7 +1311,7 @@ JVM_ENTRY(jobjectArray, jmm_DumpThreads(JNIEnv *env, jlongArray thread_ids, jboo if (locked_monitors) { // Constructs Object[] and int[] to contain the object monitor and the stack depth // where the thread locked it - objArrayOop array = oopFactory::new_system_objArray(num_locked_monitors, false, CHECK_NULL); + objArrayOop array = oopFactory::new_objArray(SystemDictionary::Object_klass(), num_locked_monitors, CHECK_NULL); objArrayHandle mh(THREAD, array); monitors_array = mh; @@ -1353,7 +1353,7 @@ JVM_ENTRY(jobjectArray, jmm_DumpThreads(JNIEnv *env, jlongArray thread_ids, jboo GrowableArray* locks = (tcl != NULL ? tcl->owned_locks() : NULL); int num_locked_synchronizers = (locks != NULL ? locks->length() : 0); - objArrayOop array = oopFactory::new_system_objArray(num_locked_synchronizers, false, CHECK_NULL); + objArrayOop array = oopFactory::new_objArray(SystemDictionary::Object_klass(), num_locked_synchronizers, CHECK_NULL); objArrayHandle sh(THREAD, array); synchronizers_array = sh;