diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index e1064f6f134c..f12b2880c2f8 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -286,7 +286,7 @@ trap(frame) */ if (kdb_on_nmi) { printf ("NMI ... going to debugger\n"); - kdb_trap (type, 0, &frame); + kdb_trap(type, 0, &frame); } #endif /* KDB */ goto userout; @@ -747,6 +747,9 @@ syscall(frame) ktrsyscall(code, narg, argp); #endif + CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td, + td->td_proc->p_pid, td->td_proc->p_comm, code); + if (error == 0) { td->td_retval[0] = 0; td->td_retval[1] = frame.tf_rdx; @@ -810,6 +813,9 @@ syscall(frame) */ userret(td, &frame, sticks); + CTR4(KTR_SYSC, "syscall exit thread %p pid %d proc %s code %d", td, + td->td_proc->p_pid, td->td_proc->p_comm, code); + #ifdef KTRACE if (KTRPOINT(td, KTR_SYSRET)) ktrsysret(code, error, td->td_retval[0]);