466 } else { 467 thread->tlab().make_parsable(); 468 } 469 } 470 } 471 472 stats.publish(); 473 } 474 475 void CollectedHeap::resize_all_tlabs() { 476 assert(SafepointSynchronize::is_at_safepoint() || !is_init_completed(), 477 "Should only resize tlabs at safepoint"); 478 479 if (UseTLAB && ResizeTLAB) { 480 for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) { 481 thread->tlab().resize(); 482 } 483 } 484 } 485 486 Tickspan CollectedHeap::run_task(AbstractGangTask* task) { 487 Ticks start = Ticks::now(); 488 489 // FIXME 490 Unimplemented(); 491 492 return Ticks::now() - start; 493 } 494 495 void CollectedHeap::full_gc_dump(GCTimer* timer, bool before) { 496 assert(timer != NULL, "timer is null"); 497 if ((HeapDumpBeforeFullGC && before) || (HeapDumpAfterFullGC && !before)) { 498 GCTraceTime(Info, gc) tm(before ? "Heap Dump (before full gc)" : "Heap Dump (after full gc)", timer); 499 HeapDumper::dump_heap(); 500 } 501 502 LogTarget(Trace, gc, classhisto) lt; 503 if (lt.is_enabled()) { 504 GCTraceTime(Trace, gc, classhisto) tm(before ? "Class Histogram (before full gc)" : "Class Histogram (after full gc)", timer); 505 ResourceMark rm; 506 LogStream ls(lt); 507 VM_GC_HeapInspection inspector(&ls, false /* ! full gc */); 508 inspector.doit(); 509 } 510 } 511 512 void CollectedHeap::pre_full_gc_dump(GCTimer* timer) { 513 full_gc_dump(timer, true); 514 } | 466 } else { 467 thread->tlab().make_parsable(); 468 } 469 } 470 } 471 472 stats.publish(); 473 } 474 475 void CollectedHeap::resize_all_tlabs() { 476 assert(SafepointSynchronize::is_at_safepoint() || !is_init_completed(), 477 "Should only resize tlabs at safepoint"); 478 479 if (UseTLAB && ResizeTLAB) { 480 for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) { 481 thread->tlab().resize(); 482 } 483 } 484 } 485 486 void CollectedHeap::full_gc_dump(GCTimer* timer, bool before) { 487 assert(timer != NULL, "timer is null"); 488 if ((HeapDumpBeforeFullGC && before) || (HeapDumpAfterFullGC && !before)) { 489 GCTraceTime(Info, gc) tm(before ? "Heap Dump (before full gc)" : "Heap Dump (after full gc)", timer); 490 HeapDumper::dump_heap(); 491 } 492 493 LogTarget(Trace, gc, classhisto) lt; 494 if (lt.is_enabled()) { 495 GCTraceTime(Trace, gc, classhisto) tm(before ? "Class Histogram (before full gc)" : "Class Histogram (after full gc)", timer); 496 ResourceMark rm; 497 LogStream ls(lt); 498 VM_GC_HeapInspection inspector(&ls, false /* ! full gc */); 499 inspector.doit(); 500 } 501 } 502 503 void CollectedHeap::pre_full_gc_dump(GCTimer* timer) { 504 full_gc_dump(timer, true); 505 } |