diff --git a/share/man/man9/SDT.9 b/share/man/man9/SDT.9 index 39fbdeb846a9..9b8af2ab2aca 100644 --- a/share/man/man9/SDT.9 +++ b/share/man/man9/SDT.9 @@ -35,28 +35,28 @@ .Fn SDT_PROVIDER_DECLARE prov .Fn SDT_PROVIDER_DEFINE prov .Fn SDT_PROBE_DECLARE prov mod func name -.Fn SDT_PROBE_DEFINE prov mod func name sname -.Fn SDT_PROBE_DEFINE0 prov mod func name sname -.Fn SDT_PROBE_DEFINE1 prov mod func name sname arg0 -.Fn SDT_PROBE_DEFINE2 prov mod func name sname arg0 arg1 -.Fn SDT_PROBE_DEFINE3 prov mod func name sname arg0 arg1 arg2 -.Fn SDT_PROBE_DEFINE4 prov mod func name sname arg0 arg1 arg2 arg3 -.Fn SDT_PROBE_DEFINE5 prov mod func name sname arg0 arg1 arg2 arg3 arg4 -.Fn SDT_PROBE_DEFINE6 prov mod func name sname arg0 arg1 arg2 arg3 arg4 arg5 -.Fn SDT_PROBE_DEFINE7 prov mod func name sname arg0 arg1 arg2 arg3 arg4 arg5 \ +.Fn SDT_PROBE_DEFINE prov mod func name +.Fn SDT_PROBE_DEFINE0 prov mod func name +.Fn SDT_PROBE_DEFINE1 prov mod func name arg0 +.Fn SDT_PROBE_DEFINE2 prov mod func name arg0 arg1 +.Fn SDT_PROBE_DEFINE3 prov mod func name arg0 arg1 arg2 +.Fn SDT_PROBE_DEFINE4 prov mod func name arg0 arg1 arg2 arg3 +.Fn SDT_PROBE_DEFINE5 prov mod func name arg0 arg1 arg2 arg3 arg4 +.Fn SDT_PROBE_DEFINE6 prov mod func name arg0 arg1 arg2 arg3 arg4 arg5 +.Fn SDT_PROBE_DEFINE7 prov mod func name arg0 arg1 arg2 arg3 arg4 arg5 \ arg6 -.Fn SDT_PROBE_DEFINE0_XLATE prov mod func name sname -.Fn SDT_PROBE_DEFINE1_XLATE prov mod func name sname arg0 xarg0 -.Fn SDT_PROBE_DEFINE2_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 -.Fn SDT_PROBE_DEFINE3_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \ +.Fn SDT_PROBE_DEFINE0_XLATE prov mod func name +.Fn SDT_PROBE_DEFINE1_XLATE prov mod func name arg0 xarg0 +.Fn SDT_PROBE_DEFINE2_XLATE prov mod func name arg0 xarg0 arg1 xarg1 +.Fn SDT_PROBE_DEFINE3_XLATE prov mod func name arg0 xarg0 arg1 xarg1 \ arg2 xarg2 -.Fn SDT_PROBE_DEFINE4_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \ +.Fn SDT_PROBE_DEFINE4_XLATE prov mod func name arg0 xarg0 arg1 xarg1 \ arg2 xarg2 arg3 xarg3 -.Fn SDT_PROBE_DEFINE5_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \ +.Fn SDT_PROBE_DEFINE5_XLATE prov mod func name arg0 xarg0 arg1 xarg1 \ arg2 xarg2 arg3 xarg3 arg4 xarg4 -.Fn SDT_PROBE_DEFINE6_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \ +.Fn SDT_PROBE_DEFINE6_XLATE prov mod func name arg0 xarg0 arg1 xarg1 \ arg2 xarg2 arg3 xarg3 arg4 xarg4 arg5 xarg5 -.Fn SDT_PROBE_DEFINE7_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \ +.Fn SDT_PROBE_DEFINE7_XLATE prov mod func name arg0 xarg0 arg1 xarg1 \ arg2 xarg2 arg3 xarg3 arg4 xarg4 arg5 xarg5 arg6 xarg6 .Fn SDT_PROBE0 prov mod func name .Fn SDT_PROBE1 prov mod func name arg0 @@ -136,20 +136,19 @@ See the section. Note in particular that probes must not be defined across multiple kernel modules. -The -.Fn SDT_PROBE_DEFINE* -macros also take an extra -.Ar sname -parameter. -This is used to allow the creation of probes with names containing the +.Pp +If .Ql - -character. -Specifically, the +character (dash) is wanted in a probe name, +then it should be represented as +.Ql __ +(double underscore) in the probe .Ar name -argument should contain the probe name with all dashes converted to underscores, -and the -.Ar sname -argument should be the probe name as it will be referenced by D scripts. +parameter passed to various +.Fn SDT_* +macros, +because of technical reasons +(a dash is not valid in C identifiers). .Pp The .Fn SDT_PROBE_DEFINE* diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index 82cbb37f2662..bb920e4b22ea 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -628,10 +628,10 @@ ctl_be_block_flush_file(struct ctl_be_block_lun *be_lun, ctl_complete_beio(beio); } -SDT_PROBE_DEFINE1(cbb, kernel, read, file_start, file_start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, file_start, file_start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, read, file_done, file_done,"uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, file_done, file_done, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, read, file_start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, write, file_start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, read, file_done,"uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, write, file_done, "uint64_t"); static void ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun, @@ -960,10 +960,10 @@ ctl_be_block_cw_dispatch(struct ctl_be_block_lun *be_lun, } } -SDT_PROBE_DEFINE1(cbb, kernel, read, start, start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, start, start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, read, alloc_done, alloc_done, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, alloc_done, alloc_done, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, read, start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, write, start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, read, alloc_done, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, write, alloc_done, "uint64_t"); static void ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun, diff --git a/sys/cddl/dev/dtrace/dtrace_test.c b/sys/cddl/dev/dtrace/dtrace_test.c index 9e2f96b9c2ca..9caf2f00f32c 100644 --- a/sys/cddl/dev/dtrace/dtrace_test.c +++ b/sys/cddl/dev/dtrace/dtrace_test.c @@ -39,7 +39,7 @@ SDT_PROVIDER_DEFINE(test); -SDT_PROBE_DEFINE7(test, , , sdttest, sdttest, "int", "int", "int", "int", "int", +SDT_PROBE_DEFINE7(test, , , sdttest, "int", "int", "int", "int", "int", "int", "int"); /* diff --git a/sys/cddl/dev/sdt/sdt.c b/sys/cddl/dev/sdt/sdt.c index 6f0660dd48bd..6856ec7afc3b 100644 --- a/sys/cddl/dev/sdt/sdt.c +++ b/sys/cddl/dev/sdt/sdt.c @@ -136,6 +136,8 @@ sdt_create_probe(struct sdt_probe *probe) char mod[DTRACE_MODNAMELEN]; char func[DTRACE_FUNCNAMELEN]; char name[DTRACE_NAMELEN]; + const char *from; + char *to; size_t len; TAILQ_FOREACH(prov, &sdt_prov_list, prov_entry) @@ -159,7 +161,18 @@ sdt_create_probe(struct sdt_probe *probe) * in the C compiler, so we have to respect const vs non-const. */ strlcpy(func, probe->func, sizeof(func)); - strlcpy(name, probe->name, sizeof(name)); + + from = probe->name; + to = name; + for (len = 0; len < (sizeof(name) - 1) && *from != '\0'; + len++, from++, to++) { + if (from[0] == '_' && from[1] == '_') { + *to = '-'; + from++; + } else + *to = *from; + } + *to = '\0'; if (dtrace_probe_lookup(prov->id, mod, func, name) != DTRACE_IDNONE) return; diff --git a/sys/compat/linux/linux_dtrace.h b/sys/compat/linux/linux_dtrace.h index 7ad6d6d0b5ff..b713f16c82a6 100644 --- a/sys/compat/linux/linux_dtrace.h +++ b/sys/compat/linux/linux_dtrace.h @@ -48,27 +48,27 @@ LINUX_DTRACE, a, b, c) #define _LIN_SDT_PROBE_DEFINE0(a, b, c, d) SDT_PROBE_DEFINE(a, \ - b, c, d, d) + b, c, d) #define LIN_SDT_PROBE_DEFINE0(a, b, c) _LIN_SDT_PROBE_DEFINE0(\ LINUX_DTRACE, a, b, c) #define _LIN_SDT_PROBE_DEFINE1(a, b, c, d, e) SDT_PROBE_DEFINE1(a, \ - b, c, d, d, e) + b, c, d, e) #define LIN_SDT_PROBE_DEFINE1(a, b, c, d) _LIN_SDT_PROBE_DEFINE1(\ LINUX_DTRACE, a, b, c, d) #define _LIN_SDT_PROBE_DEFINE2(a, b, c, d, e, f) SDT_PROBE_DEFINE2(a, \ - b, c, d, d, e, f) + b, c, d, e, f) #define LIN_SDT_PROBE_DEFINE2(a, b, c, d, e) _LIN_SDT_PROBE_DEFINE2(\ LINUX_DTRACE, a, b, c, d, e) #define _LIN_SDT_PROBE_DEFINE3(a, b, c, d, e, f, g) SDT_PROBE_DEFINE3(a, \ - b, c, d, d, e, f, g) + b, c, d, e, f, g) #define LIN_SDT_PROBE_DEFINE3(a, b, c, d, e, f) _LIN_SDT_PROBE_DEFINE3(\ LINUX_DTRACE, a, b, c, d, e, f) #define _LIN_SDT_PROBE_DEFINE4(a, b, c, d, e, f, g, h) SDT_PROBE_DEFINE4(a, \ - b, c, d, d, e, f, g, h) + b, c, d, e, f, g, h) #define LIN_SDT_PROBE_DEFINE4(a, b, c, d, e, f, g) _LIN_SDT_PROBE_DEFINE4(\ LINUX_DTRACE, a, b, c, d, e, f, g) #define _LIN_SDT_PROBE_DEFINE5(a, b, c, d, e, f, g, h, i) \ - SDT_PROBE_DEFINE5(a, b, c, d, d, e, f, g, h, i) + SDT_PROBE_DEFINE5(a, b, c, d, e, f, g, h, i) #define LIN_SDT_PROBE_DEFINE5(a, b, c, d, e, f, g, h) _LIN_SDT_PROBE_DEFINE5(\ LINUX_DTRACE, a, b, c, d, e, f, g, h) diff --git a/sys/dev/xen/blkback/blkback.c b/sys/dev/xen/blkback/blkback.c index 1c0022726b00..f2f26988e53e 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -2030,10 +2030,10 @@ xbb_filter(void *arg) } SDT_PROVIDER_DEFINE(xbb); -SDT_PROBE_DEFINE1(xbb, kernel, xbb_dispatch_dev, flush, flush, "int"); -SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_dev, read, read, "int", "uint64_t", +SDT_PROBE_DEFINE1(xbb, kernel, xbb_dispatch_dev, flush, "int"); +SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_dev, read, "int", "uint64_t", "uint64_t"); -SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_dev, write, write, "int", +SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_dev, write, "int", "uint64_t", "uint64_t"); /*----------------------------- Backend Handlers -----------------------------*/ @@ -2209,10 +2209,10 @@ fail_free_bios: return (error); } -SDT_PROBE_DEFINE1(xbb, kernel, xbb_dispatch_file, flush, flush, "int"); -SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_file, read, read, "int", "uint64_t", +SDT_PROBE_DEFINE1(xbb, kernel, xbb_dispatch_file, flush, "int"); +SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_file, read, "int", "uint64_t", "uint64_t"); -SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_file, write, write, "int", +SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_file, write, "int", "uint64_t", "uint64_t"); /** diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 99de8dbe872e..3d232cf744c5 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -92,7 +92,7 @@ SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL); static struct mtx time_lock; SDT_PROVIDER_DECLARE(sched); -SDT_PROBE_DEFINE2(sched, , , tick, tick, "struct thread *", "struct proc *"); +SDT_PROBE_DEFINE2(sched, , , tick, "struct thread *", "struct proc *"); static int sysctl_kern_cp_time(SYSCTL_HANDLER_ARGS) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 1a668145a8a9..9f4ceac760ae 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -95,9 +95,9 @@ dtrace_execexit_func_t dtrace_fasttrap_exec; #endif SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE1(proc, kernel, , exec, exec, "char *"); -SDT_PROBE_DEFINE1(proc, kernel, , exec_failure, exec-failure, "int"); -SDT_PROBE_DEFINE1(proc, kernel, , exec_success, exec-success, "char *"); +SDT_PROBE_DEFINE1(proc, kernel, , exec, "char *"); +SDT_PROBE_DEFINE1(proc, kernel, , exec__failure, "int"); +SDT_PROBE_DEFINE1(proc, kernel, , exec__success, "char *"); MALLOC_DEFINE(M_PARGS, "proc-args", "Process arguments"); @@ -832,7 +832,7 @@ interpret: vfs_mark_atime(imgp->vp, td->td_ucred); - SDT_PROBE(proc, kernel, , exec_success, args->fname, 0, 0, 0, 0); + SDT_PROBE(proc, kernel, , exec__success, args->fname, 0, 0, 0, 0); done1: /* @@ -904,7 +904,7 @@ exec_fail: p->p_flag &= ~P_INEXEC; PROC_UNLOCK(p); - SDT_PROBE(proc, kernel, , exec_failure, error, 0, 0, 0, 0); + SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0); done2: #ifdef MAC diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index ab2610d7e468..059f6a79b535 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -93,7 +93,7 @@ dtrace_execexit_func_t dtrace_fasttrap_exit; #endif SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE1(proc, kernel, , exit, exit, "int"); +SDT_PROBE_DEFINE1(proc, kernel, , exit, "int"); /* Hook for NFS teardown procedure. */ void (*nlminfo_release_p)(struct proc *p); diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 11160ce4d51f..7eeff0ae7cf9 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -88,7 +88,7 @@ dtrace_fork_func_t dtrace_fasttrap_fork; #endif SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE3(proc, kernel, , create, create, "struct proc *", +SDT_PROBE_DEFINE3(proc, kernel, , create, "struct proc *", "struct proc *", "int"); #ifndef _SYS_SYSPROTO_H_ diff --git a/sys/kern/kern_priv.c b/sys/kern/kern_priv.c index a1e977f02f97..2daa5c29fe42 100644 --- a/sys/kern/kern_priv.c +++ b/sys/kern/kern_priv.c @@ -63,8 +63,8 @@ SYSCTL_INT(_security_bsd, OID_AUTO, unprivileged_mlock, CTLFLAG_RW|CTLFLAG_TUN, TUNABLE_INT("security.bsd.unprivileged_mlock", &unprivileged_mlock); SDT_PROVIDER_DEFINE(priv); -SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv_ok, priv-ok, "int"); -SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv_err, priv-err, "int"); +SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv__ok, "int"); +SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv__err, "int"); /* * Check a credential for privilege. Lots of good reasons to deny privilege; @@ -167,9 +167,9 @@ priv_check_cred(struct ucred *cred, int priv, int flags) error = EPERM; out: if (error) - SDT_PROBE1(priv, kernel, priv_check, priv_err, priv); + SDT_PROBE1(priv, kernel, priv_check, priv__err, priv); else - SDT_PROBE1(priv, kernel, priv_check, priv_ok, priv); + SDT_PROBE1(priv, kernel, priv_check, priv__ok, priv); return (error); } diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index ece250afad5f..b8195de24d9e 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -91,17 +91,17 @@ __FBSDID("$FreeBSD$"); #endif SDT_PROVIDER_DEFINE(proc); -SDT_PROBE_DEFINE4(proc, kernel, ctor, entry, entry, "struct proc *", "int", +SDT_PROBE_DEFINE4(proc, kernel, ctor, entry, "struct proc *", "int", "void *", "int"); -SDT_PROBE_DEFINE4(proc, kernel, ctor, return, return, "struct proc *", "int", +SDT_PROBE_DEFINE4(proc, kernel, ctor, return, "struct proc *", "int", "void *", "int"); -SDT_PROBE_DEFINE4(proc, kernel, dtor, entry, entry, "struct proc *", "int", +SDT_PROBE_DEFINE4(proc, kernel, dtor, entry, "struct proc *", "int", "void *", "struct thread *"); -SDT_PROBE_DEFINE3(proc, kernel, dtor, return, return, "struct proc *", "int", +SDT_PROBE_DEFINE3(proc, kernel, dtor, return, "struct proc *", "int", "void *"); -SDT_PROBE_DEFINE3(proc, kernel, init, entry, entry, "struct proc *", "int", +SDT_PROBE_DEFINE3(proc, kernel, init, entry, "struct proc *", "int", "int"); -SDT_PROBE_DEFINE3(proc, kernel, init, return, return, "struct proc *", "int", +SDT_PROBE_DEFINE3(proc, kernel, init, return, "struct proc *", "int", "int"); MALLOC_DEFINE(M_PGRP, "pgrp", "process group header"); diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index 012429a7e572..26ebc4e6f272 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -95,29 +95,29 @@ static void racct_add_cred_locked(struct ucred *cred, int resource, uint64_t amount); SDT_PROVIDER_DEFINE(racct); -SDT_PROBE_DEFINE3(racct, kernel, rusage, add, add, "struct proc *", "int", +SDT_PROBE_DEFINE3(racct, kernel, rusage, add, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, add_failure, add-failure, +SDT_PROBE_DEFINE3(racct, kernel, rusage, add__failure, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, add_cred, add-cred, "struct ucred *", +SDT_PROBE_DEFINE3(racct, kernel, rusage, add__cred, "struct ucred *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, add_force, add-force, "struct proc *", +SDT_PROBE_DEFINE3(racct, kernel, rusage, add__force, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, set, set, "struct proc *", "int", +SDT_PROBE_DEFINE3(racct, kernel, rusage, set, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, set_failure, set-failure, +SDT_PROBE_DEFINE3(racct, kernel, rusage, set__failure, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, sub, sub, "struct proc *", "int", +SDT_PROBE_DEFINE3(racct, kernel, rusage, sub, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, sub_cred, sub-cred, "struct ucred *", +SDT_PROBE_DEFINE3(racct, kernel, rusage, sub__cred, "struct ucred *", "int", "uint64_t"); -SDT_PROBE_DEFINE1(racct, kernel, racct, create, create, "struct racct *"); -SDT_PROBE_DEFINE1(racct, kernel, racct, destroy, destroy, "struct racct *"); -SDT_PROBE_DEFINE2(racct, kernel, racct, join, join, "struct racct *", +SDT_PROBE_DEFINE1(racct, kernel, racct, create, "struct racct *"); +SDT_PROBE_DEFINE1(racct, kernel, racct, destroy, "struct racct *"); +SDT_PROBE_DEFINE2(racct, kernel, racct, join, "struct racct *", "struct racct *"); -SDT_PROBE_DEFINE2(racct, kernel, racct, join_failure, join-failure, +SDT_PROBE_DEFINE2(racct, kernel, racct, join__failure, "struct racct *", "struct racct *"); -SDT_PROBE_DEFINE2(racct, kernel, racct, leave, leave, "struct racct *", +SDT_PROBE_DEFINE2(racct, kernel, racct, leave, "struct racct *", "struct racct *"); int racct_types[] = { @@ -526,7 +526,7 @@ racct_add_locked(struct proc *p, int resource, uint64_t amount) #ifdef RCTL error = rctl_enforce(p, resource, amount); if (error && RACCT_IS_DENIABLE(resource)) { - SDT_PROBE(racct, kernel, rusage, add_failure, p, resource, + SDT_PROBE(racct, kernel, rusage, add__failure, p, resource, amount, 0, 0); return (error); } @@ -557,7 +557,7 @@ racct_add_cred_locked(struct ucred *cred, int resource, uint64_t amount) { struct prison *pr; - SDT_PROBE(racct, kernel, rusage, add_cred, cred, resource, amount, + SDT_PROBE(racct, kernel, rusage, add__cred, cred, resource, amount, 0, 0); racct_alloc_resource(cred->cr_ruidinfo->ui_racct, resource, amount); @@ -590,7 +590,7 @@ void racct_add_force(struct proc *p, int resource, uint64_t amount) { - SDT_PROBE(racct, kernel, rusage, add_force, p, resource, amount, 0, 0); + SDT_PROBE(racct, kernel, rusage, add__force, p, resource, amount, 0, 0); /* * We need proc lock to dereference p->p_ucred. @@ -644,7 +644,7 @@ racct_set_locked(struct proc *p, int resource, uint64_t amount) if (diff_proc > 0) { error = rctl_enforce(p, resource, diff_proc); if (error && RACCT_IS_DENIABLE(resource)) { - SDT_PROBE(racct, kernel, rusage, set_failure, p, + SDT_PROBE(racct, kernel, rusage, set__failure, p, resource, amount, 0, 0); return (error); } @@ -804,7 +804,7 @@ racct_sub_cred_locked(struct ucred *cred, int resource, uint64_t amount) { struct prison *pr; - SDT_PROBE(racct, kernel, rusage, sub_cred, cred, resource, amount, + SDT_PROBE(racct, kernel, rusage, sub__cred, cred, resource, amount, 0, 0); #ifdef notyet diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 7f0c82023179..41e7a8619576 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -92,11 +92,11 @@ __FBSDID("$FreeBSD$"); #define ONSIG 32 /* NSIG for osig* syscalls. XXX. */ SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE3(proc, kernel, , signal_send, signal-send, "struct thread *", +SDT_PROBE_DEFINE3(proc, kernel, , signal__send, "struct thread *", "struct proc *", "int"); -SDT_PROBE_DEFINE2(proc, kernel, , signal_clear, signal-clear, "int", +SDT_PROBE_DEFINE2(proc, kernel, , signal__clear, "int", "ksiginfo_t *"); -SDT_PROBE_DEFINE3(proc, kernel, , signal_discard, signal-discard, +SDT_PROBE_DEFINE3(proc, kernel, , signal__discard, "struct thread *", "struct proc *", "int"); static int coredump(struct thread *); @@ -1253,7 +1253,7 @@ kern_sigtimedwait(struct thread *td, sigset_t waitset, ksiginfo_t *ksi, reschedule_signals(p, new_block, 0); if (error == 0) { - SDT_PROBE(proc, kernel, , signal_clear, sig, ksi, 0, 0, 0); + SDT_PROBE(proc, kernel, , signal__clear, sig, ksi, 0, 0, 0); if (ksi->ksi_code == SI_TIMER) itimer_accept(p, ksi->ksi_timerid, ksi); @@ -2062,7 +2062,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) } else sigqueue = &td->td_sigqueue; - SDT_PROBE(proc, kernel, , signal_send, td, p, sig, 0, 0 ); + SDT_PROBE(proc, kernel, , signal__send, td, p, sig, 0, 0 ); /* * If the signal is being ignored, @@ -2073,7 +2073,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) */ mtx_lock(&ps->ps_mtx); if (SIGISMEMBER(ps->ps_sigignore, sig)) { - SDT_PROBE(proc, kernel, , signal_discard, td, p, sig, 0, 0 ); + SDT_PROBE(proc, kernel, , signal__discard, td, p, sig, 0, 0 ); mtx_unlock(&ps->ps_mtx); if (ksi && (ksi->ksi_flags & KSI_INS)) diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 198f9057ba5b..592eb1ee8ab4 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -107,18 +107,18 @@ SYSCTL_INT(_kern, OID_AUTO, fscale, CTLFLAG_RD, 0, FSCALE, ""); static void loadav(void *arg); SDT_PROVIDER_DECLARE(sched); -SDT_PROBE_DEFINE(sched, , , preempt, preempt); +SDT_PROBE_DEFINE(sched, , , preempt); /* * These probes reference Solaris features that are not implemented in FreeBSD. * Create the probes anyway for compatibility with existing D scripts; they'll * just never fire. */ -SDT_PROBE_DEFINE(sched, , , cpucaps_sleep, cpucaps-sleep); -SDT_PROBE_DEFINE(sched, , , cpucaps_wakeup, cpucaps-wakeup); -SDT_PROBE_DEFINE(sched, , , schedctl_nopreempt, schedctl-nopreempt); -SDT_PROBE_DEFINE(sched, , , schedctl_preempt, schedctl-preempt); -SDT_PROBE_DEFINE(sched, , , schedctl_yield, schedctl-yield); +SDT_PROBE_DEFINE(sched, , , cpucaps__sleep); +SDT_PROBE_DEFINE(sched, , , cpucaps__wakeup); +SDT_PROBE_DEFINE(sched, , , schedctl__nopreempt); +SDT_PROBE_DEFINE(sched, , , schedctl__preempt); +SDT_PROBE_DEFINE(sched, , , schedctl__yield); static void sleepinit(void *unused) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index f3271aff7985..b21a4f00cdb6 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); #include SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE(proc, , , lwp_exit, lwp-exit); +SDT_PROBE_DEFINE(proc, , , lwp__exit); /* diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index c925dfc813e1..8d7b4bece993 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -68,9 +68,9 @@ DPCPU_DECLARE(sbintime_t, hardclocktime); #endif SDT_PROVIDER_DEFINE(callout_execute); -SDT_PROBE_DEFINE1(callout_execute, kernel, , callout_start, callout-start, +SDT_PROBE_DEFINE1(callout_execute, kernel, , callout__start, "struct callout *"); -SDT_PROBE_DEFINE1(callout_execute, kernel, , callout_end, callout-end, +SDT_PROBE_DEFINE1(callout_execute, kernel, , callout__end, "struct callout *"); #ifdef CALLOUT_PROFILING @@ -677,9 +677,9 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc, sbt1 = sbinuptime(); #endif THREAD_NO_SLEEPING(); - SDT_PROBE(callout_execute, kernel, , callout_start, c, 0, 0, 0, 0); + SDT_PROBE(callout_execute, kernel, , callout__start, c, 0, 0, 0, 0); c_func(c_arg); - SDT_PROBE(callout_execute, kernel, , callout_end, c, 0, 0, 0, 0); + SDT_PROBE(callout_execute, kernel, , callout__end, c, 0, 0, 0, 0); THREAD_SLEEPING_OK(); #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING) sbt2 = sbinuptime(); diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 7b9a1a68a0fe..0c7391e496ff 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -254,20 +254,20 @@ SYSCTL_INT(_kern_sched, OID_AUTO, followon, CTLFLAG_RW, SDT_PROVIDER_DEFINE(sched); -SDT_PROBE_DEFINE3(sched, , , change_pri, change-pri, "struct thread *", +SDT_PROBE_DEFINE3(sched, , , change__pri, "struct thread *", "struct proc *", "uint8_t"); -SDT_PROBE_DEFINE3(sched, , , dequeue, dequeue, "struct thread *", +SDT_PROBE_DEFINE3(sched, , , dequeue, "struct thread *", "struct proc *", "void *"); -SDT_PROBE_DEFINE4(sched, , , enqueue, enqueue, "struct thread *", +SDT_PROBE_DEFINE4(sched, , , enqueue, "struct thread *", "struct proc *", "void *", "int"); -SDT_PROBE_DEFINE4(sched, , , lend_pri, lend-pri, "struct thread *", +SDT_PROBE_DEFINE4(sched, , , lend__pri, "struct thread *", "struct proc *", "uint8_t", "struct thread *"); -SDT_PROBE_DEFINE2(sched, , , load_change, load-change, "int", "int"); -SDT_PROBE_DEFINE2(sched, , , off_cpu, off-cpu, "struct thread *", +SDT_PROBE_DEFINE2(sched, , , load__change, "int", "int"); +SDT_PROBE_DEFINE2(sched, , , off__cpu, "struct thread *", "struct proc *"); -SDT_PROBE_DEFINE(sched, , , on_cpu, on-cpu); -SDT_PROBE_DEFINE(sched, , , remain_cpu, remain-cpu); -SDT_PROBE_DEFINE2(sched, , , surrender, surrender, "struct thread *", +SDT_PROBE_DEFINE(sched, , , on__cpu); +SDT_PROBE_DEFINE(sched, , , remain__cpu); +SDT_PROBE_DEFINE2(sched, , , surrender, "struct thread *", "struct proc *"); static __inline void @@ -276,7 +276,7 @@ sched_load_add(void) sched_tdcnt++; KTR_COUNTER0(KTR_SCHED, "load", "global load", sched_tdcnt); - SDT_PROBE2(sched, , , load_change, NOCPU, sched_tdcnt); + SDT_PROBE2(sched, , , load__change, NOCPU, sched_tdcnt); } static __inline void @@ -285,7 +285,7 @@ sched_load_rem(void) sched_tdcnt--; KTR_COUNTER0(KTR_SCHED, "load", "global load", sched_tdcnt); - SDT_PROBE2(sched, , , load_change, NOCPU, sched_tdcnt); + SDT_PROBE2(sched, , , load__change, NOCPU, sched_tdcnt); } /* * Arrange to reschedule if necessary, taking the priorities and @@ -835,12 +835,12 @@ sched_priority(struct thread *td, u_char prio) KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "priority change", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(curthread)); - SDT_PROBE3(sched, , , change_pri, td, td->td_proc, prio); + SDT_PROBE3(sched, , , change__pri, td, td->td_proc, prio); if (td != curthread && prio > td->td_priority) { KTR_POINT3(KTR_SCHED, "thread", sched_tdname(curthread), "lend prio", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(td)); - SDT_PROBE4(sched, , , lend_pri, td, td->td_proc, prio, + SDT_PROBE4(sched, , , lend__pri, td, td->td_proc, prio, curthread); } THREAD_LOCK_ASSERT(td, MA_OWNED); @@ -1032,7 +1032,7 @@ sched_switch(struct thread *td, struct thread *newtd, int flags) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); #endif - SDT_PROBE2(sched, , , off_cpu, td, td->td_proc); + SDT_PROBE2(sched, , , off__cpu, td, td->td_proc); /* I feel sleepy */ lock_profile_release_lock(&sched_lock.lock_object); @@ -1066,13 +1066,13 @@ sched_switch(struct thread *td, struct thread *newtd, int flags) * need to reap it. */ - SDT_PROBE0(sched, , , on_cpu); + SDT_PROBE0(sched, , , on__cpu); #ifdef HWPMC_HOOKS if (PMC_PROC_IS_USING_PMCS(td->td_proc)) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_IN); #endif } else - SDT_PROBE0(sched, , , remain_cpu); + SDT_PROBE0(sched, , , remain__cpu); #ifdef SMP if (td->td_flags & TDF_IDLETD) diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 5e6d35811de8..de6d05c5cbee 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -343,20 +343,20 @@ SYSINIT(sched_initticks, SI_SUB_CLOCKS, SI_ORDER_THIRD, sched_initticks, SDT_PROVIDER_DEFINE(sched); -SDT_PROBE_DEFINE3(sched, , , change_pri, change-pri, "struct thread *", +SDT_PROBE_DEFINE3(sched, , , change__pri, "struct thread *", "struct proc *", "uint8_t"); -SDT_PROBE_DEFINE3(sched, , , dequeue, dequeue, "struct thread *", +SDT_PROBE_DEFINE3(sched, , , dequeue, "struct thread *", "struct proc *", "void *"); -SDT_PROBE_DEFINE4(sched, , , enqueue, enqueue, "struct thread *", +SDT_PROBE_DEFINE4(sched, , , enqueue, "struct thread *", "struct proc *", "void *", "int"); -SDT_PROBE_DEFINE4(sched, , , lend_pri, lend-pri, "struct thread *", +SDT_PROBE_DEFINE4(sched, , , lend__pri, "struct thread *", "struct proc *", "uint8_t", "struct thread *"); -SDT_PROBE_DEFINE2(sched, , , load_change, load-change, "int", "int"); -SDT_PROBE_DEFINE2(sched, , , off_cpu, off-cpu, "struct thread *", +SDT_PROBE_DEFINE2(sched, , , load__change, "int", "int"); +SDT_PROBE_DEFINE2(sched, , , off__cpu, "struct thread *", "struct proc *"); -SDT_PROBE_DEFINE(sched, , , on_cpu, on-cpu); -SDT_PROBE_DEFINE(sched, , , remain_cpu, remain-cpu); -SDT_PROBE_DEFINE2(sched, , , surrender, surrender, "struct thread *", +SDT_PROBE_DEFINE(sched, , , on__cpu); +SDT_PROBE_DEFINE(sched, , , remain__cpu); +SDT_PROBE_DEFINE2(sched, , , surrender, "struct thread *", "struct proc *"); /* @@ -541,7 +541,7 @@ tdq_load_add(struct tdq *tdq, struct thread *td) if ((td->td_flags & TDF_NOLOAD) == 0) tdq->tdq_sysload++; KTR_COUNTER0(KTR_SCHED, "load", tdq->tdq_loadname, tdq->tdq_load); - SDT_PROBE2(sched, , , load_change, (int)TDQ_ID(tdq), tdq->tdq_load); + SDT_PROBE2(sched, , , load__change, (int)TDQ_ID(tdq), tdq->tdq_load); } /* @@ -561,7 +561,7 @@ tdq_load_rem(struct tdq *tdq, struct thread *td) if ((td->td_flags & TDF_NOLOAD) == 0) tdq->tdq_sysload--; KTR_COUNTER0(KTR_SCHED, "load", tdq->tdq_loadname, tdq->tdq_load); - SDT_PROBE2(sched, , , load_change, (int)TDQ_ID(tdq), tdq->tdq_load); + SDT_PROBE2(sched, , , load__change, (int)TDQ_ID(tdq), tdq->tdq_load); } /* @@ -1679,12 +1679,12 @@ sched_thread_priority(struct thread *td, u_char prio) KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "prio", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(curthread)); - SDT_PROBE3(sched, , , change_pri, td, td->td_proc, prio); + SDT_PROBE3(sched, , , change__pri, td, td->td_proc, prio); if (td != curthread && prio < td->td_priority) { KTR_POINT3(KTR_SCHED, "thread", sched_tdname(curthread), "lend prio", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(td)); - SDT_PROBE4(sched, , , lend_pri, td, td->td_proc, prio, + SDT_PROBE4(sched, , , lend__pri, td, td->td_proc, prio, curthread); } ts = td->td_sched; @@ -1937,7 +1937,7 @@ sched_switch(struct thread *td, struct thread *newtd, int flags) if (PMC_PROC_IS_USING_PMCS(td->td_proc)) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); #endif - SDT_PROBE2(sched, , , off_cpu, newtd, newtd->td_proc); + SDT_PROBE2(sched, , , off__cpu, newtd, newtd->td_proc); lock_profile_release_lock(&TDQ_LOCKPTR(tdq)->lock_object); TDQ_LOCKPTR(tdq)->mtx_lock = (uintptr_t)newtd; sched_pctcpu_update(newtd->td_sched, 0); @@ -1963,14 +1963,14 @@ sched_switch(struct thread *td, struct thread *newtd, int flags) lock_profile_obtain_lock_success( &TDQ_LOCKPTR(tdq)->lock_object, 0, 0, __FILE__, __LINE__); - SDT_PROBE0(sched, , , on_cpu); + SDT_PROBE0(sched, , , on__cpu); #ifdef HWPMC_HOOKS if (PMC_PROC_IS_USING_PMCS(td->td_proc)) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_IN); #endif } else { thread_unblock_switch(td, mtx); - SDT_PROBE0(sched, , , remain_cpu); + SDT_PROBE0(sched, , , remain__cpu); } /* * Assert that all went well and return. diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c index 7cb2ed006f1e..3d2492f52ac5 100644 --- a/sys/kern/subr_devstat.c +++ b/sys/kern/subr_devstat.c @@ -47,19 +47,19 @@ __FBSDID("$FreeBSD$"); SDT_PROVIDER_DEFINE(io); -SDT_PROBE_DEFINE2(io, , , start, start, "struct bio *", "struct devstat *"); -SDT_PROBE_DEFINE2(io, , , done, done, "struct bio *", "struct devstat *"); -SDT_PROBE_DEFINE2(io, , , wait_start, wait-start, "struct bio *", +SDT_PROBE_DEFINE2(io, , , start, "struct bio *", "struct devstat *"); +SDT_PROBE_DEFINE2(io, , , done, "struct bio *", "struct devstat *"); +SDT_PROBE_DEFINE2(io, , , wait__start, "struct bio *", "struct devstat *"); -SDT_PROBE_DEFINE2(io, , , wait_done, wait-done, "struct bio *", +SDT_PROBE_DEFINE2(io, , , wait__done, "struct bio *", "struct devstat *"); #define DTRACE_DEVSTAT_START() SDT_PROBE2(io, , , start, NULL, ds) #define DTRACE_DEVSTAT_BIO_START() SDT_PROBE2(io, , , start, bp, ds) #define DTRACE_DEVSTAT_DONE() SDT_PROBE2(io, , , done, NULL, ds) #define DTRACE_DEVSTAT_BIO_DONE() SDT_PROBE2(io, , , done, bp, ds) -#define DTRACE_DEVSTAT_WAIT_START() SDT_PROBE2(io, , , wait_start, NULL, ds) -#define DTRACE_DEVSTAT_WAIT_DONE() SDT_PROBE2(io, , , wait_done, NULL, ds) +#define DTRACE_DEVSTAT_WAIT_START() SDT_PROBE2(io, , , wait__start, NULL, ds) +#define DTRACE_DEVSTAT_WAIT_DONE() SDT_PROBE2(io, , , wait__done, NULL, ds) static int devstat_num_devs; static long devstat_generation = 1; diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 6d0341c86f8c..367297a6a415 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -169,8 +169,8 @@ static int turnstile_init(void *mem, int size, int flags); static void turnstile_fini(void *mem, int size); SDT_PROVIDER_DECLARE(sched); -SDT_PROBE_DEFINE(sched, , , sleep, sleep); -SDT_PROBE_DEFINE2(sched, , , wakeup, wakeup, "struct thread *", +SDT_PROBE_DEFINE(sched, , , sleep); +SDT_PROBE_DEFINE2(sched, , , wakeup, "struct thread *", "struct proc *"); /* diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index b931ed72721b..d46ba3dbdb4a 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -61,28 +61,28 @@ __FBSDID("$FreeBSD$"); #include SDT_PROVIDER_DECLARE(vfs); -SDT_PROBE_DEFINE3(vfs, namecache, enter, done, done, "struct vnode *", "char *", +SDT_PROBE_DEFINE3(vfs, namecache, enter, done, "struct vnode *", "char *", "struct vnode *"); -SDT_PROBE_DEFINE2(vfs, namecache, enter_negative, done, done, "struct vnode *", +SDT_PROBE_DEFINE2(vfs, namecache, enter_negative, done, "struct vnode *", "char *"); -SDT_PROBE_DEFINE1(vfs, namecache, fullpath, entry, entry, "struct vnode *"); -SDT_PROBE_DEFINE3(vfs, namecache, fullpath, hit, hit, "struct vnode *", +SDT_PROBE_DEFINE1(vfs, namecache, fullpath, entry, "struct vnode *"); +SDT_PROBE_DEFINE3(vfs, namecache, fullpath, hit, "struct vnode *", "char *", "struct vnode *"); -SDT_PROBE_DEFINE1(vfs, namecache, fullpath, miss, miss, "struct vnode *"); -SDT_PROBE_DEFINE3(vfs, namecache, fullpath, return, return, "int", +SDT_PROBE_DEFINE1(vfs, namecache, fullpath, miss, "struct vnode *"); +SDT_PROBE_DEFINE3(vfs, namecache, fullpath, return, "int", "struct vnode *", "char *"); -SDT_PROBE_DEFINE3(vfs, namecache, lookup, hit, hit, "struct vnode *", "char *", +SDT_PROBE_DEFINE3(vfs, namecache, lookup, hit, "struct vnode *", "char *", "struct vnode *"); -SDT_PROBE_DEFINE2(vfs, namecache, lookup, hit_negative, hit-negative, +SDT_PROBE_DEFINE2(vfs, namecache, lookup, hit__negative, "struct vnode *", "char *"); -SDT_PROBE_DEFINE2(vfs, namecache, lookup, miss, miss, "struct vnode *", +SDT_PROBE_DEFINE2(vfs, namecache, lookup, miss, "struct vnode *", "char *"); -SDT_PROBE_DEFINE1(vfs, namecache, purge, done, done, "struct vnode *"); -SDT_PROBE_DEFINE1(vfs, namecache, purge_negative, done, done, "struct vnode *"); -SDT_PROBE_DEFINE1(vfs, namecache, purgevfs, done, done, "struct mount *"); -SDT_PROBE_DEFINE3(vfs, namecache, zap, done, done, "struct vnode *", "char *", +SDT_PROBE_DEFINE1(vfs, namecache, purge, done, "struct vnode *"); +SDT_PROBE_DEFINE1(vfs, namecache, purge_negative, done, "struct vnode *"); +SDT_PROBE_DEFINE1(vfs, namecache, purgevfs, done, "struct mount *"); +SDT_PROBE_DEFINE3(vfs, namecache, zap, done, "struct vnode *", "char *", "struct vnode *"); -SDT_PROBE_DEFINE2(vfs, namecache, zap_negative, done, done, "struct vnode *", +SDT_PROBE_DEFINE2(vfs, namecache, zap_negative, done, "struct vnode *", "char *"); /* @@ -613,7 +613,7 @@ negative_success: nchstats.ncs_neghits++; if (ncp->nc_flag & NCF_WHITE) cnp->cn_flags |= ISWHITEOUT; - SDT_PROBE(vfs, namecache, lookup, hit_negative, dvp, nc_get_name(ncp), + SDT_PROBE(vfs, namecache, lookup, hit__negative, dvp, nc_get_name(ncp), 0, 0, 0); cache_out_ts(ncp, tsp, ticksp); CACHE_WUNLOCK(); diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 99bd77656858..9c45a3b1a81e 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -69,9 +69,9 @@ __FBSDID("$FreeBSD$"); #undef NAMEI_DIAGNOSTIC SDT_PROVIDER_DECLARE(vfs); -SDT_PROBE_DEFINE3(vfs, namei, lookup, entry, entry, "struct vnode *", "char *", +SDT_PROBE_DEFINE3(vfs, namei, lookup, entry, "struct vnode *", "char *", "unsigned long"); -SDT_PROBE_DEFINE2(vfs, namei, lookup, return, return, "int", "struct vnode *"); +SDT_PROBE_DEFINE2(vfs, namei, lookup, return, "int", "struct vnode *"); /* * Allocation zone for namei diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index ee068731d41e..dbad1aede93d 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -91,8 +91,8 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information"); SDT_PROVIDER_DEFINE(vfs); -SDT_PROBE_DEFINE2(vfs, , stat, mode, mode, "char *", "int"); -SDT_PROBE_DEFINE2(vfs, , stat, reg, reg, "char *", "int"); +SDT_PROBE_DEFINE2(vfs, , stat, mode, "char *", "int"); +SDT_PROBE_DEFINE2(vfs, , stat, reg, "char *", "int"); static int chroot_refuse_vdir_fds(struct filedesc *fdp); static int getutimes(const struct timeval *, enum uio_seg, struct timespec *); diff --git a/sys/net/vnet.c b/sys/net/vnet.c index 4b975a302979..977bf59de3f2 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -209,14 +209,14 @@ static TAILQ_HEAD(, vnet_data_free) vnet_data_free_head = static struct sx vnet_data_free_lock; SDT_PROVIDER_DEFINE(vnet); -SDT_PROBE_DEFINE1(vnet, functions, vnet_alloc, entry, entry, "int"); -SDT_PROBE_DEFINE2(vnet, functions, vnet_alloc, alloc, alloc, "int", +SDT_PROBE_DEFINE1(vnet, functions, vnet_alloc, entry, "int"); +SDT_PROBE_DEFINE2(vnet, functions, vnet_alloc, alloc, "int", "struct vnet *"); -SDT_PROBE_DEFINE2(vnet, functions, vnet_alloc, return, return, +SDT_PROBE_DEFINE2(vnet, functions, vnet_alloc, return, "int", "struct vnet *"); -SDT_PROBE_DEFINE2(vnet, functions, vnet_destroy, entry, entry, +SDT_PROBE_DEFINE2(vnet, functions, vnet_destroy, entry, "int", "struct vnet *"); -SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, return, entry, +SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, entry, "int"); #ifdef DDB diff --git a/sys/netinet/in_kdtrace.c b/sys/netinet/in_kdtrace.c index c17c9f32449f..d37e3c09ce28 100644 --- a/sys/netinet/in_kdtrace.c +++ b/sys/netinet/in_kdtrace.c @@ -37,7 +37,7 @@ SDT_PROVIDER_DEFINE(ip); SDT_PROVIDER_DEFINE(tcp); SDT_PROVIDER_DEFINE(udp); -SDT_PROBE_DEFINE6_XLATE(ip, , , receive, receive, +SDT_PROBE_DEFINE6_XLATE(ip, , , receive, "void *", "pktinfo_t *", "void *", "csinfo_t *", "uint8_t *", "ipinfo_t *", @@ -45,7 +45,7 @@ SDT_PROBE_DEFINE6_XLATE(ip, , , receive, receive, "struct ip *", "ipv4info_t *", "struct ip6_hdr *", "ipv6info_t *"); -SDT_PROBE_DEFINE6_XLATE(ip, , , send, send, +SDT_PROBE_DEFINE6_XLATE(ip, , , send, "void *", "pktinfo_t *", "void *", "csinfo_t *", "uint8_t *", "ipinfo_t *", @@ -53,56 +53,56 @@ SDT_PROBE_DEFINE6_XLATE(ip, , , send, send, "struct ip *", "ipv4info_t *", "struct ip6_hdr *", "ipv6info_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , accept_established, accept-established, +SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__established, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , accept_refused, accept-refused, +SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__refused, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_established, connect-established, +SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__established, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_refused, connect-refused, +SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__refused, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_request, connect-request, +SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__request, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , receive, receive, +SDT_PROBE_DEFINE5_XLATE(tcp, , , receive, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , send, send, +SDT_PROBE_DEFINE5_XLATE(tcp, , , send, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); -SDT_PROBE_DEFINE6_XLATE(tcp, , , state_change, state-change, +SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change, "void *", "void *", "struct tcpcb *", "csinfo_t *", "void *", "void *", @@ -110,14 +110,14 @@ SDT_PROBE_DEFINE6_XLATE(tcp, , , state_change, state-change, "void *", "void *", "int", "tcplsinfo_t *"); -SDT_PROBE_DEFINE5_XLATE(udp, , , receive, receive, +SDT_PROBE_DEFINE5_XLATE(udp, , , receive, "void *", "pktinfo_t *", "struct inpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct inpcb *", "udpsinfo_t *", "struct udphdr *", "udpinfo_t *"); -SDT_PROBE_DEFINE5_XLATE(udp, , , send, send, +SDT_PROBE_DEFINE5_XLATE(udp, , , send, "void *", "pktinfo_t *", "struct inpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", diff --git a/sys/netinet/in_kdtrace.h b/sys/netinet/in_kdtrace.h index 1759fac5128c..07b3e3a4ca70 100644 --- a/sys/netinet/in_kdtrace.h +++ b/sys/netinet/in_kdtrace.h @@ -44,14 +44,14 @@ SDT_PROVIDER_DECLARE(udp); SDT_PROBE_DECLARE(ip, , , receive); SDT_PROBE_DECLARE(ip, , , send); -SDT_PROBE_DECLARE(tcp, , , accept_established); -SDT_PROBE_DECLARE(tcp, , , accept_refused); -SDT_PROBE_DECLARE(tcp, , , connect_established); -SDT_PROBE_DECLARE(tcp, , , connect_refused); -SDT_PROBE_DECLARE(tcp, , , connect_request); +SDT_PROBE_DECLARE(tcp, , , accept__established); +SDT_PROBE_DECLARE(tcp, , , accept__refused); +SDT_PROBE_DECLARE(tcp, , , connect__established); +SDT_PROBE_DECLARE(tcp, , , connect__refused); +SDT_PROBE_DECLARE(tcp, , , connect__request); SDT_PROBE_DECLARE(tcp, , , receive); SDT_PROBE_DECLARE(tcp, , , send); -SDT_PROBE_DECLARE(tcp, , , state_change); +SDT_PROBE_DECLARE(tcp, , , state__change); SDT_PROBE_DECLARE(udp, , , receive); SDT_PROBE_DECLARE(udp, , , send); diff --git a/sys/netinet/sctp_dtrace_define.h b/sys/netinet/sctp_dtrace_define.h index f4f075e25c8d..f34effbddf57 100644 --- a/sys/netinet/sctp_dtrace_define.h +++ b/sys/netinet/sctp_dtrace_define.h @@ -44,7 +44,7 @@ SDT_PROVIDER_DEFINE(sctp); /* Cwnd probe - tracks changes in the congestion window on a netp */ /********************************************************/ /* Initial */ -SDT_PROBE_DEFINE5(sctp, cwnd, net, init, init, +SDT_PROBE_DEFINE5(sctp, cwnd, net, init, "uint32_t", /* The Vtag for this end */ "uint32_t", /* * The port number of the local side << 16 | port number @@ -55,7 +55,7 @@ SDT_PROBE_DEFINE5(sctp, cwnd, net, init, init, "int"); /* The new value of the cwnd */ /* ACK-INCREASE */ -SDT_PROBE_DEFINE5(sctp, cwnd, net, ack, ack, +SDT_PROBE_DEFINE5(sctp, cwnd, net, ack, "uint32_t", /* The Vtag for this end */ "uint32_t", /* * The port number of the local side << 16 | port number @@ -66,14 +66,14 @@ SDT_PROBE_DEFINE5(sctp, cwnd, net, ack, ack, "int"); /* The new value of the cwnd */ /* ACK-INCREASE */ -SDT_PROBE_DEFINE5(sctp, cwnd, net, rttvar, rttvar, +SDT_PROBE_DEFINE5(sctp, cwnd, net, rttvar, "uint64_t", /* The Vtag << 32 | localport << 16 | remoteport */ "uint64_t", /* obw | nbw */ "uint64_t", /* bwrtt | newrtt */ "uint64_t", /* flight */ "uint64_t"); /* (cwnd << 32) | point << 16 | retval(0/1) */ -SDT_PROBE_DEFINE5(sctp, cwnd, net, rttstep, rttstep, +SDT_PROBE_DEFINE5(sctp, cwnd, net, rttstep, "uint64_t", /* The Vtag << 32 | localport << 16 | remoteport */ "uint64_t", /* obw | nbw */ "uint64_t", /* bwrtt | newrtt */ @@ -81,7 +81,7 @@ SDT_PROBE_DEFINE5(sctp, cwnd, net, rttstep, rttstep, "uint64_t"); /* (cwnd << 32) | point << 16 | retval(0/1) */ /* FastRetransmit-DECREASE */ -SDT_PROBE_DEFINE5(sctp, cwnd, net, fr, fr, +SDT_PROBE_DEFINE5(sctp, cwnd, net, fr, "uint32_t", /* The Vtag for this end */ "uint32_t", /* * The port number of the local side << 16 | port number @@ -92,7 +92,7 @@ SDT_PROBE_DEFINE5(sctp, cwnd, net, fr, fr, "int"); /* The new value of the cwnd */ /* TimeOut-DECREASE */ -SDT_PROBE_DEFINE5(sctp, cwnd, net, to, to, +SDT_PROBE_DEFINE5(sctp, cwnd, net, to, "uint32_t", /* The Vtag for this end */ "uint32_t", /* * The port number of the local side << 16 | port number @@ -103,7 +103,7 @@ SDT_PROBE_DEFINE5(sctp, cwnd, net, to, to, "int"); /* The new value of the cwnd */ /* BurstLimit-DECREASE */ -SDT_PROBE_DEFINE5(sctp, cwnd, net, bl, bl, +SDT_PROBE_DEFINE5(sctp, cwnd, net, bl, "uint32_t", /* The Vtag for this end */ "uint32_t", /* * The port number of the local side << 16 | port number @@ -114,7 +114,7 @@ SDT_PROBE_DEFINE5(sctp, cwnd, net, bl, bl, "int"); /* The new value of the cwnd */ /* ECN-DECREASE */ -SDT_PROBE_DEFINE5(sctp, cwnd, net, ecn, ecn, +SDT_PROBE_DEFINE5(sctp, cwnd, net, ecn, "uint32_t", /* The Vtag for this end */ "uint32_t", /* * The port number of the local side << 16 | port number @@ -125,7 +125,7 @@ SDT_PROBE_DEFINE5(sctp, cwnd, net, ecn, ecn, "int"); /* The new value of the cwnd */ /* PacketDrop-DECREASE */ -SDT_PROBE_DEFINE5(sctp, cwnd, net, pd, pd, +SDT_PROBE_DEFINE5(sctp, cwnd, net, pd, "uint32_t", /* The Vtag for this end */ "uint32_t", /* * The port number of the local side << 16 | port number @@ -138,7 +138,7 @@ SDT_PROBE_DEFINE5(sctp, cwnd, net, pd, pd, /********************************************************/ /* Rwnd probe - tracks changes in the receiver window for an assoc */ /********************************************************/ -SDT_PROBE_DEFINE4(sctp, rwnd, assoc, val, val, +SDT_PROBE_DEFINE4(sctp, rwnd, assoc, val, "uint32_t", /* The Vtag for this end */ "uint32_t", /* * The port number of the local side << 16 | port number @@ -150,7 +150,7 @@ SDT_PROBE_DEFINE4(sctp, rwnd, assoc, val, val, /********************************************************/ /* flight probe - tracks changes in the flight size on a net or assoc */ /********************************************************/ -SDT_PROBE_DEFINE5(sctp, flightsize, net, val, val, +SDT_PROBE_DEFINE5(sctp, flightsize, net, val, "uint32_t", /* The Vtag for this end */ "uint32_t", /* * The port number of the local side << 16 | port number @@ -163,7 +163,7 @@ SDT_PROBE_DEFINE5(sctp, flightsize, net, val, val, /********************************************************/ /* The total flight version */ /********************************************************/ -SDT_PROBE_DEFINE4(sctp, flightsize, assoc, val, val, +SDT_PROBE_DEFINE4(sctp, flightsize, assoc, val, "uint32_t", /* The Vtag for this end */ "uint32_t", /* * The port number of the local side << 16 | port number diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 30fbd8632f48..53df1a7345ac 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1928,7 +1928,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, goto dropwithreset; } if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) { - TCP_PROBE5(connect_refused, NULL, tp, + TCP_PROBE5(connect__refused, NULL, tp, mtod(m, const char *), tp, th); tp = tcp_drop(tp, ECONNREFUSED); } @@ -1981,7 +1981,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, thflags &= ~TH_SYN; } else { tcp_state_change(tp, TCPS_ESTABLISHED); - TCP_PROBE5(connect_established, NULL, tp, + TCP_PROBE5(connect__established, NULL, tp, mtod(m, const char *), tp, th); cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, @@ -2387,7 +2387,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, tp->t_flags &= ~TF_NEEDFIN; } else { tcp_state_change(tp, TCPS_ESTABLISHED); - TCP_PROBE5(accept_established, NULL, tp, + TCP_PROBE5(accept__established, NULL, tp, mtod(m, const char *), tp, th); cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 2fc4e8620c86..6c55f101d5fe 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1184,7 +1184,7 @@ send: ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6)); if (tp->t_state == TCPS_SYN_SENT) - TCP_PROBE5(connect_request, NULL, tp, ip6, tp, th); + TCP_PROBE5(connect__request, NULL, tp, ip6, tp, th); TCP_PROBE5(send, NULL, tp, ip6, tp, th); @@ -1223,7 +1223,7 @@ send: ip->ip_off |= htons(IP_DF); if (tp->t_state == TCPS_SYN_SENT) - TCP_PROBE5(connect_request, NULL, tp, ip, tp, th); + TCP_PROBE5(connect__request, NULL, tp, ip, tp, th); TCP_PROBE5(send, NULL, tp, ip, tp, th); diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 5dab41c6160c..52e5a447afd3 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -720,7 +720,7 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, tcp_trace(TA_OUTPUT, 0, tp, mtod(m, void *), th, 0); #endif if (flags & TH_RST) - TCP_PROBE5(accept_refused, NULL, NULL, mtod(m, const char *), + TCP_PROBE5(accept__refused, NULL, NULL, mtod(m, const char *), tp, nth); TCP_PROBE5(send, NULL, tp, mtod(m, const char *), tp, nth); @@ -2412,5 +2412,5 @@ tcp_state_change(struct tcpcb *tp, int newstate) #endif tp->t_state = newstate; - TCP_PROBE6(state_change, NULL, tp, NULL, tp, NULL, pstate); + TCP_PROBE6(state__change, NULL, tp, NULL, tp, NULL, pstate); } diff --git a/sys/opencrypto/deflate.c b/sys/opencrypto/deflate.c index cf3a5b1a8011..0ad86e3303e3 100644 --- a/sys/opencrypto/deflate.c +++ b/sys/opencrypto/deflate.c @@ -48,13 +48,13 @@ __FBSDID("$FreeBSD$"); #include SDT_PROVIDER_DECLARE(opencrypto); -SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, entry, entry, +SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, entry, "int", "u_int32_t"); -SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, bad, bad, +SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, bad, "int", "int", "int", "int", "int"); -SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, iter, iter, +SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, iter, "int", "int", "int", "int", "int"); -SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, return, return, +SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, return, "int", "u_int32_t"); int window_inflate = -1 * MAX_WBITS; diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index 5fa2736a896c..d2416eb721d3 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -93,11 +93,11 @@ __FBSDID("$FreeBSD$"); SDT_PROVIDER_DEFINE(mac); SDT_PROVIDER_DEFINE(mac_framework); -SDT_PROBE_DEFINE2(mac, kernel, policy, modevent, modevent, "int", +SDT_PROBE_DEFINE2(mac, kernel, policy, modevent, "int", "struct mac_policy_conf *"); -SDT_PROBE_DEFINE1(mac, kernel, policy, register, register, +SDT_PROBE_DEFINE1(mac, kernel, policy, register, "struct mac_policy_conf *"); -SDT_PROBE_DEFINE1(mac, kernel, policy, unregister, unregister, +SDT_PROBE_DEFINE1(mac, kernel, policy, unregister, "struct mac_policy_conf *"); /* diff --git a/sys/security/mac/mac_internal.h b/sys/security/mac/mac_internal.h index 6b1c50c1cf9a..ceb1e8727d98 100644 --- a/sys/security/mac/mac_internal.h +++ b/sys/security/mac/mac_internal.h @@ -74,35 +74,35 @@ SDT_PROVIDER_DECLARE(mac); /* MAC Framework-level events. */ SDT_PROVIDER_DECLARE(mac_framework); /* Entry points to MAC. */ #define MAC_CHECK_PROBE_DEFINE4(name, arg0, arg1, arg2, arg3) \ - SDT_PROBE_DEFINE5(mac_framework, kernel, name, mac_check_err, \ - mac-check-ok, "int", arg0, arg1, arg2, arg3); \ - SDT_PROBE_DEFINE5(mac_framework, kernel, name, mac_check_ok, \ - mac-check-ok, "int", arg0, arg1, arg2, arg3); + SDT_PROBE_DEFINE5(mac_framework, kernel, name, mac__check__err, \ + "int", arg0, arg1, arg2, arg3); \ + SDT_PROBE_DEFINE5(mac_framework, kernel, name, mac__check__ok, \ + "int", arg0, arg1, arg2, arg3); #define MAC_CHECK_PROBE_DEFINE3(name, arg0, arg1, arg2) \ - SDT_PROBE_DEFINE4(mac_framework, kernel, name, mac_check_err, \ - mac-check-err, "int", arg0, arg1, arg2); \ - SDT_PROBE_DEFINE4(mac_framework, kernel, name, mac_check_ok, \ - mac-check-ok, "int", arg0, arg1, arg2); + SDT_PROBE_DEFINE4(mac_framework, kernel, name, mac__check__err, \ + "int", arg0, arg1, arg2); \ + SDT_PROBE_DEFINE4(mac_framework, kernel, name, mac__check__ok, \ + "int", arg0, arg1, arg2); #define MAC_CHECK_PROBE_DEFINE2(name, arg0, arg1) \ - SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac_check_err, \ - mac-check-err, "int", arg0, arg1); \ - SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac_check_ok, \ - mac-check-ok, "int", arg0, arg1); + SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac__check__err, \ + "int", arg0, arg1); \ + SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac__check__ok, \ + "int", arg0, arg1); #define MAC_CHECK_PROBE_DEFINE1(name, arg0) \ - SDT_PROBE_DEFINE2(mac_framework, kernel, name, mac_check_err, \ - mac-check-err, "int", arg0); \ - SDT_PROBE_DEFINE2(mac_framework, kernel, name, mac_check_ok, \ - mac-check-ok, "int", arg0); + SDT_PROBE_DEFINE2(mac_framework, kernel, name, mac__check__err, \ + "int", arg0); \ + SDT_PROBE_DEFINE2(mac_framework, kernel, name, mac__check__ok, \ + "int", arg0); #define MAC_CHECK_PROBE4(name, error, arg0, arg1, arg2, arg3) do { \ if (error) { \ - SDT_PROBE(mac_framework, kernel, name, mac_check_err, \ + SDT_PROBE(mac_framework, kernel, name, mac__check__err, \ error, arg0, arg1, arg2, arg3); \ } else { \ - SDT_PROBE(mac_framework, kernel, name, mac_check_ok, \ + SDT_PROBE(mac_framework, kernel, name, mac__check__ok, \ 0, arg0, arg1, arg2, arg3); \ } \ } while (0) @@ -116,17 +116,17 @@ SDT_PROVIDER_DECLARE(mac_framework); /* Entry points to MAC. */ #endif #define MAC_GRANT_PROBE_DEFINE2(name, arg0, arg1) \ - SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac_grant_err, \ - mac-grant-err, "int", arg0, arg1); \ - SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac_grant_ok, \ - mac-grant-ok, "int", arg0, arg1); + SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac__grant__err, \ + "int", arg0, arg1); \ + SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac__grant__ok, \ + "int", arg0, arg1); #define MAC_GRANT_PROBE2(name, error, arg0, arg1) do { \ if (error) { \ - SDT_PROBE(mac_framework, kernel, name, mac_grant_err, \ + SDT_PROBE(mac_framework, kernel, name, mac__grant__err, \ error, arg0, arg1, 0, 0); \ } else { \ - SDT_PROBE(mac_framework, kernel, name, mac_grant_ok, \ + SDT_PROBE(mac_framework, kernel, name, mac__grant__ok, \ error, arg0, arg1, 0, 0); \ } \ } while (0) diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h index 8c3b1849afdc..9e39625b54f9 100644 --- a/sys/sys/sdt.h +++ b/sys/sys/sdt.h @@ -84,20 +84,20 @@ #define SDT_PROVIDER_DEFINE(prov) #define SDT_PROVIDER_DECLARE(prov) -#define SDT_PROBE_DEFINE(prov, mod, func, name, sname) +#define SDT_PROBE_DEFINE(prov, mod, func, name) #define SDT_PROBE_DECLARE(prov, mod, func, name) #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype) -#define SDT_PROBE_DEFINE0(prov, mod, func, name, sname) -#define SDT_PROBE_DEFINE1(prov, mod, func, name, sname, arg0) -#define SDT_PROBE_DEFINE2(prov, mod, func, name, sname, arg0, arg1) -#define SDT_PROBE_DEFINE3(prov, mod, func, name, sname, arg0, arg1, arg2) -#define SDT_PROBE_DEFINE4(prov, mod, func, name, sname, arg0, arg1, arg2, arg3) -#define SDT_PROBE_DEFINE5(prov, mod, func, name, sname, arg0, arg1, arg2, arg3, arg4) -#define SDT_PROBE_DEFINE6(prov, mod, func, name, snamp, arg0, arg1, arg2, \ +#define SDT_PROBE_DEFINE0(prov, mod, func, name) +#define SDT_PROBE_DEFINE1(prov, mod, func, name, arg0) +#define SDT_PROBE_DEFINE2(prov, mod, func, name, arg0, arg1) +#define SDT_PROBE_DEFINE3(prov, mod, func, name, arg0, arg1, arg2) +#define SDT_PROBE_DEFINE4(prov, mod, func, name, arg0, arg1, arg2, arg3) +#define SDT_PROBE_DEFINE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) +#define SDT_PROBE_DEFINE6(prov, mod, func, name, arg0, arg1, arg2, \ arg3, arg4, arg5) -#define SDT_PROBE_DEFINE7(prov, mod, func, name, snamp, arg0, arg1, arg2, \ +#define SDT_PROBE_DEFINE7(prov, mod, func, name, arg0, arg1, arg2, \ arg3, arg4, arg5, arg6) #define SDT_PROBE0(prov, mod, func, name) @@ -110,19 +110,19 @@ #define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5, \ arg6) -#define SDT_PROBE_DEFINE0_XLATE(prov, mod, func, name, sname) -#define SDT_PROBE_DEFINE1_XLATE(prov, mod, func, name, sname, arg0, xarg0) -#define SDT_PROBE_DEFINE2_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE0_XLATE(prov, mod, func, name) +#define SDT_PROBE_DEFINE1_XLATE(prov, mod, func, name, arg0, xarg0) +#define SDT_PROBE_DEFINE2_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1) -#define SDT_PROBE_DEFINE3_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE3_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2) -#define SDT_PROBE_DEFINE4_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE4_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3) -#define SDT_PROBE_DEFINE5_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE5_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4) -#define SDT_PROBE_DEFINE6_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE6_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4, arg5, xarg5) -#define SDT_PROBE_DEFINE7_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE7_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4, arg5, xarg5, arg6, \ xarg6) @@ -141,10 +141,10 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); #define SDT_PROVIDER_DECLARE(prov) \ extern struct sdt_provider sdt_provider_##prov[1] -#define SDT_PROBE_DEFINE(prov, mod, func, name, sname) \ +#define SDT_PROBE_DEFINE(prov, mod, func, name) \ struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1] = { \ { sizeof(struct sdt_probe), sdt_provider_##prov, \ - { NULL, NULL }, { NULL, NULL }, #mod, #func, #sname, 0, 0, \ + { NULL, NULL }, { NULL, NULL }, #mod, #func, #name, 0, 0, \ NULL } \ }; \ DATA_SET(sdt_probes_set, sdt_##prov##_##mod##_##func##_##name); @@ -166,42 +166,42 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); }; \ DATA_SET(sdt_argtypes_set, sdta_##prov##_##mod##_##func##_##name##num); -#define SDT_PROBE_DEFINE0(prov, mod, func, name, sname) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname) +#define SDT_PROBE_DEFINE0(prov, mod, func, name) \ + SDT_PROBE_DEFINE(prov, mod, func, name) -#define SDT_PROBE_DEFINE1(prov, mod, func, name, sname, arg0) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ +#define SDT_PROBE_DEFINE1(prov, mod, func, name, arg0) \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL) -#define SDT_PROBE_DEFINE2(prov, mod, func, name, sname, arg0, arg1) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ +#define SDT_PROBE_DEFINE2(prov, mod, func, name, arg0, arg1) \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, NULL) -#define SDT_PROBE_DEFINE3(prov, mod, func, name, sname, arg0, arg1, arg2)\ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ +#define SDT_PROBE_DEFINE3(prov, mod, func, name, arg0, arg1, arg2)\ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, NULL) -#define SDT_PROBE_DEFINE4(prov, mod, func, name, sname, arg0, arg1, arg2, arg3) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ +#define SDT_PROBE_DEFINE4(prov, mod, func, name, arg0, arg1, arg2, arg3) \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3, NULL) -#define SDT_PROBE_DEFINE5(prov, mod, func, name, sname, arg0, arg1, arg2, arg3, arg4) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ +#define SDT_PROBE_DEFINE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4, NULL) -#define SDT_PROBE_DEFINE6(prov, mod, func, name, sname, arg0, arg1, arg2, arg3,\ +#define SDT_PROBE_DEFINE6(prov, mod, func, name, arg0, arg1, arg2, arg3,\ arg4, arg5) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, NULL); \ @@ -209,9 +209,9 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5, NULL) -#define SDT_PROBE_DEFINE7(prov, mod, func, name, sname, arg0, arg1, arg2, arg3,\ +#define SDT_PROBE_DEFINE7(prov, mod, func, name, arg0, arg1, arg2, arg3,\ arg4, arg5, arg6) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, NULL); \ @@ -220,46 +220,46 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 6, arg6, NULL) -#define SDT_PROBE_DEFINE0_XLATE(prov, mod, func, name, sname) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname) +#define SDT_PROBE_DEFINE0_XLATE(prov, mod, func, name) \ + SDT_PROBE_DEFINE(prov, mod, func, name) -#define SDT_PROBE_DEFINE1_XLATE(prov, mod, func, name, sname, arg0, xarg0) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ +#define SDT_PROBE_DEFINE1_XLATE(prov, mod, func, name, arg0, xarg0) \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0) -#define SDT_PROBE_DEFINE2_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE2_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, xarg1) -#define SDT_PROBE_DEFINE3_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE3_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, xarg1); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, xarg2) -#define SDT_PROBE_DEFINE4_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE4_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, xarg1); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, xarg2); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3, xarg3) -#define SDT_PROBE_DEFINE5_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE5_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, xarg1); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, xarg2); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3, xarg3); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4, xarg4) -#define SDT_PROBE_DEFINE6_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE6_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4, arg5, xarg5) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, xarg1); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, xarg2); \ @@ -267,10 +267,10 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4, xarg4); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5, xarg5) -#define SDT_PROBE_DEFINE7_XLATE(prov, mod, func, name, sname, arg0, xarg0, \ +#define SDT_PROBE_DEFINE7_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4, arg5, xarg5, arg6, \ xarg6) \ - SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, xarg1); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, xarg2); \ diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk index c7e1970f51a1..7d106e7f9c67 100644 --- a/sys/tools/vnode_if.awk +++ b/sys/tools/vnode_if.awk @@ -340,8 +340,8 @@ while ((getline < srcfile) > 0) { printc("};"); printc("\n"); - printc("SDT_PROBE_DEFINE2(vfs, vop, " name ", entry, entry, \"struct vnode *\", \"struct " name "_args *\");\n"); - printc("SDT_PROBE_DEFINE3(vfs, vop, " name ", return, return, \"struct vnode *\", \"struct " name "_args *\", \"int\");\n"); + printc("SDT_PROBE_DEFINE2(vfs, vop, " name ", entry, \"struct vnode *\", \"struct " name "_args *\");\n"); + printc("SDT_PROBE_DEFINE3(vfs, vop, " name ", return, \"struct vnode *\", \"struct " name "_args *\", \"int\");\n"); # Print out function. printc("\nint\n" uname "_AP(struct " name "_args *a)");