FYI: Why META_MODE rebuilds so much for building again after installworld (no source changes)

From: Mark Millard <marklmi_at_yahoo.com>
Date: Fri, 22 Jan 2021 01:45:29 -0800
Given an already built, installed and booted system version, I've
noted a big difference for META_MODE in 2 rebuild contexts (no
source updates involved):

*) Prior buildworld buildkernel, installkernel, installworld, boot
   presumed before (A) and before (B) below.

A) make . . . buildworld buildkernel
   make . . . buildworld buildkernel
   (the 2nd buildworld buildkernel in (A) builds far less than the first)
   (that means that the first built more than I would have guessed)

vs.

B) make . . . buildworld buildkernel
   make . . . installworld
   make . . . buildworld buildkernel
   (the 2nd buildworld buildkernel in (B) builds far more than it did in (A))
   (so, more like the 1st buildworld buildkernel in (A) and (B), given
    the specified prior context)

So I used make -dM for the commented buildworld buildkernel lines, logging
the build output and later diff'ing them.

Result that I noticed? Lots of lines uniquely from (B)'s case, ending with
one of:

file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/awk' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/cap_mkdb' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/cat' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/cp' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/crunchgen' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/crunchide' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/dd' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/egrep' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/env' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/file2c' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/gencat' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/grep' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/gzip' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/jot' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/lex' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/ln' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/m4' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/mv' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/patch' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/rm' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/sed' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/sh' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/touch' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/truncate' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/uudecode' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/uuencode' is newer than the target...
file '/usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/tmp/legacy/usr/sbin/xargs' is newer than the target...

The lines with these lead to more files being updated and so causing more
indirect rebuild activity (that cascades).

Many/most/all(?) of these seem to me to be unlikely to actually need to
contribute to what needs to be rebuilt (just based on being newer). So
the option to ignore (some of?) them could be useful in making META_MODE
builds quicker.


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
Received on Fri Jan 22 2021 - 08:45:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:26 UTC