316
317 assert(!NeverTenure || _tenuring_threshold == markOopDesc::max_age + 1, "Sanity");
318 assert(!AlwaysTenure || _tenuring_threshold == 0, "Sanity");
319
320 size_t prev_used = heap->used();
321
322 // Fill in TLABs
323 heap->accumulate_statistics_all_tlabs();
324 heap->ensure_parsability(true); // retire TLABs
325
326 if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) {
327 HandleMark hm; // Discard invalid handles created during verification
328 gclog_or_tty->print(" VerifyBeforeGC:");
329 Universe::verify();
330 }
331
332 {
333 ResourceMark rm;
334 HandleMark hm;
335
336 gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps);
337 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
338 GCTraceTime t1(GCCauseString("GC", gc_cause), PrintGC, !PrintGCDetails, NULL);
339 TraceCollectorStats tcs(counters());
340 TraceMemoryManagerStats tms(false /* not full GC */,gc_cause);
341
342 if (TraceGen0Time) accumulated_time()->start();
343
344 // Let the size policy know we're starting
345 size_policy->minor_collection_begin();
346
347 // Verify the object start arrays.
348 if (VerifyObjectStartArray &&
349 VerifyBeforeGC) {
350 old_gen->verify_object_start_array();
351 perm_gen->verify_object_start_array();
352 }
353
354 // Verify no unmarked old->young roots
355 if (VerifyRememberedSets) {
356 CardTableExtension::verify_all_young_refs_imprecise();
|
316
317 assert(!NeverTenure || _tenuring_threshold == markOopDesc::max_age + 1, "Sanity");
318 assert(!AlwaysTenure || _tenuring_threshold == 0, "Sanity");
319
320 size_t prev_used = heap->used();
321
322 // Fill in TLABs
323 heap->accumulate_statistics_all_tlabs();
324 heap->ensure_parsability(true); // retire TLABs
325
326 if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) {
327 HandleMark hm; // Discard invalid handles created during verification
328 gclog_or_tty->print(" VerifyBeforeGC:");
329 Universe::verify();
330 }
331
332 {
333 ResourceMark rm;
334 HandleMark hm;
335
336 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
337 GCTraceTime t1(GCCauseString("GC", gc_cause), PrintGC, !PrintGCDetails, NULL);
338 TraceCollectorStats tcs(counters());
339 TraceMemoryManagerStats tms(false /* not full GC */,gc_cause);
340
341 if (TraceGen0Time) accumulated_time()->start();
342
343 // Let the size policy know we're starting
344 size_policy->minor_collection_begin();
345
346 // Verify the object start arrays.
347 if (VerifyObjectStartArray &&
348 VerifyBeforeGC) {
349 old_gen->verify_object_start_array();
350 perm_gen->verify_object_start_array();
351 }
352
353 // Verify no unmarked old->young roots
354 if (VerifyRememberedSets) {
355 CardTableExtension::verify_all_young_refs_imprecise();
|