author | erikj |
Tue, 12 Sep 2017 19:03:39 +0200 | |
changeset 47216 | 71c04702a3d5 |
parent 46415 | hotspot/src/share/vm/oops/instanceMirrorKlass.hpp@7d5a286cdf89 |
child 49982 | 9042ffe5b7fe |
permissions | -rw-r--r-- |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
1 |
/* |
46329
53ccc37bda19
8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents:
35877
diff
changeset
|
2 |
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
4 |
* |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
8 |
* |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
13 |
* accompanied this code). |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
14 |
* |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
18 |
* |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
21 |
* questions. |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
22 |
* |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
23 |
*/ |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
24 |
|
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
25 |
#ifndef SHARE_VM_OOPS_INSTANCEMIRRORKLASS_HPP |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
26 |
#define SHARE_VM_OOPS_INSTANCEMIRRORKLASS_HPP |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
27 |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
8878
diff
changeset
|
28 |
#include "classfile/systemDictionary.hpp" |
30764 | 29 |
#include "gc/shared/specialized_oop_closures.hpp" |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
30 |
#include "oops/instanceKlass.hpp" |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
8878
diff
changeset
|
31 |
#include "runtime/handles.hpp" |
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
13738
diff
changeset
|
32 |
#include "utilities/macros.hpp" |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
33 |
|
34666 | 34 |
class ClassFileParser; |
35 |
||
13738
d67be49a5beb
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
13728
diff
changeset
|
36 |
// An InstanceMirrorKlass is a specialized InstanceKlass for |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
37 |
// java.lang.Class instances. These instances are special because |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
38 |
// they contain the static fields of the class in addition to the |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
39 |
// normal fields of Class. This means they are variable sized |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
40 |
// instances and need special logic for computing their size and for |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
41 |
// iteration of their oops. |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
42 |
|
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
43 |
|
13738
d67be49a5beb
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
13728
diff
changeset
|
44 |
class InstanceMirrorKlass: public InstanceKlass { |
8878
a6283814032c
7031614: jmap -permstat fails with java.lang.InternalError in sun.jvm.hotspot.oops.OopField.getValue
never
parents:
8725
diff
changeset
|
45 |
friend class VMStructs; |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
8878
diff
changeset
|
46 |
friend class InstanceKlass; |
8878
a6283814032c
7031614: jmap -permstat fails with java.lang.InternalError in sun.jvm.hotspot.oops.OopField.getValue
never
parents:
8725
diff
changeset
|
47 |
|
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
48 |
private: |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
49 |
static int _offset_of_static_fields; |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
50 |
|
34666 | 51 |
InstanceMirrorKlass(const ClassFileParser& parser) : InstanceKlass(parser, InstanceKlass::_misc_kind_mirror) {} |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
8878
diff
changeset
|
52 |
|
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
53 |
public: |
13738
d67be49a5beb
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
13728
diff
changeset
|
54 |
InstanceMirrorKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); } |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
55 |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
8878
diff
changeset
|
56 |
// Casting from Klass* |
13738
d67be49a5beb
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
13728
diff
changeset
|
57 |
static InstanceMirrorKlass* cast(Klass* k) { |
33151
686d694f5c6a
8138659: Speed up InstanceKlass subclass discrimination
kbarrett
parents:
32606
diff
changeset
|
58 |
assert(InstanceKlass::cast(k)->is_mirror_instance_klass(), |
686d694f5c6a
8138659: Speed up InstanceKlass subclass discrimination
kbarrett
parents:
32606
diff
changeset
|
59 |
"cast to InstanceMirrorKlass"); |
686d694f5c6a
8138659: Speed up InstanceKlass subclass discrimination
kbarrett
parents:
32606
diff
changeset
|
60 |
return static_cast<InstanceMirrorKlass*>(k); |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
61 |
} |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
62 |
|
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
63 |
// Returns the size of the instance including the extra static fields. |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
64 |
virtual int oop_size(oop obj) const; |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
65 |
|
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
66 |
// Static field offset is an offset into the Heap, should be converted by |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
67 |
// based on UseCompressedOop for traversal |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
68 |
static HeapWord* start_of_static_fields(oop obj) { |
20282
7f9cbdf89af2
7195622: CheckUnhandledOops has limited usefulness now
hseigel
parents:
15482
diff
changeset
|
69 |
return (HeapWord*)(cast_from_oop<intptr_t>(obj) + offset_of_static_fields()); |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
70 |
} |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
71 |
|
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
72 |
static void init_offset_of_static_fields() { |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
73 |
// Cache the offset of the static fields in the Class instance |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
74 |
assert(_offset_of_static_fields == 0, "once"); |
13738
d67be49a5beb
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
13728
diff
changeset
|
75 |
_offset_of_static_fields = InstanceMirrorKlass::cast(SystemDictionary::Class_klass())->size_helper() << LogHeapWordSize; |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
76 |
} |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
77 |
|
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
78 |
static int offset_of_static_fields() { |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
79 |
return _offset_of_static_fields; |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
80 |
} |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
81 |
|
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
82 |
int compute_static_oop_field_count(oop obj); |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
83 |
|
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
84 |
// Given a Klass return the size of the instance |
46329
53ccc37bda19
8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents:
35877
diff
changeset
|
85 |
int instance_size(Klass* k); |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
86 |
|
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
87 |
// allocation |
46329
53ccc37bda19
8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents:
35877
diff
changeset
|
88 |
instanceOop allocate_instance(Klass* k, TRAPS); |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
89 |
|
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
90 |
// GC specific object visitors |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
91 |
// |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
92 |
#if INCLUDE_ALL_GCS |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
93 |
// Parallel Scavenge |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
94 |
void oop_ps_push_contents( oop obj, PSPromotionManager* pm); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
95 |
// Parallel Compact |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
96 |
void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); |
35877
a2a62511d0f8
8146987: Improve Parallel GC Full GC by caching results of live_words_in_range()
tschatzl
parents:
34666
diff
changeset
|
97 |
void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
98 |
#endif |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
99 |
|
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
100 |
// Oop fields (and metadata) iterators |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
101 |
// [nv = true] Use non-virtual calls to do_oop_nv. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
102 |
// [nv = false] Use virtual calls to do_oop. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
103 |
// |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
104 |
// The InstanceMirrorKlass iterators also visit the hidden Klass pointer. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
105 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
106 |
public: |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
107 |
// Iterate over the static fields. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
108 |
template <bool nv, class OopClosureType> |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
109 |
inline void oop_oop_iterate_statics(oop obj, OopClosureType* closure); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
110 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
111 |
private: |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
112 |
// Iterate over the static fields. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
113 |
// Specialized for [T = oop] or [T = narrowOop]. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
114 |
template <bool nv, typename T, class OopClosureType> |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
115 |
inline void oop_oop_iterate_statics_specialized(oop obj, OopClosureType* closure); |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
116 |
|
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
117 |
// Forward iteration |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
118 |
// Iterate over the oop fields and metadata. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
119 |
template <bool nv, class OopClosureType> |
32606
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
120 |
inline void oop_oop_iterate(oop obj, OopClosureType* closure); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
121 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
122 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
123 |
// Reverse iteration |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
124 |
#if INCLUDE_ALL_GCS |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
125 |
// Iterate over the oop fields and metadata. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
126 |
template <bool nv, class OopClosureType> |
32606
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
127 |
inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
128 |
#endif |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
129 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
130 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
131 |
// Bounded range iteration |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
132 |
// Iterate over the oop fields and metadata. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
133 |
template <bool nv, class OopClosureType> |
32606
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
134 |
inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
135 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
136 |
// Iterate over the static fields. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
137 |
template <bool nv, class OopClosureType> |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
138 |
inline void oop_oop_iterate_statics_bounded(oop obj, OopClosureType* closure, MemRegion mr); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
139 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
140 |
// Iterate over the static fields. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
141 |
// Specialized for [T = oop] or [T = narrowOop]. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
142 |
template <bool nv, typename T, class OopClosureType> |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
143 |
inline void oop_oop_iterate_statics_specialized_bounded(oop obj, OopClosureType* closure, MemRegion mr); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
144 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
145 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
29688
diff
changeset
|
146 |
public: |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
147 |
|
30880
efe35e08179f
8080746: Refactor oop iteration macros to be more general
sjohanss
parents:
30764
diff
changeset
|
148 |
ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL) |
efe35e08179f
8080746: Refactor oop iteration macros to be more general
sjohanss
parents:
30764
diff
changeset
|
149 |
ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL) |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
150 |
|
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
13738
diff
changeset
|
151 |
#if INCLUDE_ALL_GCS |
30880
efe35e08179f
8080746: Refactor oop iteration macros to be more general
sjohanss
parents:
30764
diff
changeset
|
152 |
ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_BACKWARDS) |
efe35e08179f
8080746: Refactor oop iteration macros to be more general
sjohanss
parents:
30764
diff
changeset
|
153 |
ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_BACKWARDS) |
15482
470d0b0c09f1
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
13738
diff
changeset
|
154 |
#endif // INCLUDE_ALL_GCS |
8725
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
155 |
}; |
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
156 |
|
8c1e3dd5fe1b
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
diff
changeset
|
157 |
#endif // SHARE_VM_OOPS_INSTANCEMIRRORKLASS_HPP |