Sync with i386 - trace syscall entry/exit times, and a cosmetic fix.

This commit is contained in:
Peter Wemm 2004-08-16 22:56:20 +00:00
parent b78f845dec
commit 717209c708
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133901

View File

@ -286,7 +286,7 @@ trap(frame)
*/ */
if (kdb_on_nmi) { if (kdb_on_nmi) {
printf ("NMI ... going to debugger\n"); printf ("NMI ... going to debugger\n");
kdb_trap (type, 0, &frame); kdb_trap(type, 0, &frame);
} }
#endif /* KDB */ #endif /* KDB */
goto userout; goto userout;
@ -747,6 +747,9 @@ syscall(frame)
ktrsyscall(code, narg, argp); ktrsyscall(code, narg, argp);
#endif #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) { if (error == 0) {
td->td_retval[0] = 0; td->td_retval[0] = 0;
td->td_retval[1] = frame.tf_rdx; td->td_retval[1] = frame.tf_rdx;
@ -810,6 +813,9 @@ syscall(frame)
*/ */
userret(td, &frame, sticks); 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 #ifdef KTRACE
if (KTRPOINT(td, KTR_SYSRET)) if (KTRPOINT(td, KTR_SYSRET))
ktrsysret(code, error, td->td_retval[0]); ktrsysret(code, error, td->td_retval[0]);