Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/ktrace.h
Show First 20 Lines • Show All 259 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* trace flags (also in p_traceflags) | * trace flags (also in p_traceflags) | ||||
*/ | */ | ||||
#define KTRFAC_ROOT 0x80000000 /* root set this trace */ | #define KTRFAC_ROOT 0x80000000 /* root set this trace */ | ||||
#define KTRFAC_INHERIT 0x40000000 /* pass trace flags to children */ | #define KTRFAC_INHERIT 0x40000000 /* pass trace flags to children */ | ||||
#define KTRFAC_DROP 0x20000000 /* last event was dropped */ | #define KTRFAC_DROP 0x20000000 /* last event was dropped */ | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
struct ktr_io_params; | |||||
struct vnode *ktr_get_tracevp(struct proc *, bool); | |||||
void ktr_io_params_free(struct ktr_io_params *); | |||||
void ktrnamei(char *); | void ktrnamei(char *); | ||||
void ktrcsw(int, int, const char *); | void ktrcsw(int, int, const char *); | ||||
void ktrpsig(int, sig_t, sigset_t *, int); | void ktrpsig(int, sig_t, sigset_t *, int); | ||||
void ktrfault(vm_offset_t, int); | void ktrfault(vm_offset_t, int); | ||||
void ktrfaultend(int); | void ktrfaultend(int); | ||||
void ktrgenio(int, enum uio_rw, struct uio *, int); | void ktrgenio(int, enum uio_rw, struct uio *, int); | ||||
void ktrsyscall(int, int narg, register_t args[]); | void ktrsyscall(int, int narg, register_t args[]); | ||||
void ktrsysctl(int *name, u_int namelen); | void ktrsysctl(int *name, u_int namelen); | ||||
void ktrsysret(int, int, register_t); | void ktrsysret(int, int, register_t); | ||||
void ktrprocctor(struct proc *); | void ktrprocctor(struct proc *); | ||||
void ktrprocexec(struct proc *, struct ucred **, struct vnode **); | struct ktr_io_params *ktrprocexec(struct proc *); | ||||
void ktrprocexit(struct thread *); | void ktrprocexit(struct thread *); | ||||
void ktrprocfork(struct proc *, struct proc *); | void ktrprocfork(struct proc *, struct proc *); | ||||
void ktruserret(struct thread *); | void ktruserret(struct thread *); | ||||
void ktrstruct(const char *, const void *, size_t); | void ktrstruct(const char *, const void *, size_t); | ||||
void ktrstruct_error(const char *, const void *, size_t, int); | void ktrstruct_error(const char *, const void *, size_t, int); | ||||
void ktrstructarray(const char *, enum uio_seg, const void *, int, size_t); | void ktrstructarray(const char *, enum uio_seg, const void *, int, size_t); | ||||
void ktrcapfail(enum ktr_cap_fail_type, const cap_rights_t *, | void ktrcapfail(enum ktr_cap_fail_type, const cap_rights_t *, | ||||
const cap_rights_t *); | const cap_rights_t *); | ||||
#define ktrcaprights(s) \ | #define ktrcaprights(s) \ | ||||
ktrstruct("caprights", (s), sizeof(cap_rights_t)) | ktrstruct("caprights", (s), sizeof(cap_rights_t)) | ||||
#define ktritimerval(s) \ | #define ktritimerval(s) \ | ||||
ktrstruct("itimerval", (s), sizeof(struct itimerval)) | ktrstruct("itimerval", (s), sizeof(struct itimerval)) | ||||
#define ktrsockaddr(s) \ | #define ktrsockaddr(s) \ | ||||
ktrstruct("sockaddr", (s), ((struct sockaddr *)(s))->sa_len) | ktrstruct("sockaddr", (s), ((struct sockaddr *)(s))->sa_len) | ||||
#define ktrstat(s) \ | #define ktrstat(s) \ | ||||
ktrstruct("stat", (s), sizeof(struct stat)) | ktrstruct("stat", (s), sizeof(struct stat)) | ||||
#define ktrstat_error(s, error) \ | #define ktrstat_error(s, error) \ | ||||
ktrstruct_error("stat", (s), sizeof(struct stat), error) | ktrstruct_error("stat", (s), sizeof(struct stat), error) | ||||
extern u_int ktr_geniosize; | extern u_int ktr_geniosize; | ||||
extern int ktr_filesize_limit_signal; | |||||
#else | #else | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__BEGIN_DECLS | __BEGIN_DECLS | ||||
int ktrace(const char *, int, int, pid_t); | int ktrace(const char *, int, int, pid_t); | ||||
int utrace(const void *, size_t); | int utrace(const void *, size_t); | ||||
__END_DECLS | __END_DECLS | ||||
#endif | #endif | ||||
#endif | #endif |