mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 17:14:41 +02:00
8290020: Deadlock in leakprofiler::emit_events during shutdown
Reviewed-by: mgronlun, dholmes, egahlin
This commit is contained in:
parent
7f0e9bd632
commit
e8568b890a
6 changed files with 30 additions and 34 deletions
|
@ -401,7 +401,7 @@ void print_statistics() {
|
|||
// Note: before_exit() can be executed only once, if more than one threads
|
||||
// are trying to shutdown the VM at the same time, only one thread
|
||||
// can run before_exit() and all other threads must wait.
|
||||
void before_exit(JavaThread* thread) {
|
||||
void before_exit(JavaThread* thread, bool halt) {
|
||||
#define BEFORE_EXIT_NOT_RUN 0
|
||||
#define BEFORE_EXIT_RUNNING 1
|
||||
#define BEFORE_EXIT_DONE 2
|
||||
|
@ -448,7 +448,7 @@ void before_exit(JavaThread* thread) {
|
|||
event.commit();
|
||||
}
|
||||
|
||||
JFR_ONLY(Jfr::on_vm_shutdown();)
|
||||
JFR_ONLY(Jfr::on_vm_shutdown(false, halt);)
|
||||
|
||||
// Stop the WatcherThread. We do this before disenrolling various
|
||||
// PeriodicTasks to reduce the likelihood of races.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue