From patchwork Mon Apr 30 19:55:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Champetier X-Patchwork-Id: 906841 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HVMUHL+x"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lGpDPkNO"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40ZZz06ZJSz9s2Y for ; Tue, 1 May 2018 05:55:40 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=x6fJ/svviFMFKW07LbwLjYGyCZFoQBxyPgGnw3O1nmk=; b=HVMUHL+xpZM1dN Zks5N0u19j0yhlrG/XZf+eMoqAZQ/9u/0mLETBBAOOE5V3EC/aKdq92bAAq6Cy2O8j8Z1oIKwjLW5 pLN1TfH5ORl82ngANQAM2sNWMupKLw2DpLrg6EGHJqASuEf91DexDGroQeRRBxPQ4Fe6iIIOLOpmf JO8NTL6E+5CCE9Rklo/3czRbdFiqDgE0pjV96BWtiTZt4rga55Rdfw561EP2A/lyHnmjMRjbPgrjK p06iILTPm1MDhQxikyUrpRPXiKVAy7WX1EzmnZztJj21xF+YHZoQJNgGvTgJSqMNkxXhL9AxHu4jR AO/A7izXGYczS54X1QEA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDEte-0003Ht-FE; Mon, 30 Apr 2018 19:55:38 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDEta-0003Fp-Nw for lede-dev@lists.infradead.org; Mon, 30 Apr 2018 19:55:36 +0000 Received: by mail-pf0-x244.google.com with SMTP id v63so7545310pfk.8 for ; Mon, 30 Apr 2018 12:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=bjJMj4aYZ2Ui7XDWz1EsGFWNwQoB+eK3R4N7r2wF+AY=; b=lGpDPkNOEQkfrAM6H+Q/PMYrbPxi3I/QmZx5UDn82doX7LgpR7u4sh06FY06kkaR0l WjfYkmNdSAwpGQhL++gmjW6L1vMXImiTpFNacugz2c1HVthAoaNXXJUZaPOgPsQus76Q IS7akewPhrzfCNuFUFEOsVzl4ifJRmFCjYzdDXFD7XZiyeXXK3OFyWdsXbZRWJAkTeli cXnPR412aLIYQLnnWEsae07X8sCYn+iTsEYYwQGkYaHEQBtdVaAjFlWW58OsI3oLcyLY KzH9P/BIOK55KKL+h5ocWPDAdRjQ3YoypACY53jC0Tl6RFZuQrAw24oKSxsvU0/UafS0 fBxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bjJMj4aYZ2Ui7XDWz1EsGFWNwQoB+eK3R4N7r2wF+AY=; b=QbQktTSTIZX+HBDLbFfOHcA+8gY4aPnlQIEUjeI1q2fZqrGXKTFBrwD9vu72/+oc58 qHUAU7HU8h7Lr/c7FFJGX5omKpJL21IilncpofrYarptvBNyJ/E/9TMxiMfsymZ3R1VA OKU6G3YqTL7yj8nLdIY9H6+EzeYQfsJJcnvHCDlxAl7eg+VBxYAlCjTStunoJUVxzT36 BFPqisYhRa28gh82IJQhC5N8+7bGA0VTRZqwlzScO2VgvGCEi1o8h+RHOpoHAhHZgxIW nMEdAodicpw3jXei1EV8SFtDKxFt1DwpBklAHEECDBAw50jemW7YxWOVW5RP2MtCcPPK 67uQ== X-Gm-Message-State: ALQs6tB6qr6mJYcnV/x5Lj5s8vNbgbPVZIvk/Kk8YcsKbYjISkvrEnkX 33aDcPAI/nU/s7n/YBPcau0LxPWn X-Google-Smtp-Source: AB8JxZrAhOeGxXWvKdOL25JdP3lLSTu2lBL/EWWkskI7TygTQO2kcC58Cw4x3AimptWeG0poGk4SEA== X-Received: by 2002:a63:6743:: with SMTP id b64-v6mr11165098pgc.14.1525118120502; Mon, 30 Apr 2018 12:55:20 -0700 (PDT) Received: from echampetier.lab1.anevia.com ([2601:646:8382:42c3:7c5c:baa2:b8f7:ae45]) by smtp.gmail.com with ESMTPSA id e126sm16107751pfh.5.2018.04.30.12.55.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 12:55:19 -0700 (PDT) From: Etienne Champetier To: lede-dev@lists.infradead.org Date: Mon, 30 Apr 2018 12:55:12 -0700 Message-Id: <20180430195512.6634-1-champetier.etienne@gmail.com> X-Mailer: git-send-email 2.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180430_125534_801137_FC9B25E2 X-CRM114-Status: UNSURE ( 9.36 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c00:0:0:0:244 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (champetier.etienne[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [LEDE-DEV] [PATCH v2] build: log time taken by each packages/steps X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Etienne Champetier MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The idea is to easily get the list of packages taking the most time to build, and see if we can improve them v1: Use SetupHostCommand as recommended by John v2: add space after 'time:', remove useless /usr/bin/time from SetupHostCommand Signed-off-by: Etienne Champetier --- include/prereq-build.mk | 4 ++++ include/subdir.mk | 1 + 2 files changed, 5 insertions(+) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 5b9a7e049d..bac5fdc84c 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -138,6 +138,10 @@ $(eval $(call SetupHostCommand,bzip2,Please install 'bzip2', \ $(eval $(call SetupHostCommand,wget,Please install GNU 'wget', \ wget --version | grep GNU)) +$(eval $(call SetupHostCommand,gtime,Please install GNU 'time', \ + gtime --version 2>&1 | grep GNU, \ + time --version 2>&1 | grep GNU)) + $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \ perl --version | grep "perl.*v5")) diff --git a/include/subdir.mk b/include/subdir.mk index 79a80528ae..ed4f7537d5 100644 --- a/include/subdir.mk +++ b/include/subdir.mk @@ -43,6 +43,7 @@ log_make = \ $(if $(BUILD_LOG), \ set -o pipefail; \ mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4));) \ + gtime -f "time: $(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2)\#%U\#%S\#%e" -- \ $$(SUBMAKE) $(subdir_make_opts) $(if $(3),$(3)-)$(2) \ $(if $(BUILD_LOG),SILENT= 2>&1 | tee $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2).txt)