353 // that we should fix this. 354 sig = os::signal_wait(); 355 } 356 if (sig == os::sigexitnum_pd()) { 357 // Terminate the signal thread 358 return; 359 } 360 361 switch (sig) { 362 case SIGBREAK: { 363 // Check if the signal is a trigger to start the Attach Listener - in that 364 // case don't print stack traces. 365 if (!DisableAttachMechanism) { 366 // Attempt to transit state to AL_INITIALIZING. 367 AttachListenerState cur_state = AttachListener::transit_state(AL_INITIALIZING, AL_NOT_INITIALIZED); 368 if (cur_state == AL_INITIALIZING) { 369 // Attach Listener has been started to initialize. Ignore this signal. 370 continue; 371 } else if (cur_state == AL_NOT_INITIALIZED) { 372 // Start to initialize. 373 if (!AttachListener::is_init_trigger()) { 374 // Attach Listener could not be started. 375 // So we need to transit the state to AL_NOT_INITIALIZED. 376 AttachListener::set_state(AL_NOT_INITIALIZED); 377 } 378 continue; 379 } else if (AttachListener::check_socket_file()) { 380 // Attach Listener has been started, but unix domain socket file 381 // does not exist. So restart Attach Listener. 382 continue; 383 } 384 } 385 // Print stack traces 386 // Any SIGBREAK operations added here should make sure to flush 387 // the output stream (e.g. tty->flush()) after output. See 4803766. 388 // Each module also prints an extra carriage return after its output. 389 VM_PrintThreads op; 390 VMThread::execute(&op); 391 VM_PrintJNI jni_op; 392 VMThread::execute(&jni_op); 393 VM_FindDeadlocks op1(tty); 394 VMThread::execute(&op1); 395 Universe::print_heap_at_SIGBREAK(); 396 if (PrintClassHistogram) { 397 VM_GC_HeapInspection op1(tty, true /* force full GC before heap inspection */); 398 VMThread::execute(&op1); | 353 // that we should fix this. 354 sig = os::signal_wait(); 355 } 356 if (sig == os::sigexitnum_pd()) { 357 // Terminate the signal thread 358 return; 359 } 360 361 switch (sig) { 362 case SIGBREAK: { 363 // Check if the signal is a trigger to start the Attach Listener - in that 364 // case don't print stack traces. 365 if (!DisableAttachMechanism) { 366 // Attempt to transit state to AL_INITIALIZING. 367 AttachListenerState cur_state = AttachListener::transit_state(AL_INITIALIZING, AL_NOT_INITIALIZED); 368 if (cur_state == AL_INITIALIZING) { 369 // Attach Listener has been started to initialize. Ignore this signal. 370 continue; 371 } else if (cur_state == AL_NOT_INITIALIZED) { 372 // Start to initialize. 373 if (AttachListener::is_init_trigger()) { 374 // Attach Listener has been initialized. 375 // Accept subsequent request. 376 continue; 377 } else { 378 // Attach Listener could not be started. 379 // So we need to transit the state to AL_NOT_INITIALIZED. 380 AttachListener::set_state(AL_NOT_INITIALIZED); 381 } 382 } else if (AttachListener::check_socket_file()) { 383 // Attach Listener has been started, but unix domain socket file 384 // does not exist. So restart Attach Listener. 385 continue; 386 } 387 } 388 // Print stack traces 389 // Any SIGBREAK operations added here should make sure to flush 390 // the output stream (e.g. tty->flush()) after output. See 4803766. 391 // Each module also prints an extra carriage return after its output. 392 VM_PrintThreads op; 393 VMThread::execute(&op); 394 VM_PrintJNI jni_op; 395 VMThread::execute(&jni_op); 396 VM_FindDeadlocks op1(tty); 397 VMThread::execute(&op1); 398 Universe::print_heap_at_SIGBREAK(); 399 if (PrintClassHistogram) { 400 VM_GC_HeapInspection op1(tty, true /* force full GC before heap inspection */); 401 VMThread::execute(&op1); |