From d80c69964bb9d54fb8a5d50a43f0f043773ca4ba Mon Sep 17 00:00:00 2001 From: John Birrell Date: Thu, 3 Aug 2006 05:26:51 +0000 Subject: [PATCH] Add fields to struct sysent to support the DTrace syscall provider called systrace. Another file called systrace_args.c is generated. This will be compiled into systrace and is used to map the syscall arguments into the 64-bit parameter array. --- sys/sys/sysent.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 4e4f25eae36..7e4d7aa45bb 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -35,15 +35,31 @@ #include struct proc; +struct sysent; struct thread; struct ksiginfo; typedef int sy_call_t(struct thread *, void *); +/* Used by the machine dependent syscall() code. */ +typedef void (*systrace_probe_func_t)(u_int32_t, int, struct sysent *, void *); + +/* + * Used by loaded syscalls to convert arguments to a DTrace array + * of 64-bit arguments. + */ +typedef void (*systrace_args_func_t)(void *, u_int64_t *, int *); + +extern systrace_probe_func_t systrace_probe_func; + struct sysent { /* system call table */ int sy_narg; /* number of arguments */ sy_call_t *sy_call; /* implementing function */ au_event_t sy_auevent; /* audit event associated with syscall */ + systrace_args_func_t sy_systrace_args_func; + /* optional argument conversion function. */ + u_int32_t sy_entry; /* DTrace entry ID for systrace. */ + u_int32_t sy_return; /* DTrace return ID for systrace. */ }; struct image_params;