annotate src/share/vm/oops/typeArrayKlass.cpp @ 20470:bc4ce33c0985

8049529: LogCompilation: annotate make_not_compilable with compilation level Reviewed-by: roland, iveresov
author vlivanov
date Mon, 14 Jul 2014 03:27:21 -0700
parents ce8f6bb717c9
children 7848fc12602b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
17467
55fb97c4c58d 8029233: Update copyright year to match last edit in jdk8 hotspot repository for 2013
mikael
parents: 8001
diff changeset
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1334
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1334
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1334
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
25 #include "precompiled.hpp"
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
26 #include "classfile/symbolTable.hpp"
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
27 #include "classfile/systemDictionary.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
28 #include "classfile/vmSymbols.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
29 #include "gc_interface/collectedHeap.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
30 #include "gc_interface/collectedHeap.inline.hpp"
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
31 #include "memory/metadataFactory.hpp"
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
32 #include "memory/resourceArea.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
33 #include "memory/universe.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
34 #include "memory/universe.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
35 #include "oops/instanceKlass.hpp"
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
36 #include "oops/klass.inline.hpp"
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
37 #include "oops/objArrayKlass.hpp"
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
38 #include "oops/oop.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
39 #include "oops/typeArrayKlass.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
40 #include "oops/typeArrayOop.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
41 #include "runtime/handles.inline.hpp"
20197
ce8f6bb717c9 8042195: Introduce umbrella header orderAccess.inline.hpp.
goetz
parents: 17467
diff changeset
42 #include "runtime/orderAccess.inline.hpp"
8001
db9981fd3124 8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents: 6840
diff changeset
43 #include "utilities/macros.hpp"
0
a61af66fc99e Initial load
duke
parents:
diff changeset
44
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
45 bool TypeArrayKlass::compute_is_subtype_of(Klass* k) {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
46 if (!k->oop_is_typeArray()) {
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
47 return ArrayKlass::compute_is_subtype_of(k);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
48 }
a61af66fc99e Initial load
duke
parents:
diff changeset
49
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
50 TypeArrayKlass* tak = TypeArrayKlass::cast(k);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
51 if (dimension() != tak->dimension()) return false;
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 return element_type() == tak->element_type();
a61af66fc99e Initial load
duke
parents:
diff changeset
54 }
a61af66fc99e Initial load
duke
parents:
diff changeset
55
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
56 TypeArrayKlass* TypeArrayKlass::create_klass(BasicType type,
481
7d7a7c599c17 6578152: fill_region_with_object has usability and safety issues
jcoomes
parents: 0
diff changeset
57 const char* name_str, TRAPS) {
2177
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 2119
diff changeset
58 Symbol* sym = NULL;
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 2119
diff changeset
59 if (name_str != NULL) {
5979
fc9d8850ab8b 7150058: Allocate symbols from null boot loader to an arena for NMT
coleenp
parents: 5935
diff changeset
60 sym = SymbolTable::new_permanent_symbol(name_str, CHECK_NULL);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
61 }
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
62
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
63 ClassLoaderData* null_loader_data = ClassLoaderData::the_null_class_loader_data();
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
64
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
65 TypeArrayKlass* ak = TypeArrayKlass::allocate(null_loader_data, type, sym, CHECK_NULL);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
66
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
67 // Add all classes to our internal class loader list here,
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
68 // including classes in the bootstrap (NULL) class loader.
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
69 // GC walks these as strong roots.
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
70 null_loader_data->add_class(ak);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72 // Call complete_create_array_klass after all instance variables have been initialized.
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
73 complete_create_array_klass(ak, ak->super(), CHECK_NULL);
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
74
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
75 return ak;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
76 }
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
77
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
78 TypeArrayKlass* TypeArrayKlass::allocate(ClassLoaderData* loader_data, BasicType type, Symbol* name, TRAPS) {
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
79 assert(TypeArrayKlass::header_size() <= InstanceKlass::header_size(),
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
80 "array klasses must be same size as InstanceKlass");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
81
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
82 int size = ArrayKlass::static_size(TypeArrayKlass::header_size());
0
a61af66fc99e Initial load
duke
parents:
diff changeset
83
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
84 return new (loader_data, size, THREAD) TypeArrayKlass(type, name);
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
85 }
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
86
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
87 TypeArrayKlass::TypeArrayKlass(BasicType type, Symbol* name) : ArrayKlass(name) {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
88 set_layout_helper(array_layout_helper(type));
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
89 assert(oop_is_array(), "sanity");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
90 assert(oop_is_typeArray(), "sanity");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
91
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
92 set_max_length(arrayOopDesc::max_array_length(type));
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
93 assert(size() >= TypeArrayKlass::header_size(), "bad size");
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
94
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
95 set_class_loader_data(ClassLoaderData::the_null_class_loader_data());
0
a61af66fc99e Initial load
duke
parents:
diff changeset
96 }
a61af66fc99e Initial load
duke
parents:
diff changeset
97
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
98 typeArrayOop TypeArrayKlass::allocate_common(int length, bool do_zero, TRAPS) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
99 assert(log2_element_size() >= 0, "bad scale");
a61af66fc99e Initial load
duke
parents:
diff changeset
100 if (length >= 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
101 if (length <= max_length()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
102 size_t size = typeArrayOopDesc::object_size(layout_helper(), length);
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
103 KlassHandle h_k(THREAD, this);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
104 typeArrayOop t;
a61af66fc99e Initial load
duke
parents:
diff changeset
105 CollectedHeap* ch = Universe::heap();
3961
a92cdbac8b9e 7081933: Use zeroing elimination optimization for large array
kvn
parents: 3774
diff changeset
106 if (do_zero) {
a92cdbac8b9e 7081933: Use zeroing elimination optimization for large array
kvn
parents: 3774
diff changeset
107 t = (typeArrayOop)CollectedHeap::array_allocate(h_k, (int)size, length, CHECK_NULL);
a92cdbac8b9e 7081933: Use zeroing elimination optimization for large array
kvn
parents: 3774
diff changeset
108 } else {
a92cdbac8b9e 7081933: Use zeroing elimination optimization for large array
kvn
parents: 3774
diff changeset
109 t = (typeArrayOop)CollectedHeap::array_allocate_nozero(h_k, (int)size, length, CHECK_NULL);
a92cdbac8b9e 7081933: Use zeroing elimination optimization for large array
kvn
parents: 3774
diff changeset
110 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
111 return t;
a61af66fc99e Initial load
duke
parents:
diff changeset
112 } else {
876
1413494da700 6850957: Honor -XX:OnOutOfMemoryError when array size exceeds VM limit
martin
parents: 579
diff changeset
113 report_java_out_of_memory("Requested array size exceeds VM limit");
5935
a735aec54ea4 7123170: JCK vm/jvmti/ResourceExhausted/resexh001/resexh00101/ tests fails since 7u4 b02
sspitsyn
parents: 3961
diff changeset
114 JvmtiExport::post_array_size_exhausted();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
115 THROW_OOP_0(Universe::out_of_memory_error_array_size());
a61af66fc99e Initial load
duke
parents:
diff changeset
116 }
a61af66fc99e Initial load
duke
parents:
diff changeset
117 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
118 THROW_0(vmSymbols::java_lang_NegativeArraySizeException());
a61af66fc99e Initial load
duke
parents:
diff changeset
119 }
a61af66fc99e Initial load
duke
parents:
diff changeset
120 }
a61af66fc99e Initial load
duke
parents:
diff changeset
121
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
122 oop TypeArrayKlass::multi_allocate(int rank, jint* last_size, TRAPS) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
123 // For typeArrays this is only called for the last dimension
a61af66fc99e Initial load
duke
parents:
diff changeset
124 assert(rank == 1, "just checking");
a61af66fc99e Initial load
duke
parents:
diff changeset
125 int length = *last_size;
a61af66fc99e Initial load
duke
parents:
diff changeset
126 return allocate(length, THREAD);
a61af66fc99e Initial load
duke
parents:
diff changeset
127 }
a61af66fc99e Initial load
duke
parents:
diff changeset
128
a61af66fc99e Initial load
duke
parents:
diff changeset
129
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
130 void TypeArrayKlass::copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
131 assert(s->is_typeArray(), "must be type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
132
a61af66fc99e Initial load
duke
parents:
diff changeset
133 // Check destination
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
134 if (!d->is_typeArray() || element_type() != TypeArrayKlass::cast(d->klass())->element_type()) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
135 THROW(vmSymbols::java_lang_ArrayStoreException());
a61af66fc99e Initial load
duke
parents:
diff changeset
136 }
a61af66fc99e Initial load
duke
parents:
diff changeset
137
a61af66fc99e Initial load
duke
parents:
diff changeset
138 // Check is all offsets and lengths are non negative
a61af66fc99e Initial load
duke
parents:
diff changeset
139 if (src_pos < 0 || dst_pos < 0 || length < 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
140 THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException());
a61af66fc99e Initial load
duke
parents:
diff changeset
141 }
a61af66fc99e Initial load
duke
parents:
diff changeset
142 // Check if the ranges are valid
a61af66fc99e Initial load
duke
parents:
diff changeset
143 if ( (((unsigned int) length + (unsigned int) src_pos) > (unsigned int) s->length())
a61af66fc99e Initial load
duke
parents:
diff changeset
144 || (((unsigned int) length + (unsigned int) dst_pos) > (unsigned int) d->length()) ) {
a61af66fc99e Initial load
duke
parents:
diff changeset
145 THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException());
a61af66fc99e Initial load
duke
parents:
diff changeset
146 }
1334
b5d78a3b8843 6892265: System.arraycopy unable to reference elements beyond Integer.MAX_VALUE bytes
kvn
parents: 876
diff changeset
147 // Check zero copy
b5d78a3b8843 6892265: System.arraycopy unable to reference elements beyond Integer.MAX_VALUE bytes
kvn
parents: 876
diff changeset
148 if (length == 0)
b5d78a3b8843 6892265: System.arraycopy unable to reference elements beyond Integer.MAX_VALUE bytes
kvn
parents: 876
diff changeset
149 return;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
150
a61af66fc99e Initial load
duke
parents:
diff changeset
151 // This is an attempt to make the copy_array fast.
a61af66fc99e Initial load
duke
parents:
diff changeset
152 int l2es = log2_element_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
153 int ihs = array_header_in_bytes() / wordSize;
1334
b5d78a3b8843 6892265: System.arraycopy unable to reference elements beyond Integer.MAX_VALUE bytes
kvn
parents: 876
diff changeset
154 char* src = (char*) ((oop*)s + ihs) + ((size_t)src_pos << l2es);
b5d78a3b8843 6892265: System.arraycopy unable to reference elements beyond Integer.MAX_VALUE bytes
kvn
parents: 876
diff changeset
155 char* dst = (char*) ((oop*)d + ihs) + ((size_t)dst_pos << l2es);
b5d78a3b8843 6892265: System.arraycopy unable to reference elements beyond Integer.MAX_VALUE bytes
kvn
parents: 876
diff changeset
156 Copy::conjoint_memory_atomic(src, dst, (size_t)length << l2es);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
157 }
a61af66fc99e Initial load
duke
parents:
diff changeset
158
a61af66fc99e Initial load
duke
parents:
diff changeset
159
a61af66fc99e Initial load
duke
parents:
diff changeset
160 // create a klass of array holding typeArrays
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
161 Klass* TypeArrayKlass::array_klass_impl(bool or_null, int n, TRAPS) {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
162 int dim = dimension();
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
163 assert(dim <= n, "check order of chain");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
164 if (dim == n)
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
165 return this;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
166
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
167 if (higher_dimension() == NULL) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
168 if (or_null) return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
169
a61af66fc99e Initial load
duke
parents:
diff changeset
170 ResourceMark rm;
a61af66fc99e Initial load
duke
parents:
diff changeset
171 JavaThread *jt = (JavaThread *)THREAD;
a61af66fc99e Initial load
duke
parents:
diff changeset
172 {
a61af66fc99e Initial load
duke
parents:
diff changeset
173 MutexLocker mc(Compile_lock, THREAD); // for vtables
a61af66fc99e Initial load
duke
parents:
diff changeset
174 // Atomic create higher dimension and link into list
a61af66fc99e Initial load
duke
parents:
diff changeset
175 MutexLocker mu(MultiArray_lock, THREAD);
a61af66fc99e Initial load
duke
parents:
diff changeset
176
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
177 if (higher_dimension() == NULL) {
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
178 Klass* oak = ObjArrayKlass::allocate_objArray_klass(
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
179 class_loader_data(), dim + 1, this, CHECK_NULL);
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
180 ObjArrayKlass* h_ak = ObjArrayKlass::cast(oak);
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
181 h_ak->set_lower_dimension(this);
2119
d4fca0a6abde 7011386: race in objArrayKlass::array_klass_impl
kvn
parents: 1972
diff changeset
182 OrderAccess::storestore();
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
183 set_higher_dimension(h_ak);
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
184 assert(h_ak->oop_is_objArray(), "incorrect initialization of ObjArrayKlass");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
185 }
a61af66fc99e Initial load
duke
parents:
diff changeset
186 }
a61af66fc99e Initial load
duke
parents:
diff changeset
187 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
188 CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
a61af66fc99e Initial load
duke
parents:
diff changeset
189 }
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
190 ObjArrayKlass* h_ak = ObjArrayKlass::cast(higher_dimension());
0
a61af66fc99e Initial load
duke
parents:
diff changeset
191 if (or_null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
192 return h_ak->array_klass_or_null(n);
a61af66fc99e Initial load
duke
parents:
diff changeset
193 }
a61af66fc99e Initial load
duke
parents:
diff changeset
194 return h_ak->array_klass(n, CHECK_NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
195 }
a61af66fc99e Initial load
duke
parents:
diff changeset
196
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
197 Klass* TypeArrayKlass::array_klass_impl(bool or_null, TRAPS) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
198 return array_klass_impl(or_null, dimension() + 1, THREAD);
a61af66fc99e Initial load
duke
parents:
diff changeset
199 }
a61af66fc99e Initial load
duke
parents:
diff changeset
200
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
201 int TypeArrayKlass::oop_size(oop obj) const {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
202 assert(obj->is_typeArray(),"must be a type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
203 typeArrayOop t = typeArrayOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
204 return t->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
205 }
a61af66fc99e Initial load
duke
parents:
diff changeset
206
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
207 void TypeArrayKlass::oop_follow_contents(oop obj) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
208 assert(obj->is_typeArray(),"must be a type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
209 // Performance tweak: We skip iterating over the klass pointer since we
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
210 // know that Universe::TypeArrayKlass never moves.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
211 }
a61af66fc99e Initial load
duke
parents:
diff changeset
212
8001
db9981fd3124 8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents: 6840
diff changeset
213 #if INCLUDE_ALL_GCS
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
214 void TypeArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
215 assert(obj->is_typeArray(),"must be a type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
216 // Performance tweak: We skip iterating over the klass pointer since we
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
217 // know that Universe::TypeArrayKlass never moves.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
218 }
8001
db9981fd3124 8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents: 6840
diff changeset
219 #endif // INCLUDE_ALL_GCS
0
a61af66fc99e Initial load
duke
parents:
diff changeset
220
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
221 int TypeArrayKlass::oop_adjust_pointers(oop obj) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
222 assert(obj->is_typeArray(),"must be a type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
223 typeArrayOop t = typeArrayOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
224 // Performance tweak: We skip iterating over the klass pointer since we
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
225 // know that Universe::TypeArrayKlass never moves.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
226 return t->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
227 }
a61af66fc99e Initial load
duke
parents:
diff changeset
228
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
229 int TypeArrayKlass::oop_oop_iterate(oop obj, ExtendedOopClosure* blk) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
230 assert(obj->is_typeArray(),"must be a type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
231 typeArrayOop t = typeArrayOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
232 // Performance tweak: We skip iterating over the klass pointer since we
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
233 // know that Universe::TypeArrayKlass never moves.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
234 return t->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
235 }
a61af66fc99e Initial load
duke
parents:
diff changeset
236
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
237 int TypeArrayKlass::oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
238 assert(obj->is_typeArray(),"must be a type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
239 typeArrayOop t = typeArrayOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
240 // Performance tweak: We skip iterating over the klass pointer since we
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
241 // know that Universe::TypeArrayKlass never moves.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
242 return t->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
243 }
a61af66fc99e Initial load
duke
parents:
diff changeset
244
8001
db9981fd3124 8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents: 6840
diff changeset
245 #if INCLUDE_ALL_GCS
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
246 void TypeArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
247 ShouldNotReachHere();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
248 assert(obj->is_typeArray(),"must be a type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
249 }
a61af66fc99e Initial load
duke
parents:
diff changeset
250
a61af66fc99e Initial load
duke
parents:
diff changeset
251 int
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
252 TypeArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
253 assert(obj->is_typeArray(),"must be a type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
254 return typeArrayOop(obj)->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
255 }
8001
db9981fd3124 8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents: 6840
diff changeset
256 #endif // INCLUDE_ALL_GCS
0
a61af66fc99e Initial load
duke
parents:
diff changeset
257
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
258 void TypeArrayKlass::initialize(TRAPS) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
259 // Nothing to do. Having this function is handy since objArrayKlasses can be
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
260 // initialized by calling initialize on their bottom_klass, see ObjArrayKlass::initialize
0
a61af66fc99e Initial load
duke
parents:
diff changeset
261 }
a61af66fc99e Initial load
duke
parents:
diff changeset
262
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
263 const char* TypeArrayKlass::external_name(BasicType type) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
264 switch (type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
265 case T_BOOLEAN: return "[Z";
a61af66fc99e Initial load
duke
parents:
diff changeset
266 case T_CHAR: return "[C";
a61af66fc99e Initial load
duke
parents:
diff changeset
267 case T_FLOAT: return "[F";
a61af66fc99e Initial load
duke
parents:
diff changeset
268 case T_DOUBLE: return "[D";
a61af66fc99e Initial load
duke
parents:
diff changeset
269 case T_BYTE: return "[B";
a61af66fc99e Initial load
duke
parents:
diff changeset
270 case T_SHORT: return "[S";
a61af66fc99e Initial load
duke
parents:
diff changeset
271 case T_INT: return "[I";
a61af66fc99e Initial load
duke
parents:
diff changeset
272 case T_LONG: return "[J";
a61af66fc99e Initial load
duke
parents:
diff changeset
273 default: ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
274 }
a61af66fc99e Initial load
duke
parents:
diff changeset
275 return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
276 }
a61af66fc99e Initial load
duke
parents:
diff changeset
277
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
278
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
279 // Printing
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
280
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
281 void TypeArrayKlass::print_on(outputStream* st) const {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
282 #ifndef PRODUCT
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
283 assert(is_klass(), "must be klass");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
284 print_value_on(st);
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
285 Klass::print_on(st);
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
286 #endif //PRODUCT
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
287 }
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
288
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
289 void TypeArrayKlass::print_value_on(outputStream* st) const {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
290 assert(is_klass(), "must be klass");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
291 st->print("{type array ");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
292 switch (element_type()) {
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
293 case T_BOOLEAN: st->print("bool"); break;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
294 case T_CHAR: st->print("char"); break;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
295 case T_FLOAT: st->print("float"); break;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
296 case T_DOUBLE: st->print("double"); break;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
297 case T_BYTE: st->print("byte"); break;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
298 case T_SHORT: st->print("short"); break;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
299 case T_INT: st->print("int"); break;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
300 case T_LONG: st->print("long"); break;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
301 default: ShouldNotReachHere();
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
302 }
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
303 st->print("}");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
304 }
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
305
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5979
diff changeset
306 #ifndef PRODUCT
0
a61af66fc99e Initial load
duke
parents:
diff changeset
307
a61af66fc99e Initial load
duke
parents:
diff changeset
308 static void print_boolean_array(typeArrayOop ta, int print_len, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
309 for (int index = 0; index < print_len; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
310 st->print_cr(" - %3d: %s", index, (ta->bool_at(index) == 0) ? "false" : "true");
a61af66fc99e Initial load
duke
parents:
diff changeset
311 }
a61af66fc99e Initial load
duke
parents:
diff changeset
312 }
a61af66fc99e Initial load
duke
parents:
diff changeset
313
a61af66fc99e Initial load
duke
parents:
diff changeset
314
a61af66fc99e Initial load
duke
parents:
diff changeset
315 static void print_char_array(typeArrayOop ta, int print_len, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
316 for (int index = 0; index < print_len; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
317 jchar c = ta->char_at(index);
a61af66fc99e Initial load
duke
parents:
diff changeset
318 st->print_cr(" - %3d: %x %c", index, c, isprint(c) ? c : ' ');
a61af66fc99e Initial load
duke
parents:
diff changeset
319 }
a61af66fc99e Initial load
duke
parents:
diff changeset
320 }
a61af66fc99e Initial load
duke
parents:
diff changeset
321
a61af66fc99e Initial load
duke
parents:
diff changeset
322
a61af66fc99e Initial load
duke
parents:
diff changeset
323 static void print_float_array(typeArrayOop ta, int print_len, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
324 for (int index = 0; index < print_len; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
325 st->print_cr(" - %3d: %g", index, ta->float_at(index));
a61af66fc99e Initial load
duke
parents:
diff changeset
326 }
a61af66fc99e Initial load
duke
parents:
diff changeset
327 }
a61af66fc99e Initial load
duke
parents:
diff changeset
328
a61af66fc99e Initial load
duke
parents:
diff changeset
329
a61af66fc99e Initial load
duke
parents:
diff changeset
330 static void print_double_array(typeArrayOop ta, int print_len, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
331 for (int index = 0; index < print_len; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
332 st->print_cr(" - %3d: %g", index, ta->double_at(index));
a61af66fc99e Initial load
duke
parents:
diff changeset
333 }
a61af66fc99e Initial load
duke
parents:
diff changeset
334 }
a61af66fc99e Initial load
duke
parents:
diff changeset
335
a61af66fc99e Initial load
duke
parents:
diff changeset
336
a61af66fc99e Initial load
duke
parents:
diff changeset
337 static void print_byte_array(typeArrayOop ta, int print_len, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
338 for (int index = 0; index < print_len; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
339 jbyte c = ta->byte_at(index);
a61af66fc99e Initial load
duke
parents:
diff changeset
340 st->print_cr(" - %3d: %x %c", index, c, isprint(c) ? c : ' ');
a61af66fc99e Initial load
duke
parents:
diff changeset
341 }
a61af66fc99e Initial load
duke
parents:
diff changeset
342 }
a61af66fc99e Initial load
duke
parents:
diff changeset
343
a61af66fc99e Initial load
duke
parents:
diff changeset
344
a61af66fc99e Initial load
duke
parents:
diff changeset
345 static void print_short_array(typeArrayOop ta, int print_len, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
346 for (int index = 0; index < print_len; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
347 int v = ta->ushort_at(index);
a61af66fc99e Initial load
duke
parents:
diff changeset
348 st->print_cr(" - %3d: 0x%x\t %d", index, v, v);
a61af66fc99e Initial load
duke
parents:
diff changeset
349 }
a61af66fc99e Initial load
duke
parents:
diff changeset
350 }
a61af66fc99e Initial load
duke
parents:
diff changeset
351
a61af66fc99e Initial load
duke
parents:
diff changeset
352
a61af66fc99e Initial load
duke
parents:
diff changeset
353 static void print_int_array(typeArrayOop ta, int print_len, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
354 for (int index = 0; index < print_len; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
355 jint v = ta->int_at(index);
a61af66fc99e Initial load
duke
parents:
diff changeset
356 st->print_cr(" - %3d: 0x%x %d", index, v, v);
a61af66fc99e Initial load
duke
parents:
diff changeset
357 }
a61af66fc99e Initial load
duke
parents:
diff changeset
358 }
a61af66fc99e Initial load
duke
parents:
diff changeset
359
a61af66fc99e Initial load
duke
parents:
diff changeset
360
a61af66fc99e Initial load
duke
parents:
diff changeset
361 static void print_long_array(typeArrayOop ta, int print_len, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
362 for (int index = 0; index < print_len; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
363 jlong v = ta->long_at(index);
a61af66fc99e Initial load
duke
parents:
diff changeset
364 st->print_cr(" - %3d: 0x%x 0x%x", index, high(v), low(v));
a61af66fc99e Initial load
duke
parents:
diff changeset
365 }
a61af66fc99e Initial load
duke
parents:
diff changeset
366 }
a61af66fc99e Initial load
duke
parents:
diff changeset
367
a61af66fc99e Initial load
duke
parents:
diff changeset
368
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
369 void TypeArrayKlass::oop_print_on(oop obj, outputStream* st) {
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
370 ArrayKlass::oop_print_on(obj, st);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
371 typeArrayOop ta = typeArrayOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
372 int print_len = MIN2((intx) ta->length(), MaxElementPrintSize);
a61af66fc99e Initial load
duke
parents:
diff changeset
373 switch (element_type()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
374 case T_BOOLEAN: print_boolean_array(ta, print_len, st); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
375 case T_CHAR: print_char_array(ta, print_len, st); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
376 case T_FLOAT: print_float_array(ta, print_len, st); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
377 case T_DOUBLE: print_double_array(ta, print_len, st); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
378 case T_BYTE: print_byte_array(ta, print_len, st); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
379 case T_SHORT: print_short_array(ta, print_len, st); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
380 case T_INT: print_int_array(ta, print_len, st); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
381 case T_LONG: print_long_array(ta, print_len, st); break;
a61af66fc99e Initial load
duke
parents:
diff changeset
382 default: ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
383 }
a61af66fc99e Initial load
duke
parents:
diff changeset
384 int remaining = ta->length() - print_len;
a61af66fc99e Initial load
duke
parents:
diff changeset
385 if (remaining > 0) {
6815
86af3dacab81 8000227: [obj|type]ArrayKlass::oop_print_on prints one line to tty instead of the provided output stream
stefank
parents: 6725
diff changeset
386 st->print_cr(" - <%d more elements, increase MaxElementPrintSize to print>", remaining);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
387 }
a61af66fc99e Initial load
duke
parents:
diff changeset
388 }
a61af66fc99e Initial load
duke
parents:
diff changeset
389
a61af66fc99e Initial load
duke
parents:
diff changeset
390 #endif // PRODUCT
a61af66fc99e Initial load
duke
parents:
diff changeset
391
6831
d8ce2825b193 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents: 6725
diff changeset
392 const char* TypeArrayKlass::internal_name() const {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
393 return Klass::external_name();
a61af66fc99e Initial load
duke
parents:
diff changeset
394 }