Mercurial > hg > truffle
annotate src/share/vm/oops/typeArrayKlass.hpp @ 4710:41406797186b
7113012: G1: rename not-fully-young GCs as "mixed"
Summary: Renamed partially-young GCs as mixed and fully-young GCs as young. Change all external output that includes those terms (GC log and GC ergo log) as well as any comments, fields, methods, etc. The changeset also includes very minor code tidying up (added some curly brackets).
Reviewed-by: johnc, brutisso
author | tonyp |
---|---|
date | Fri, 16 Dec 2011 02:14:27 -0500 |
parents | a92cdbac8b9e |
children | da91efe96a93 |
rev | line source |
---|---|
0 | 1 /* |
1972 | 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
579
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
579
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:
579
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_OOPS_TYPEARRAYKLASS_HPP |
26 #define SHARE_VM_OOPS_TYPEARRAYKLASS_HPP | |
27 | |
28 #include "oops/arrayKlass.hpp" | |
29 | |
0 | 30 // A typeArrayKlass is the klass of a typeArray |
31 // It contains the type and size of the elements | |
32 | |
33 class typeArrayKlass : public arrayKlass { | |
34 friend class VMStructs; | |
35 private: | |
36 jint _max_length; // maximum number of elements allowed in an array | |
37 public: | |
38 // instance variables | |
39 jint max_length() { return _max_length; } | |
40 void set_max_length(jint m) { _max_length = m; } | |
41 | |
42 // testers | |
43 bool oop_is_typeArray_slow() const { return true; } | |
44 | |
45 // klass allocation | |
46 DEFINE_ALLOCATE_PERMANENT(typeArrayKlass); | |
481
7d7a7c599c17
6578152: fill_region_with_object has usability and safety issues
jcoomes
parents:
0
diff
changeset
|
47 static klassOop create_klass(BasicType type, int scale, const char* name_str, |
7d7a7c599c17
6578152: fill_region_with_object has usability and safety issues
jcoomes
parents:
0
diff
changeset
|
48 TRAPS); |
7d7a7c599c17
6578152: fill_region_with_object has usability and safety issues
jcoomes
parents:
0
diff
changeset
|
49 static inline klassOop create_klass(BasicType type, int scale, TRAPS) { |
7d7a7c599c17
6578152: fill_region_with_object has usability and safety issues
jcoomes
parents:
0
diff
changeset
|
50 return create_klass(type, scale, external_name(type), CHECK_NULL); |
7d7a7c599c17
6578152: fill_region_with_object has usability and safety issues
jcoomes
parents:
0
diff
changeset
|
51 } |
0 | 52 |
53 int oop_size(oop obj) const; | |
54 int klass_oop_size() const { return object_size(); } | |
55 | |
56 bool compute_is_subtype_of(klassOop k); | |
57 | |
58 // Allocation | |
3961
a92cdbac8b9e
7081933: Use zeroing elimination optimization for large array
kvn
parents:
1972
diff
changeset
|
59 typeArrayOop allocate_common(int length, bool do_zero, TRAPS); |
a92cdbac8b9e
7081933: Use zeroing elimination optimization for large array
kvn
parents:
1972
diff
changeset
|
60 typeArrayOop allocate(int length, TRAPS) { return allocate_common(length, true, THREAD); } |
0 | 61 typeArrayOop allocate_permanent(int length, TRAPS); // used for class file structures |
62 oop multi_allocate(int rank, jint* sizes, TRAPS); | |
63 | |
64 // Copying | |
65 void copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS); | |
66 | |
67 // Iteration | |
68 int oop_oop_iterate(oop obj, OopClosure* blk); | |
69 int oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr); | |
70 | |
71 // Garbage collection | |
72 void oop_follow_contents(oop obj); | |
73 int oop_adjust_pointers(oop obj); | |
74 | |
75 // Parallel Scavenge and Parallel Old | |
76 PARALLEL_GC_DECLS | |
77 | |
78 protected: | |
79 // Find n'th dimensional array | |
80 virtual klassOop array_klass_impl(bool or_null, int n, TRAPS); | |
81 | |
82 // Returns the array class with this class as element type | |
83 virtual klassOop array_klass_impl(bool or_null, TRAPS); | |
84 | |
85 public: | |
86 // Casting from klassOop | |
87 static typeArrayKlass* cast(klassOop k) { | |
88 assert(k->klass_part()->oop_is_typeArray_slow(), "cast to typeArrayKlass"); | |
89 return (typeArrayKlass*) k->klass_part(); | |
90 } | |
91 | |
92 // Naming | |
93 static const char* external_name(BasicType type); | |
94 | |
95 // Sizing | |
96 static int header_size() { return oopDesc::header_size() + sizeof(typeArrayKlass)/HeapWordSize; } | |
97 int object_size() const { return arrayKlass::object_size(header_size()); } | |
98 | |
99 // Initialization (virtual from Klass) | |
100 void initialize(TRAPS); | |
101 | |
102 private: | |
103 // Helpers | |
104 static klassOop array_klass_impl(typeArrayKlassHandle h_this, bool or_null, int n, TRAPS); | |
105 | |
106 #ifndef PRODUCT | |
107 public: | |
108 // Printing | |
109 void oop_print_on(oop obj, outputStream* st); | |
110 #endif | |
111 public: | |
112 const char* internal_name() const; | |
113 }; | |
1972 | 114 |
115 #endif // SHARE_VM_OOPS_TYPEARRAYKLASS_HPP |