From owner-freebsd-current@FreeBSD.ORG Thu Dec 19 09:40:57 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 247FF120; Thu, 19 Dec 2013 09:40:57 +0000 (UTC) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com [IPv6:2a00:1450:4010:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35B091ECE; Thu, 19 Dec 2013 09:40:56 +0000 (UTC) Received: by mail-la0-f48.google.com with SMTP id n7so335647lam.7 for ; Thu, 19 Dec 2013 01:40:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=h4GcrreuEc/O1LRrUVwM+GxUzOogMpS8JQ5WyYJqT+E=; b=XLoh8PVm6ohnqIqmNNYGFIrdeqKS0lLNy/wmgaJT+mKkYnzXYp3RMcYapznitgj71b i9WEkwsUbOvGfee9z9eRTZ6d/E4VXXwHEP1B67+yniK5L6iD50PCIskKiwbzvU+XNA4A sDIjUAnTMC2XdLr0HyD1WsHjgNkszVZIGqNy2K+hp3C1mMw7u5Jzi0AJ6lJpMwRlMkAW dSRU8+uI3jNn5c07xinsIOgqnGmb9hkal0uR9e/ariXiyPDYbqW+z7d66CBFcFUcE2Pq 5okXYv88GgUg8xo49EM/mDcMAMAq6iltj4o1qJlnZVXM4HARZGYCYvk9DnUgYq9u8lZm eQOw== MIME-Version: 1.0 X-Received: by 10.112.201.167 with SMTP id kb7mr225302lbc.32.1387446054155; Thu, 19 Dec 2013 01:40:54 -0800 (PST) Sender: rizzo.unipi@gmail.com Received: by 10.114.175.180 with HTTP; Thu, 19 Dec 2013 01:40:54 -0800 (PST) In-Reply-To: <33B1B06B-72F7-4E8D-BB06-40CCC34006CF@FreeBSD.org> References: <20131216184626.GA17125@onelab2.iet.unipi.it> <33B1B06B-72F7-4E8D-BB06-40CCC34006CF@FreeBSD.org> Date: Thu, 19 Dec 2013 01:40:54 -0800 X-Google-Sender-Auth: 9-NJ0N7GgRxQY3_QZTZbf1Q6hhs Message-ID: Subject: Re: RFC: less chatty system builds From: Luigi Rizzo To: David Chisnall Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: Dimitry Andric , "current@freebsd.org Current" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2013 09:40:57 -0000 On Thu, Dec 19, 2013 at 1:18 AM, David Chisnall wrote: > On 16 Dec 2013, at 21:35, Dimitry Andric wrote: > > > In any case, if anything like this is implemented, I would really prefer > > something like CMake does, e.g. give you a percentage counter that > > provides some information about how 'far' the build is progressing. > > I haven't seen this for a while, because I now use ninja exclusively for > building any projects that use CMake. The output of Ninja is pretty close > to my ideal for a build system, and so I'd recommend that anyone hacking on > this look at it. It looks something like this while building: > > $ ninja > [1/22] Building CXX object > lib/Target/Mips/AsmParser/CMakeFiles/LLVMMipsAsmParser.dir/MipsAsmParser.cpp.o > > The [1/22] part is a counter of the number of build steps done and updates > in place. The 'Building CXX object ...' part tells you what the current > rule is and what it's being applied to. This is only approximate, as it > usually does parallel builds, but it gives you some idea of what's > happening. > > the "Building CXX ... " is basically the same type of output that I was proposing. I am still unclear on how one can implement useful counters (see my other email) since the times of "build step" vary by 2-3 orders of magnitude. Anyways, maybe just counting the number of targets in the first 2-3 levels of the tree can give an idea. If a command produces warning output but exits with success, then that > command's output is dumped to stdout (explicitly serialised by Ninja so > that it's never interleaved with another command's output). > > If a command exits with a failure condition, then Ninja dumps the exact > command line that was used, along with all of the output, and then stops. > Another side benefit is that Ninja always uses absolute paths for invoking > the commands and for arguments, and so you can always just re-run that > single failing command. > > Oh, and when I do a build of LLVM/Clang on my laptop using Ninja, it takes > about 3-5 minutes, whereas when I do it with our build system it takes > about 15. When I do it on a 24-core server, it takes less than two minutes > with Ninja and with ours it takes about 15 (no speedup over my laptop). > I'd therefore suggest that there might be more pressing things that need > fixing with our antiquated build infrastructure than the prettiness of the > output... > these are orthogonal issues though, and so radically different in complexity that it does not seem a waste of energy to apply the patch i suggested while someone comes up with an improved build system. cheers luigi