From owner-svn-src-all@freebsd.org Sun Mar 17 17:05:13 2019 Return-Path: Delivered-To: svn-src-all@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 24AE7154353C for ; Sun, 17 Mar 2019 17:05:13 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4567687B8F for ; Sun, 17 Mar 2019 17:05:12 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1552842309; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=sooA0vD82HrLdtdK6ZeZq5U+/bIy9hY8T/HFofjo4HkuLwtRB0lRVMhDv0g4j0FJIVJS1H8RFMOPH qIzLYmz8sNZJIyeiqoqDFPrhbaNMQ9mPuCKVIQCKBqT4jQYJblukDTTBwcUXD7i4joE6DBqiB3vsz/ 85k0kOOwU0JCALaLvpPjVz5AFbn0CC3BkQCIbGgLfhOUvhRD/sKUhy8w64nUPtYw6BVGIVIR5KevlW /k77L225qBOywkNDQzqH/2Rd2gS4BGYsXHkA8wxNRK27AWfwjcscb0bszpFWtuvP+38qIeA5V2/lVU fv9nIt2ppfImADyYBo8TxZU7yFe2z+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=0z1LFyENhbnaxRv1AY4726QDg4uJqiGEfcSjFVF9K10=; b=emdsEBEVdTO+LG2X8951ny1koE+rCvufAkZHLz7z3DOqKt9xMQAqLY4q9Z5eHnQmL4AgXxq3o3HBW FwLeQ4N44efzSlcutau9BcBtD8oMlNf3Tve4J3RrCBY+JSLA3jvkvAVnj8BBIT2R/V7H9ckpDkYCvo S/VHhuPTn36D838YmhSN/HxFpENPcleqtDYdKjMMsyk6VF6SyE85z6yQULfCd2BtvQEj/0x2++x48+ 2YFuGkKIALYY3bF6g3BbFR/PomissuCmc+0iwxgF06gdw3q8kumEcsYud2ON83cwige3uxY03OsqjR NRuZCHeh91nnGORcsPxsWUwrGx/UA0A== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=0z1LFyENhbnaxRv1AY4726QDg4uJqiGEfcSjFVF9K10=; b=VxK7Ul++fs236F+Itw8hJ/ulBiwqFbtooYXw7qne4RPRm2flPPVFo0MhaCaMfmBPuqoEQPNJWbsKq 7fT4Mwt7tXHJisqgyOxKq1ve/Bhf5U+VXlrCKyK4yxgy9xJlYzpEf8E6mZUk7+x1hP4IF0iC2TSTU8 yyPFR6T8JMR5wdtaMjYhNDSCNeFTXl+rInMo3LiZR/5SmaUiWqEsmeXkpbF10zR/cisMtQadoLfat/ i87Lti8jiJqCmEtLlJy2iWO1GzrB2PRWQEFEBzxLKTVIC048KseapE4opPWxCDjA+fI7RupdF3gEg2 pkrcfF180t3svfPmvLya7VijT0gNwlw== X-MHO-RoutePath: aGlwcGll X-MHO-User: cf59b65b-48d6-11e9-908b-352056dbf2de X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id cf59b65b-48d6-11e9-908b-352056dbf2de; Sun, 17 Mar 2019 17:05:06 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x2HH544o059783; Sun, 17 Mar 2019 11:05:04 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <69b2f7e10f7cc3db29432e6bf90214e2f297312d.camel@freebsd.org> Subject: Re: svn commit: r345238 - head From: Ian Lepore To: Wolfram Schneider Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 17 Mar 2019 11:05:04 -0600 In-Reply-To: References: <201903162002.x2GK2vmA013275@repo.freebsd.org> <0ea3a53f64016afa9dbc6f1b2d2ee25f09df00b8.camel@freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4567687B8F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.989,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Mar 2019 17:05:13 -0000 On Sun, 2019-03-17 at 10:32 +0100, Wolfram Schneider wrote: > 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 > > > ================================================================= > > > CMSG==== > > > ========= > > > --- 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. > _BUILDKERNEL_START will be set to the time when the makefile is parsed, before any target is run. My questions were basically rhetorical; what you've done is make it report the time from when make is launched until when various targets complete, and each report will include the cumulative time of any targets that ran before that point. If the goal is to time the entire run of make (which is effectively what this is doing), then that is probably best addressed with .BEGIN and .END targets in Makefile, rather than multiple duplicated entries in Makefile.inc1. -- Ian > $ 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 >