312 // FIXME: We should try to start the timing earlier to cover more of the GC pause
313 // The PrintGCDetails logging starts before we have incremented the GC id. We will do that later
314 // so we can assume here that the next GC id is what we want.
315 GCTraceTime t1(gen->short_name(), PrintGCDetails, false, NULL, GCId::peek());
316 TraceCollectorStats tcs(gen->counters());
317 TraceMemoryManagerStats tmms(gen->kind(),gc_cause());
318
319 size_t prev_used = gen->used();
320 gen->stat_record()->invocations++;
321 gen->stat_record()->accumulated_time.start();
322
323 // Must be done anew before each collection because
324 // a previous collection will do mangling and will
325 // change top of some spaces.
326 record_gen_tops_before_GC();
327
328 if (PrintGC && Verbose) {
329 // I didn't want to change the logging when removing the level concept,
330 // but I guess this logging could say young/old or something instead of 0/1.
331 uint level;
332 if (gen == GenCollectedHeap::heap()->young_gen()) {
333 level = 0;
334 } else {
335 level = 1;
336 }
337 gclog_or_tty->print("level=%u invoke=%d size=" SIZE_FORMAT,
338 level,
339 gen->stat_record()->invocations,
340 size * HeapWordSize);
341 }
342
343 if (run_verification && VerifyBeforeGC) {
344 HandleMark hm; // Discard invalid handles created during verification
345 Universe::verify(" VerifyBeforeGC:");
346 }
347 COMPILER2_PRESENT(DerivedPointerTable::clear());
348
349 if (restore_marks_for_biased_locking) {
350 // We perform this mark word preservation work lazily
351 // because it's only at this point that we know whether we
352 // absolutely have to do it; we want to avoid doing it for
|
312 // FIXME: We should try to start the timing earlier to cover more of the GC pause
313 // The PrintGCDetails logging starts before we have incremented the GC id. We will do that later
314 // so we can assume here that the next GC id is what we want.
315 GCTraceTime t1(gen->short_name(), PrintGCDetails, false, NULL, GCId::peek());
316 TraceCollectorStats tcs(gen->counters());
317 TraceMemoryManagerStats tmms(gen->kind(),gc_cause());
318
319 size_t prev_used = gen->used();
320 gen->stat_record()->invocations++;
321 gen->stat_record()->accumulated_time.start();
322
323 // Must be done anew before each collection because
324 // a previous collection will do mangling and will
325 // change top of some spaces.
326 record_gen_tops_before_GC();
327
328 if (PrintGC && Verbose) {
329 // I didn't want to change the logging when removing the level concept,
330 // but I guess this logging could say young/old or something instead of 0/1.
331 uint level;
332 if (GenCollectedHeap::heap()->is_young_gen(gen)) {
333 level = 0;
334 } else {
335 level = 1;
336 }
337 gclog_or_tty->print("level=%u invoke=%d size=" SIZE_FORMAT,
338 level,
339 gen->stat_record()->invocations,
340 size * HeapWordSize);
341 }
342
343 if (run_verification && VerifyBeforeGC) {
344 HandleMark hm; // Discard invalid handles created during verification
345 Universe::verify(" VerifyBeforeGC:");
346 }
347 COMPILER2_PRESENT(DerivedPointerTable::clear());
348
349 if (restore_marks_for_biased_locking) {
350 // We perform this mark word preservation work lazily
351 // because it's only at this point that we know whether we
352 // absolutely have to do it; we want to avoid doing it for
|