NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Profiling a build



    Date:        Tue, 2 Dec 2025 06:23:00 +0000 (UTC)
    From:        Benny Siegert <bsiegert%netbsd.org@localhost>
    Message-ID:  <210a5d85-783d-700f-dd94-f1b11ebd0e73%netbsd.org@localhost>

  | Should I be looking at dtrace for that? Or is there something simpler?

I'd just enable process accounting (accton(8)) - clear everything before
you start, disable it again when the build is done, and then use sa(8)
with as many different options and combinations as you can imagine, and
most of the data you're looking for should be available.

If you can't make the system essentially quiet (other than the build) while
it happens, at least do the build using a user-id that won't be doing anything
else during that period (ie: not root).

You will need sufficient empty space in /var/account - but unless your build
is a very complex one (lots and lots of processes running many times)
it should not be too costly - in a typical build where the compiler uses
most of the time, you'll probably barely notice it.   (If space there runs
out, or comes close even, process accounting should simply turn itself off,
but that would ruin your results.)

kre





Home | Main Index | Thread Index | Old Index