Date: Tue, 2 Dec 2025 13:36:07 +0100 From: Paul Floyd <paulf2718@gmail.com> To: Freebsd hackers list <freebsd-hackers@freebsd.org> Subject: Re: Process Profiling Message-ID: <C0FE7F6D-ABFF-4985-AB97-410A4C6DC000@gmail.com> In-Reply-To: <CAD2_vGqforjTNbqUF-_gXrxWkuFAiP5Q7ZZn7p42AZfOmiV9wA@mail.gmail.com> References: <CAD2_vGqforjTNbqUF-_gXrxWkuFAiP5Q7ZZn7p42AZfOmiV9wA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] > On 2 Dec 2025, at 02:15, Friedrich Doku <friedrichdoku2030@u.northwestern.edu> wrote: > > Hi, > > How can I profile a process on freebsd? I want to see where all the time is going, and there is no perf. Hi Friedrich The nearest thing that FreeBSD has is pmcstat. See, for instance https://man.freebsd.org/cgi/man.cgi?query=pmcstat&sektion=8&apropos=0&manpath=FreeBSD+15.0-RELEASE+and+Ports https://wiki.freebsd.org/PmcTools Going by the wiki page, there was active development from 2007 ro 2010 and then not much since. I haven’t used it much, and also found it quite hard to get working properly. The next thing that I would consider is Google Perftools. https://www.freshports.org/devel/google-perftools/ You will need to rebuild your application and link with the perftools lib. Then you will be able to perform time sampled time profiling and heap profiling. Also for heap profiling consider heap track https://www.freshports.org/devel/heaptrack/. No need to rebuild but you must be profiling an exe that links dynamically with libc. Lastly Valgrind contains 4 performance measurement tools: Callgrind, Cachegrind, Massif and DHAT. No need to rebuild and they will work with dynamic and static exes. A+ Paul [-- Attachment #2 --]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C0FE7F6D-ABFF-4985-AB97-410A4C6DC000>
