[Bug 257141] make buildworld with time logging for each stage

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 12 Jul 2021 18:07:21 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257141

            Bug ID: 257141
           Summary: make buildworld with time logging for each stage
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs_at_FreeBSD.org
          Reporter: wosch_at_FreeBSD.org

The target "buildworld" does a lot of bootstrapping before we actually compile
our current source code. It would be nice if we can see how much time we spent
in each bootstrapping stage, and how much for the current code.

Here is a simple patch which runs the make command together with the time(1)
command.

cd /usr/src && make buildworld
egrep  ' real | stage ' log.buildworld

>>> stage 1.1: legacy release compatibility shims
        0.18 real         0.11 user         0.11 sys
>>> stage 1.2: bootstrap tools
       51.61 real       957.71 user        26.57 sys
>>> stage 2.1: cleaning up the object tree
        5.25 real        76.18 user        30.59 sys
        4.02 real        48.22 user        18.68 sys
>>> stage 2.3: build tools
        1.71 real         7.21 user         1.90 sys
>>> stage 3: cross tools
      699.53 real     17984.32 user       379.21 sys
        0.08 real         0.03 user         0.04 sys
>>> stage 3.1: recording build metadata
        0.10 real         0.02 user         0.07 sys
        0.04 real         0.02 user         0.01 sys
>>> stage 4.1: building includes
        4.23 real        62.01 user        13.27 sys
>>> stage 4.2: building libraries
     1165.88 real     33415.91 user       919.59 sys
>>> stage 4.3: building lib32 shim libraries
        0.23 real         0.34 user         0.50 sys
        0.14 real         0.11 user         0.07 sys
        1.16 real         6.80 user         1.73 sys
        0.06 real         0.02 user         0.04 sys
        0.18 real         0.34 user         0.16 sys
        0.27 real         0.27 user         0.08 sys
        0.10 real         0.50 user         0.23 sys
      197.43 real      4766.05 user       401.80 sys
>>> stage 4.4: building everything
      273.69 real      6713.36 user       438.12 sys
     2413.52 real     64045.82 user      2241.87 sys

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Mon Jul 12 2021 - 18:07:21 UTC

Original text of this message