Generate KTR trace records for syscall enter and exit in i386 system
calls. Note that the information included is a bit different from the existing KTR traces generated on powerpc, as I'm primarily interested in kernel context (thread, syscall #, proc, etc), not the user arguments to the system call. Some convergence would be useful here.
This commit is contained in:
parent
3659f747f1
commit
f6b61a6442
@ -983,6 +983,9 @@ syscall(frame)
|
||||
ktrsyscall(code, narg, args);
|
||||
#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);
|
||||
|
||||
/*
|
||||
* Try to run the syscall without Giant if the syscall
|
||||
* is MP safe.
|
||||
@ -1050,6 +1053,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]);
|
||||
|
Loading…
Reference in New Issue
Block a user