1229 size_t size,
1230 bool tlab)
1231 {
1232 // We allow a STW collection only if a full
1233 // collection was requested.
1234 return full || should_allocate(size, tlab); // FIX ME !!!
1235 // This and promotion failure handling are connected at the
1236 // hip and should be fixed by untying them.
1237 }
1238
1239 bool CMSCollector::shouldConcurrentCollect() {
1240 if (_full_gc_requested) {
1241 if (Verbose && PrintGCDetails) {
1242 gclog_or_tty->print_cr("CMSCollector: collect because of explicit "
1243 " gc request (or gc_locker)");
1244 }
1245 return true;
1246 }
1247
1248 // For debugging purposes, change the type of collection.
1249 // If the rotation is not on the concurrent collection
1250 // type, don't start a concurrent collection.
1251 NOT_PRODUCT(
1252 if (RotateCMSCollectionTypes) {
1253 return _cmsGen->debug_concurrent_cycle();
1254 }
1255 )
1256
1257 FreelistLocker x(this);
1258 // ------------------------------------------------------------------
1259 // Print out lots of information which affects the initiation of
1260 // a collection.
1261 if (PrintCMSInitiationStatistics && stats().valid()) {
1262 gclog_or_tty->print("CMSCollector shouldConcurrentCollect: ");
1263 gclog_or_tty->stamp();
1264 gclog_or_tty->cr();
1265 stats().print_on(gclog_or_tty);
1266 gclog_or_tty->print_cr("time_until_cms_gen_full %3.7f",
1267 stats().time_until_cms_gen_full());
1268 gclog_or_tty->print_cr("free="SIZE_FORMAT, _cmsGen->free());
1269 gclog_or_tty->print_cr("contiguous_available="SIZE_FORMAT,
1270 _cmsGen->contiguous_available());
|
1229 size_t size,
1230 bool tlab)
1231 {
1232 // We allow a STW collection only if a full
1233 // collection was requested.
1234 return full || should_allocate(size, tlab); // FIX ME !!!
1235 // This and promotion failure handling are connected at the
1236 // hip and should be fixed by untying them.
1237 }
1238
1239 bool CMSCollector::shouldConcurrentCollect() {
1240 if (_full_gc_requested) {
1241 if (Verbose && PrintGCDetails) {
1242 gclog_or_tty->print_cr("CMSCollector: collect because of explicit "
1243 " gc request (or gc_locker)");
1244 }
1245 return true;
1246 }
1247
1248 // For debugging purposes, change the type of collection.
1249 // Rotate between concurrent and stop-the-world full GCs.
1250 NOT_PRODUCT(
1251 if (RotateCMSCollectionTypes) {
1252 return _cmsGen->debug_concurrent_cycle();
1253 }
1254 )
1255
1256 FreelistLocker x(this);
1257 // ------------------------------------------------------------------
1258 // Print out lots of information which affects the initiation of
1259 // a collection.
1260 if (PrintCMSInitiationStatistics && stats().valid()) {
1261 gclog_or_tty->print("CMSCollector shouldConcurrentCollect: ");
1262 gclog_or_tty->stamp();
1263 gclog_or_tty->cr();
1264 stats().print_on(gclog_or_tty);
1265 gclog_or_tty->print_cr("time_until_cms_gen_full %3.7f",
1266 stats().time_until_cms_gen_full());
1267 gclog_or_tty->print_cr("free="SIZE_FORMAT, _cmsGen->free());
1268 gclog_or_tty->print_cr("contiguous_available="SIZE_FORMAT,
1269 _cmsGen->contiguous_available());
|