1.\" 2.\" SPDX-License-Identifier: BSD-2-Clause 3.\" 4.\" Copyright (c) 2026 Mateusz Piotrowski <0mp@FreeBSD.org> 5.\" 6.Dd May 7, 2026 7.Dt DTRACE_SYSCALL 4 8.Os 9.Sh NAME 10.Nm dtrace_syscall 11.Nd a DTrace provider for system calls 12.Sh SYNOPSIS 13.Nm syscall Ns Cm \&: Ns Ar abi Ns Cm \&: Ns Ar syscall Ns Cm :entry 14.Nm syscall Ns Cm \&: Ns Ar abi Ns Cm \&: Ns Ar syscall Ns Cm :return 15.Sh DESCRIPTION 16The 17.Nm syscall 18provider provides entry and return probes for system calls. 19.Pp 20The module in the probe's description is 21.Ar abi , 22which indicates what system call ABI a 23.Ar syscall 24belongs to. 25.Nm 26supports the following system call ABIs: 27.Pp 28.Bl -tag -offset indent -width freebsd32 -compact 29.It Cm freebsd 30Native ABI. 31.It Cm freebsd32 32Non-native, 32-bit ABI. 33.It Cm linux 34Refer to 35.Xr linux 4 . 36.It Cm linux32 37Refer to 38.Xr linux 4 . 39.El 40.Pp 41The arguments to the 42.Cm entry 43probes are the arguments passed to the system call. 44.Pp 45The 46.Cm return 47probe stores the system call's return value in both 48.Fa arg0 49and 50.Fa arg1 . 51.Pp 52Inspect the 53.Xr d 7 Ap s 54.Va errno 55variable to check if a system call failed. 56.Sh EXAMPLES 57.Ss Example 1 : Count Up System Calls 58The following script traces all system calls and counts them for every process 59on the system. 60.Bd -literal -offset 2n 61syscall:::entry { 62 @[execname, pid] = count(); 63} 64.Ed 65.Sh SEE ALSO 66.Xr dtrace 1 , 67.Xr intro 2 , 68.Xr tracing 7 69.Rs 70.%B The illumos Dynamic Tracing Guide 71.%O Chapter syscall Provider 72.%D 2008 73.%U https://illumos.org/books/dtrace/chp-syscall.html 74.Re 75.Rs 76.%A Brendan Gregg 77.%A Jim Mauro 78.%B DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD 79.%I Prentice Hall 80.%O Chapter Syscall Provider 81.%P pp. 315\(en327 82.%D 2011 83.%U https://www.brendangregg.com/dtracebook/ 84.Re 85.Sh AUTHORS 86This manual page was written by 87.An Mateusz Piotrowski Aq Mt 0mp@FreeBSD.org . 88