Date: Fri, 2 Feb 2024 23:14:28 -0800 From: Cy Schubert <Cy.Schubert@cschubert.com> To: "Chuck Tuffli" <chuck@tuffli.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Profiling applications Message-ID: <20240202231428.7c711308@slippy> In-Reply-To: <efe56bdc-b4a8-4452-add3-a5b01c8a856a@app.fastmail.com> References: <efe56bdc-b4a8-4452-add3-a5b01c8a856a@app.fastmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 02 Feb 2024 16:16:26 -0800 "Chuck Tuffli" <chuck@tuffli.net> wrote: > What is the recommended way of profiling applications on FreeBSD these da= ys? I=E2=80=99m looking for information like =E2=80=9C28% of the execution = time is spent in function X=E2=80=9D. >=20 > =E2=80=94chuck=20 Try DTrace. The DTrace book (if you can get your hands on it) is a good source of information about profiling. Oracle (formerly Sun) has some good resources. https://ekamperi.github.io/Geant4/dtrace.html may provide some pointers. Brendan Gregg's (Brendan wrote DTrace) flame FlameGraph is another option, though it displays hot PIDs, probably not what you're looking for. The DTrace Tookit is in ports. There are some DTrace code samples there. Once you know where your app is spending its time you can add USDT probes to allow you to capture snapshots of data structures at points in time. --=20 Cheers, Cy Schubert <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org NTP: <cy@nwtime.org> Web: https://nwtime.org e^(i*pi)+1=3D0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240202231428.7c711308>