[Top][All Lists]

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

Re: patch to support output synchronization under -j

From: David Boyce
Subject: Re: patch to support output synchronization under -j
Date: Fri, 15 Apr 2011 08:31:43 -0400

On Fri, Apr 15, 2011 at 6:45 AM, Eli Zaretskii <address@hidden> wrote:
> I lack the higher-level picture.  Can you describe in a few words how
> will this work in a running Make?  I don't mean the details of how
> files are locked and unlocked (I understand that part), I mean the
> larger picture, like how it will look to the user, how several
> programs running in parallel will write their output and in what order
> it will appear eventually on the screen.

I'll try to illustrate with a different example. For a test case I've
taken an open-source package called jikes which compiles ~40 C++
files. I had to modify the automake-generated makefile to supply
illustrative verbosity; here's the compilation pattern rule:

%.o: %.cpp
        @echo "BEGINNING $@ ..." &&\
        g++ -DHAVE_CONFIG_H -I. -g -O2 -c -o $@ $< &&\
        echo "FINISHED $@ ...";

and I've attached output logs "without.txt" and "with.txt", both using
-j for unlimited jobs. You'll notice that in without.txt the output of
recipes is separated; all the BEGINNING lines show up as soon as the
job is forked, and all the ENDING lines show up as it finishes. In the
"with" case, the BEGINNING lines are effectively held and released in
sync with their matching ENDING lines.

The main problem being solved here is that error and warning messages
often get separated from their recipes in build logs. It's hard to
debug "foo: permission denied" when you can't figure out which recipe
generated that message.

Does that help?


Attachment: with.txt
Description: Text document

Attachment: without.txt
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]