From owner-svn-src-head@freebsd.org Sun Mar 17 15:02:30 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B211153E27D; Sun, 17 Mar 2019 15:02:30 +0000 (UTC) (envelope-from wschnr@googlemail.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1C438381F; Sun, 17 Mar 2019 15:02:29 +0000 (UTC) (envelope-from wschnr@googlemail.com) Received: by mail-wm1-f54.google.com with SMTP id z6so340205wmi.0; Sun, 17 Mar 2019 08:02:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PkTfOthMDm/7b+oztWXOpETLCaQvWpOeGb6xfZUUz0E=; b=fpY6xPfd99Y/3d1yIt0SgpDflCph8G2BK+sCMiJfRnTeqyYFF0yAS5B+TEYs9zQDcR Ezx712GDHr4mZb7awLNMXlpAoYBW2wkWclz0bth0g6miI+jEhVqZZ426/E8MG5Q1Ox+Q MZzgKEcLzuNpQPqpnxFimxkjMljTliOJGlXvSsaafZGeZ38asaYNCxEsvnyBhsXvnMM3 snDWSRguYqLFw0Id+5eNXnyrOp6RobizagCoHC5IBPmmlGnzCHHBgLTt7qqkka9981Pf vdgiuXx9fXZ5eMqvACwBsSFN0EySPL44RWlFy2wH2vOs9g85bjkn0hqafz6nD983rW4k jh4Q== X-Gm-Message-State: APjAAAUat+8DQjTmdzfR6PNEbVmzeABfL0BopzwLNzK6p/HpF2p7TOdj xOq7seVgx7vcGzowcLWBZ8Gfcd2ExXt+rhi169rVs7LS X-Google-Smtp-Source: APXvYqx1Bm7EQ7l/g/Rgew3CK3h784xRrAaQSjaycRLhE7ubuLTo/DH0VfESjYT0OTLw3GrbAGa3whhPAAxQObGDj14= X-Received: by 2002:a1c:99c2:: with SMTP id b185mr7485360wme.149.1552815150852; Sun, 17 Mar 2019 02:32:30 -0700 (PDT) MIME-Version: 1.0 References: <201903162002.x2GK2vmA013275@repo.freebsd.org> <0ea3a53f64016afa9dbc6f1b2d2ee25f09df00b8.camel@freebsd.org> In-Reply-To: <0ea3a53f64016afa9dbc6f1b2d2ee25f09df00b8.camel@freebsd.org> From: Wolfram Schneider Date: Sun, 17 Mar 2019 10:32:20 +0100 Message-ID: Subject: Re: svn commit: r345238 - head To: Ian Lepore , Wolfram Schneider Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: F1C438381F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.92)[-0.923,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Mar 2019 15:02:30 -0000 On Sat, 16 Mar 2019 at 23:37, Ian Lepore wrote: > > On Sat, 2019-03-16 at 20:02 +0000, Wolfram Schneider wrote: > > Author: wosch > > Date: Sat Mar 16 20:02:57 2019 > > New Revision: 345238 > > URL: https://svnweb.freebsd.org/changeset/base/345238 > > > > Log: > > `make buildkernel' should display the build time in seconds > > > > PR: 224433 > > Approved by: cem > > Differential Revision: https://reviews.freebsd.org/D13910 > > > > Modified: > > head/Makefile.inc1 > > > > Modified: head/Makefile.inc1 > > ===================================================================== > > ========= > > --- head/Makefile.inc1 Sat Mar 16 17:55:22 2019 (r345237) > > +++ head/Makefile.inc1 Sat Mar 16 20:02:57 2019 (r345238) > > @@ -1584,6 +1584,11 @@ _cleankernobj_fast_depend_hack: .PHONY > > > > ${WMAKE_TGTS:N_worldtmp:Nbuild${libcompat}} > > ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY > > > > +# record kernel(s) build time in seconds > > +.if make(buildkernel) > > +_BUILDKERNEL_START!= date '+%s' > > +.endif > > + > > # > > # buildkernel > > # > > @@ -1640,7 +1645,12 @@ buildkernel: .MAKE .PHONY > > @echo "------------------------------------------------------ > > --------" > > @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C > > date`" > > @echo "------------------------------------------------------ > > --------" > > + > > .endfor > > + @seconds=$$(($$(date '+%s') - ${_BUILDKERNEL_START})); \ > > + echo -n ">>> Kernel(s) build for${BUILDKERNELS} in $$seconds > > seconds, "; \ > > + echo "ncpu: $$(sysctl -n hw.ncpu)${.MAKE.JOBS:S/^/, make > > -j/}" > > + @echo "------------------------------------------------------ > > --------" > > > > NO_INSTALLEXTRAKERNELS?= yes > > > > > > Does this really report the buildkernel time, or the time from when > make starts until when the kernel portion of the make finishes? Will > the result be right when you do "make buildworld buildkernel"? Good point, I didn't checked this yet. The handbook at https://www.freebsd.org/doc/handbook/makeworld.html recommends to run buildworld and buildkernel in 2 steps: make -j4 buildworld ; make -j4 kernel PS: it seems to work fine. The time will be recorded when the make target is called, not when make is called. $ grep ncpu build.log >>> World build in 2004 seconds, ncpu: 32, make -j33 >>> Kernel(s) build for GENERIC in 138 seconds, ncpu: 32, make -j33 -Wolfram -- Wolfram Schneider https://wolfram.schneider.org