mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
7051430: CMS: ongoing CMS cycle should terminate abruptly to allow prompt JVM termination at exit
It turns out that there is no need to explicitly stop CMS since the JVM is taken down at a terminal safepoint during which CMS threads are (terminally) inactive. This will need to be revised if and when we evolve in the future to a point where we allow JVM reincarnation in the same process, but those changes will be much more sweeping than just terminating CMS threads. The unused ::stop() methods will be removed in a separate CR. Also include in this CR is the fix for a small typo in the spelling of UseGCLogFileRotation in a message in arguments.cpp, brought to our attention by Rainer Jung and reviewed by minqi. Reviewed-by: johnc, jwilhelm
This commit is contained in:
parent
f79196c54c
commit
9ca97e4c78
3 changed files with 13 additions and 7 deletions
|
@ -3698,6 +3698,14 @@ bool Threads::destroy_vm() {
|
|||
// heap is unparseable if they are caught. Grab the Heap_lock
|
||||
// to prevent this. The GC vm_operations will not be able to
|
||||
// queue until after the vm thread is dead.
|
||||
// After this point, we'll never emerge out of the safepoint before
|
||||
// the VM exits, so concurrent GC threads do not need to be explicitly
|
||||
// stopped; they remain inactive until the process exits.
|
||||
// Note: some concurrent G1 threads may be running during a safepoint,
|
||||
// but these will not be accessing the heap, just some G1-specific side
|
||||
// data structures that are not accessed by any other threads but them
|
||||
// after this point in a terminal safepoint.
|
||||
|
||||
MutexLocker ml(Heap_lock);
|
||||
|
||||
VMThread::wait_for_vm_thread_exit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue