245
246 switch (sig) {
247 case SIGBREAK: {
248 // Check if the signal is a trigger to start the Attach Listener - in that
249 // case don't print stack traces.
250 if (!DisableAttachMechanism && AttachListener::is_init_trigger()) {
251 continue;
252 }
253 // Print stack traces
254 // Any SIGBREAK operations added here should make sure to flush
255 // the output stream (e.g. tty->flush()) after output. See 4803766.
256 // Each module also prints an extra carriage return after its output.
257 VM_PrintThreads op;
258 VMThread::execute(&op);
259 VM_PrintJNI jni_op;
260 VMThread::execute(&jni_op);
261 VM_FindDeadlocks op1(tty);
262 VMThread::execute(&op1);
263 Universe::print_heap_at_SIGBREAK();
264 if (PrintClassHistogram) {
265 VM_GC_HeapInspection op1(gclog_or_tty, true /* force full GC before heap inspection */);
266 VMThread::execute(&op1);
267 }
268 if (JvmtiExport::should_post_data_dump()) {
269 JvmtiExport::post_data_dump();
270 }
271 break;
272 }
273 default: {
274 // Dispatch the signal to java
275 HandleMark hm(THREAD);
276 Klass* k = SystemDictionary::resolve_or_null(vmSymbols::sun_misc_Signal(), THREAD);
277 KlassHandle klass (THREAD, k);
278 if (klass.not_null()) {
279 JavaValue result(T_VOID);
280 JavaCallArguments args;
281 args.push_int(sig);
282 JavaCalls::call_static(
283 &result,
284 klass,
285 vmSymbols::dispatch_name(),
|
245
246 switch (sig) {
247 case SIGBREAK: {
248 // Check if the signal is a trigger to start the Attach Listener - in that
249 // case don't print stack traces.
250 if (!DisableAttachMechanism && AttachListener::is_init_trigger()) {
251 continue;
252 }
253 // Print stack traces
254 // Any SIGBREAK operations added here should make sure to flush
255 // the output stream (e.g. tty->flush()) after output. See 4803766.
256 // Each module also prints an extra carriage return after its output.
257 VM_PrintThreads op;
258 VMThread::execute(&op);
259 VM_PrintJNI jni_op;
260 VMThread::execute(&jni_op);
261 VM_FindDeadlocks op1(tty);
262 VMThread::execute(&op1);
263 Universe::print_heap_at_SIGBREAK();
264 if (PrintClassHistogram) {
265 VM_GC_HeapInspection op1(tty, true /* force full GC before heap inspection */);
266 VMThread::execute(&op1);
267 }
268 if (JvmtiExport::should_post_data_dump()) {
269 JvmtiExport::post_data_dump();
270 }
271 break;
272 }
273 default: {
274 // Dispatch the signal to java
275 HandleMark hm(THREAD);
276 Klass* k = SystemDictionary::resolve_or_null(vmSymbols::sun_misc_Signal(), THREAD);
277 KlassHandle klass (THREAD, k);
278 if (klass.not_null()) {
279 JavaValue result(T_VOID);
280 JavaCallArguments args;
281 args.push_int(sig);
282 JavaCalls::call_static(
283 &result,
284 klass,
285 vmSymbols::dispatch_name(),
|