comparison src/share/vm/memory/specialized_oop_closures.hpp @ 8001:db9981fd3124

8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS Summary: Rename INCLUDE_ALTERNATE_GCS to INCLUDE_ALL_GCS and replace SERIALGC with INCLUDE_ALL_GCS. Reviewed-by: coleenp, stefank
author jprovino
date Wed, 23 Jan 2013 13:02:39 -0500
parents d8ce2825b193
children de6a9e811145
comparison
equal deleted inserted replaced
7619:46e60405583b 8001:db9981fd3124
24 24
25 #ifndef SHARE_VM_MEMORY_SPECIALIZED_OOP_CLOSURES_HPP 25 #ifndef SHARE_VM_MEMORY_SPECIALIZED_OOP_CLOSURES_HPP
26 #define SHARE_VM_MEMORY_SPECIALIZED_OOP_CLOSURES_HPP 26 #define SHARE_VM_MEMORY_SPECIALIZED_OOP_CLOSURES_HPP
27 27
28 #include "runtime/atomic.hpp" 28 #include "runtime/atomic.hpp"
29 #ifndef SERIALGC 29 #include "utilities/macros.hpp"
30 #if INCLUDE_ALL_GCS
30 #include "gc_implementation/g1/g1_specialized_oop_closures.hpp" 31 #include "gc_implementation/g1/g1_specialized_oop_closures.hpp"
31 #endif 32 #endif // INCLUDE_ALL_GCS
32 33
33 // The following OopClosure types get specialized versions of 34 // The following OopClosure types get specialized versions of
34 // "oop_oop_iterate" that invoke the closures' do_oop methods 35 // "oop_oop_iterate" that invoke the closures' do_oop methods
35 // non-virtually, using a mechanism defined in this file. Extend these 36 // non-virtually, using a mechanism defined in this file. Extend these
36 // macros in the obvious way to add specializations for new closures. 37 // macros in the obvious way to add specializations for new closures.
78 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_S(f) \ 79 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_S(f) \
79 f(ScanClosure,_nv) \ 80 f(ScanClosure,_nv) \
80 f(FastScanClosure,_nv) \ 81 f(FastScanClosure,_nv) \
81 f(FilteringClosure,_nv) 82 f(FilteringClosure,_nv)
82 83
83 #ifndef SERIALGC 84 #if INCLUDE_ALL_GCS
84 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f) \ 85 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f) \
85 f(ParScanWithBarrierClosure,_nv) \ 86 f(ParScanWithBarrierClosure,_nv) \
86 f(ParScanWithoutBarrierClosure,_nv) 87 f(ParScanWithoutBarrierClosure,_nv)
87 #else // SERIALGC 88 #else // INCLUDE_ALL_GCS
88 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f) 89 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f)
89 #endif // SERIALGC 90 #endif // INCLUDE_ALL_GCS
90 91
91 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f) \ 92 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f) \
92 f(NoHeaderExtendedOopClosure,_nv) \ 93 f(NoHeaderExtendedOopClosure,_nv) \
93 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_S(f) \ 94 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_S(f) \
94 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f) 95 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f)
95 96
96 #ifndef SERIALGC 97 #if INCLUDE_ALL_GCS
97 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) \ 98 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) \
98 f(MarkRefsIntoAndScanClosure,_nv) \ 99 f(MarkRefsIntoAndScanClosure,_nv) \
99 f(Par_MarkRefsIntoAndScanClosure,_nv) \ 100 f(Par_MarkRefsIntoAndScanClosure,_nv) \
100 f(PushAndMarkClosure,_nv) \ 101 f(PushAndMarkClosure,_nv) \
101 f(Par_PushAndMarkClosure,_nv) \ 102 f(Par_PushAndMarkClosure,_nv) \
102 f(PushOrMarkClosure,_nv) \ 103 f(PushOrMarkClosure,_nv) \
103 f(Par_PushOrMarkClosure,_nv) \ 104 f(Par_PushOrMarkClosure,_nv) \
104 f(CMSKeepAliveClosure,_nv) \ 105 f(CMSKeepAliveClosure,_nv) \
105 f(CMSInnerParMarkAndPushClosure,_nv) \ 106 f(CMSInnerParMarkAndPushClosure,_nv) \
106 FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES(f) 107 FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES(f)
107 #else // SERIALGC 108 #else // INCLUDE_ALL_GCS
108 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) 109 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)
109 #endif // SERIALGC 110 #endif // INCLUDE_ALL_GCS
110 111
111 112
112 // We separate these out, because sometime the general one has 113 // We separate these out, because sometime the general one has
113 // a different definition from the specialized ones, and sometimes it 114 // a different definition from the specialized ones, and sometimes it
114 // doesn't. 115 // doesn't.
118 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f) 119 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f)
119 120
120 #define ALL_OOP_OOP_ITERATE_CLOSURES_2(f) \ 121 #define ALL_OOP_OOP_ITERATE_CLOSURES_2(f) \
121 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) 122 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)
122 123
123 #ifndef SERIALGC 124 #if INCLUDE_ALL_GCS
124 // This macro applies an argument macro to all OopClosures for which we 125 // This macro applies an argument macro to all OopClosures for which we
125 // want specialized bodies of a family of methods related to 126 // want specialized bodies of a family of methods related to
126 // "par_oop_iterate". The arguments to f are the same as above. 127 // "par_oop_iterate". The arguments to f are the same as above.
127 // The "root_class" is the most general class to define; this may be 128 // The "root_class" is the most general class to define; this may be
128 // "OopClosure" in some applications and "OopsInGenClosure" in others. 129 // "OopClosure" in some applications and "OopsInGenClosure" in others.
134 f(Par_PushAndMarkClosure,_nv) 135 f(Par_PushAndMarkClosure,_nv)
135 136
136 #define ALL_PAR_OOP_ITERATE_CLOSURES(f) \ 137 #define ALL_PAR_OOP_ITERATE_CLOSURES(f) \
137 f(ExtendedOopClosure,_v) \ 138 f(ExtendedOopClosure,_v) \
138 SPECIALIZED_PAR_OOP_ITERATE_CLOSURES(f) 139 SPECIALIZED_PAR_OOP_ITERATE_CLOSURES(f)
139 #endif // SERIALGC 140 #endif // INCLUDE_ALL_GCS
140 141
141 // This macro applies an argument macro to all OopClosures for which we 142 // This macro applies an argument macro to all OopClosures for which we
142 // want specialized bodies of a family of methods related to 143 // want specialized bodies of a family of methods related to
143 // "oops_since_save_marks_do". The arguments to f are the same as above. 144 // "oops_since_save_marks_do". The arguments to f are the same as above.
144 // The "root_class" is the most general class to define; this may be 145 // The "root_class" is the most general class to define; this may be
153 154
154 #define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_S(f) \ 155 #define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_S(f) \
155 f(ScanClosure,_nv) \ 156 f(ScanClosure,_nv) \
156 f(FastScanClosure,_nv) 157 f(FastScanClosure,_nv)
157 158
158 #ifndef SERIALGC 159 #if INCLUDE_ALL_GCS
159 #define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f) \ 160 #define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f) \
160 f(ParScanWithBarrierClosure,_nv) \ 161 f(ParScanWithBarrierClosure,_nv) \
161 f(ParScanWithoutBarrierClosure,_nv) \ 162 f(ParScanWithoutBarrierClosure,_nv) \
162 FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(f) 163 FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(f)
163 #else // SERIALGC 164 #else // INCLUDE_ALL_GCS
164 #define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f) 165 #define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f)
165 #endif // SERIALGC 166 #endif // INCLUDE_ALL_GCS
166 167
167 #define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG(f) \ 168 #define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG(f) \
168 SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_S(f) \ 169 SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_S(f) \
169 SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f) 170 SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f)
170 171