Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Mar 2017 20:05:52 -0500
From:      "Garance A Drosehn" <drosih@rpi.edu>
To:        "Ngie Cooper" <yaneurabeya@gmail.com>
Cc:        rgrimes@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org,  svn-src-head@FreeBSD.org
Subject:   Re: svn commit: r314654 - in head/cddl: lib/drti lib/libavl lib/libctf lib/libdtrace lib/libnvpair lib/libumem lib/libuutil lib/libzfs lib/libzfs_core lib/libzpool sbin/zfs sbin/zpool usr.bin/ctfconver...
Message-ID:  <7B9F63AD-4EC4-4D5E-884B-3D0A22AB3952@rpi.edu>
In-Reply-To: <03156186-221F-4EEB-A86E-077E46E28296@gmail.com>
References:  <201703042039.v24KdcDE078734@pdx.rh.CN85.dnsmgr.net> <03156186-221F-4EEB-A86E-077E46E28296@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4 Mar 2017, at 15:42, Ngie Cooper (yaneurabeya) wrote:

>> On Mar 4, 2017, at 12:39, Rodney W. Grimes wrote:
>>
>> On 4 Mar 2017, at 15:13, Bryan Drewery wrote:
>>>
>>> Where is this discussion?  The only one I can find is
>>> https://reviews.freebsd.org/D9207 which seems to have
>>> a consensus of moving to SRCTOP and :H vs '../..'.
>>
>> There was a short discussion here on the commiters list
>> with some others expressing the preferred the relative
>> status of things even though it clutters logs.
>>
>> D9207 touches 15 files.. I would not consider that an
>> adequate review that is actually going to change nearly
>> every Makefile in the tree, and change what people have
>> been looking and at working with for 30 years.
>>
>> I don't think any differntial that only had 3 or 4 people
>> involved that is going to effect all developers is
>> adequate either.  Tree wide sweeping changes should be
>> discussed far more widely.
>>
>> Idk, maybe I am to personally attached to the relative
>> paths.. cause I had a major part in helping them all to
>> work, or perhaps its my been burned by absolute paths
>> that had to be reworked too many times in my past.  But
>> my gut is telling me this change is Bad(tm).
>
> I care about this for the reasons brewery posted, but I
> also care because it slows down my terminal output and
> it bloats my disk with typescript logs that contain
> unnecessary information.

FWIW, here was my method to fix the "slows down output" issue.
I wrote a wrapper around 'make' which I called "wcmake", and
it runs the output from a 'make' command through a script
which does a variety of analysis on that output.

Among other things, it truncates the lines of make-output to
screen width, but it saves the full output to a temp file, and
then compresses that temp file.  It also parses and condenses
the output so what the user sees at the console looks like:

cc -c /usr/src/usr.bin/make/arch.c -O2 -pipe -I/usr/src/usr.bin/make 
-DMAKE_V|+
cc -c /usr/src/usr.bin/make/buf.c -O2 -pipe -I/usr/src/usr.bin/make 
-DMAKE_VE|+
cc -c /usr/src/usr.bin/make/cond.c -O2 -pipe -I/usr/src/usr.bin/make 
-DMAKE_V|+

instead of:

cc -O2 -pipe -I/usr/src/usr.bin/make -DMAKE_VERSION=\"9201210220\" 
-DDEFSHELLNAME=\"sh\" -std=gnu99  -fstack-protector -Wsystem-headers 
-Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual 
-Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align 
-Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls 
-Wold-style-definition -Wno-pointer-sign -c /usr/src/usr.bin/make/arch.c 
-o arch.o

cc -O2 -pipe -I/usr/src/usr.bin/make -DMAKE_VERSION=\"9201210220\" 
-DDEFSHELLNAME=\"sh\" -std=gnu99  -fstack-protector -Wsystem-headers 
-Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual 
-Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align 
-Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls 
-Wold-style-definition -Wno-pointer-sign -c /usr/src/usr.bin/make/buf.c 
-o buf.o

cc -O2 -pipe -I/usr/src/usr.bin/make -DMAKE_VERSION=\"9201210220\" 
-DDEFSHELLNAME=\"sh\" -std=gnu99  -fstack-protector -Wsystem-headers 
-Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual 
-Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align 
-Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls 
-Wold-style-definition -Wno-pointer-sign -c /usr/src/usr.bin/make/cond.c 
-o cond.o

#  [I added blank-lines between the lines of make-output, so
#   it doesn't look so much like a solid wall of characters]

(ie, it moves the '-c filename' to the start of the line, strips
the setting of any environment variables at the start, and tacks
on the '|+' at the end if it has truncated the line).  It also
parses the output looking for warning messages, and writes a
summary of messages-seen after the 'make' has finished.

One of the goals was to speed up buildworld's when I was doing
them via a serial console-session or over a slow ssh-connection.
But this way if something really bad or odd *did* come up, I
could look at the original full make-output which was saved on
disk.  Adding a wrapper-script obviously adds more CPU work to
the build, but my builds definitely finished faster as-far-as
wall-clock time because I was writing so much less output to
the console.

I have two versions of this script, and I don't remember why
there are two versions.  The first one was written in perl, and
later I wrote a second one in ruby.  Both are under ~gad/scripts
on the machines at freebsd.org.  I'm sure the code in the
scripts is probably lousy and somewhat embarrassing (to me),
but you could at least check them out and see where I was
going with it.

disclaimer: I haven't taken a serious look at these scripts a
few years.  I'm sure they need to be updated due to new commands
and new warning messages which have appeared since then.

-- 
Garance Alistair Drosehn                =     drosih@rpi.edu
Senior Systems Programmer               or   gad@FreeBSD.org
Rensselaer Polytechnic Institute;             Troy, NY;  USA



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B9F63AD-4EC4-4D5E-884B-3D0A22AB3952>