diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -30,6 +30,7 @@ stdint.7 \ sticky.7 \ tests.7 \ + tracing.7 tuning.7 MLINKS= intro.7 miscellaneous.7 diff --git a/share/man/man7/tracing.7 b/share/man/man7/tracing.7 new file mode 100644 --- /dev/null +++ b/share/man/man7/tracing.7 @@ -0,0 +1,65 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Mateusz Piotrowski <0mp@FreeBSD.org> +.\" +.Dd June 14, 2025 +.Dt TRACING 7 +.Os +.Sh NAME +.Nm tracing +.Nd introduction to tracing and performance monitoring facilities +.Sh DESCRIPTION +.Fx +features a large variety of tracing and performance monitoring facilities. +Use them to measure performance and +troubleshoot kernel and userland problems both during +.Xr development 7 +and on production systems. +The facilities differ in scope, ease of use, overhead, design, +and limitations. +.Pp +.Sy DTrace +is the most versitile tracing framework available on +.Fx +and is capable of tracing throughout the +.Fx +software stack from the kernel drivers to the applications running in userland. +Refer to +.Xr dtrace 1 +and +.Xr SDT 9 +for more details. +.Pp +The +.Xr truss 1 +is an easy-to-use alternative to +.Xr dtrace 1 +when simple system-call tracing is all the user needs. +It uses +.Xr ptrace 2 , +which is one of the classic interfaces for debugging and tracing processes. +.Pp +Apart from +.Sy DTrace , +.Xr ktr 4 +.Pq and its userland utility, Xr ktrace 1 +is another utility capable of tracing kernel events. +.Pp +To trace using precise hardware counters, refer to +.Xr hwpmc 4 +for the kernel part of the framework and +.Xr pmcstat 8 +for the userland utility. +.Pp +Good candidates for measuring boot-time performance are +.Xr boottrace 4 +and +.Xr tslog 4 . +.Sh HISTORY +The +.Nm +manual page was written by +.An Mateusz Piotrowski Aq Mt 0mp@FreeBSD.org . +It first appeared in +.Fx 15.0 .