comparison src/share/vm/runtime/java.cpp @ 17992:a45a4f5a9609

8044796: G1: Enable G1CollectedHeap::stop() Reviewed-by: brutisso, sjohanss
author pliden
date Fri, 13 Jun 2014 13:46:06 +0200
parents 1772223a25a2
children 52b4284cb496 833b0f92429a
comparison
equal deleted inserted replaced
17991:a07a3a29df67 17992:a45a4f5a9609
495 // Hang forever on exit if we're reporting an error. 495 // Hang forever on exit if we're reporting an error.
496 if (ShowMessageBoxOnError && is_error_reported()) { 496 if (ShowMessageBoxOnError && is_error_reported()) {
497 os::infinite_sleep(); 497 os::infinite_sleep();
498 } 498 }
499 499
500 // Stop any ongoing concurrent GC work
501 Universe::heap()->stop();
502
503 // Terminate watcher thread - must before disenrolling any periodic task 500 // Terminate watcher thread - must before disenrolling any periodic task
504 if (PeriodicTask::num_tasks() > 0) 501 if (PeriodicTask::num_tasks() > 0)
505 WatcherThread::stop(); 502 WatcherThread::stop();
506 503
507 // Print statistics gathered (profiling ...) 504 // Print statistics gathered (profiling ...)
512 509
513 // shut down the StatSampler task 510 // shut down the StatSampler task
514 StatSampler::disengage(); 511 StatSampler::disengage();
515 StatSampler::destroy(); 512 StatSampler::destroy();
516 513
517 // We do not need to explicitly stop concurrent GC threads because the 514 // Stop concurrent GC threads
518 // JVM will be taken down at a safepoint when such threads are inactive -- 515 Universe::heap()->stop();
519 // except for some concurrent G1 threads, see (comment in)
520 // Threads::destroy_vm().
521 516
522 // Print GC/heap related information. 517 // Print GC/heap related information.
523 if (PrintGCDetails) { 518 if (PrintGCDetails) {
524 Universe::print(); 519 Universe::print();
525 AdaptiveSizePolicyOutput(0); 520 AdaptiveSizePolicyOutput(0);