169
170 // Exactly one GC selected
171 FOR_EACH_INCLUDED_GC(gc) {
172 if (gc->_flag) {
173 return &gc->_arguments;
174 }
175 }
176
177 fatal("Should have found the selected GC");
178
179 return NULL;
180 }
181
182 void GCConfig::initialize() {
183 assert(_arguments == NULL, "Already initialized");
184 _arguments = select_gc();
185 }
186
187 bool GCConfig::is_gc_supported(CollectedHeap::Name name) {
188 FOR_EACH_INCLUDED_GC(gc) {
189 if (gc->_name == name) {
190 // Supported
191 return true;
192 }
193 }
194
195 // Not supported
196 return false;
197 }
198
199 bool GCConfig::is_gc_selected(CollectedHeap::Name name) {
200 FOR_EACH_INCLUDED_GC(gc) {
201 if (gc->_name == name && gc->_flag) {
202 // Selected
203 return true;
204 }
205 }
206
207 // Not selected
208 return false;
209 }
|
169
170 // Exactly one GC selected
171 FOR_EACH_INCLUDED_GC(gc) {
172 if (gc->_flag) {
173 return &gc->_arguments;
174 }
175 }
176
177 fatal("Should have found the selected GC");
178
179 return NULL;
180 }
181
182 void GCConfig::initialize() {
183 assert(_arguments == NULL, "Already initialized");
184 _arguments = select_gc();
185 }
186
187 bool GCConfig::is_gc_supported(CollectedHeap::Name name) {
188 FOR_EACH_INCLUDED_GC(gc) {
189 if (gc->_name == name && gc->_arguments.is_supported()) {
190 // Supported
191 return true;
192 }
193 }
194
195 // Not supported
196 return false;
197 }
198
199 bool GCConfig::is_gc_selected(CollectedHeap::Name name) {
200 FOR_EACH_INCLUDED_GC(gc) {
201 if (gc->_name == name && gc->_flag) {
202 // Selected
203 return true;
204 }
205 }
206
207 // Not selected
208 return false;
209 }
|