comparison src/os_cpu/linux_x86/vm/os_linux_x86.cpp @ 1936:8d88c9ac9247

Correct deopt handler entry. New flag -XX:+TraceSignals. More detailed deopt printing.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Thu, 23 Dec 2010 18:13:28 +0100
parents 2d26b0046e0d
children 00bc9eaf0e24
comparison
equal deleted inserted replaced
1935:98dbef29f10b 1936:8d88c9ac9247
252 if (pc == (address) FetchNPFI) { 252 if (pc == (address) FetchNPFI) {
253 uc->uc_mcontext.gregs[REG_PC] = intptr_t (FetchNResume) ; 253 uc->uc_mcontext.gregs[REG_PC] = intptr_t (FetchNResume) ;
254 return 1 ; 254 return 1 ;
255 } 255 }
256 #endif // AMD64 256 #endif // AMD64
257
258 if (TraceSignals) {
259 CodeBlob* cb = CodeCache::find_blob(pc);
260 if (cb != NULL && cb->is_nmethod()) {
261 nmethod* nm = (nmethod*)cb;
262 int rel = pc - nm->code_begin();
263 tty->print_cr("Implicit exception at %d of method %s", rel, nm->method()->name()->as_C_string());
264 } else {
265 tty->print_cr("No code blob found for %x", pc);
266 }
267 }
257 268
258 // Handle ALL stack overflow variations here 269 // Handle ALL stack overflow variations here
259 if (sig == SIGSEGV) { 270 if (sig == SIGSEGV) {
260 address addr = (address) info->si_addr; 271 address addr = (address) info->si_addr;
261 272
352 fatal("please update this code."); 363 fatal("please update this code.");
353 } 364 }
354 #endif // AMD64 365 #endif // AMD64
355 } else if (sig == SIGSEGV && 366 } else if (sig == SIGSEGV &&
356 !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) { 367 !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
368 if (TraceSignals) {
369 tty->print_cr("Implicit exception continuation");
370 }
357 // Determination of interpreter/vtable stub/compiled code null exception 371 // Determination of interpreter/vtable stub/compiled code null exception
358 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL); 372 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
373 } else if (sig == SIGSEGV) {
374 if (TraceSignals) {
375 tty->print_cr("would have needed explicit null check %d", (intptr_t)info->si_addr);
376 }
359 } 377 }
360 } else if (thread->thread_state() == _thread_in_vm && 378 } else if (thread->thread_state() == _thread_in_vm &&
361 sig == SIGBUS && /* info->si_code == BUS_OBJERR && */ 379 sig == SIGBUS && /* info->si_code == BUS_OBJERR && */
362 thread->doing_unsafe_access()) { 380 thread->doing_unsafe_access()) {
363 stub = StubRoutines::handler_for_unsafe_access(); 381 stub = StubRoutines::handler_for_unsafe_access();