aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2026-05-05 12:57:53 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2026-05-07 09:57:03 +0000
commit242050278a377f5ca6906545ddc924b60ad8aa58 (patch)
treed984c82a49a9f53cdf65d1cba4fd7e41bf9ec9bb /share
parent40d59ee35dc106cda88d66e37527975a32596cd7 (diff)
Diffstat (limited to 'share')
-rw-r--r--share/man/man4/Makefile1
-rw-r--r--share/man/man4/dtrace_syscall.487
-rw-r--r--share/man/man4/linux.43
3 files changed, 90 insertions, 1 deletions
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 60ab6e8bdab6..44671c564239 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -1029,6 +1029,7 @@ _dtrace_provs= dtrace_audit.4 \
dtrace_profile.4 \
dtrace_sched.4 \
dtrace_sctp.4 \
+ dtrace_syscall.4 \
dtrace_tcp.4 \
dtrace_udp.4 \
dtrace_udplite.4 \
diff --git a/share/man/man4/dtrace_syscall.4 b/share/man/man4/dtrace_syscall.4
new file mode 100644
index 000000000000..e154e4c6046b
--- /dev/null
+++ b/share/man/man4/dtrace_syscall.4
@@ -0,0 +1,87 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.\" Copyright (c) 2026 Mateusz Piotrowski <0mp@FreeBSD.org>
+.\"
+.Dd May 7, 2026
+.Dt DTRACE_SYSCALL 4
+.Os
+.Sh NAME
+.Nm dtrace_syscall
+.Nd a DTrace provider for system calls
+.Sh SYNOPSIS
+.Nm syscall Ns Cm \&: Ns Ar abi Ns Cm \&: Ns Ar syscall Ns Cm :entry
+.Nm syscall Ns Cm \&: Ns Ar abi Ns Cm \&: Ns Ar syscall Ns Cm :return
+.Sh DESCRIPTION
+The
+.Nm syscall
+provider provides entry and return probes for system calls.
+.Pp
+The module in the probe's description is
+.Ar abi ,
+which indicates what system call ABI a
+.Ar syscall
+belongs to.
+.Nm
+supports the following system call ABIs:
+.Pp
+.Bl -tag -offset indent -width freebsd32 -compact
+.It Cm freebsd
+Native ABI.
+.It Cm freebsd32
+Non-native, 32-bit ABI.
+.It Cm linux
+Refer to
+.Xr linux 4 .
+.It Cm linux32
+Refer to
+.Xr linux 4 .
+.El
+.Pp
+The arguments to the
+.Cm entry
+probes are the arguments passed to the system call.
+.Pp
+The
+.Cm return
+probe stores the system call's return value in both
+.Fa arg0
+and
+.Fa arg1 .
+.Pp
+Inspect the
+.Xr d 7 Ap s
+.Va errno
+variable to check if a system call failed.
+.Sh EXAMPLES
+.Ss Example 1 : Count Up System Calls
+The following script traces all system calls and counts them for every process
+on the system.
+.Bd -literal -offset 2n
+syscall:::entry {
+ @[execname, pid] = count();
+}
+.Ed
+.Sh SEE ALSO
+.Xr dtrace 1 ,
+.Xr intro 2 ,
+.Xr tracing 7
+.Rs
+.%B The illumos Dynamic Tracing Guide
+.%O Chapter syscall Provider
+.%D 2008
+.%U https://illumos.org/books/dtrace/chp-syscall.html
+.Re
+.Rs
+.%A Brendan Gregg
+.%A Jim Mauro
+.%B DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD
+.%I Prentice Hall
+.%O Chapter Syscall Provider
+.%P pp. 315\(en327
+.%D 2011
+.%U https://www.brendangregg.com/dtracebook/
+.Re
+.Sh AUTHORS
+This manual page was written by
+.An Mateusz Piotrowski Aq Mt 0mp@FreeBSD.org .
diff --git a/share/man/man4/linux.4 b/share/man/man4/linux.4
index 711ac11e8fce..ec8342efe705 100644
--- a/share/man/man4/linux.4
+++ b/share/man/man4/linux.4
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 19, 2024
+.Dd May 7, 2026
.Dt LINUX 4
.Os
.Sh NAME
@@ -179,6 +179,7 @@ Linux kernel objects file system, see
.El
.Sh SEE ALSO
.Xr brandelf 1 ,
+.Xr dtrace_syscall 4 ,
.Xr fdescfs 4 ,
.Xr linprocfs 4 ,
.Xr linsysfs 4 ,