From patchwork Sun Nov 10 23:51:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 290109 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 0C1F82C00AC for ; Mon, 11 Nov 2013 10:52:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 095D932FCB; Sun, 10 Nov 2013 23:52:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id US97ASbcSrFU; Sun, 10 Nov 2013 23:52:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 1895132FC4; Sun, 10 Nov 2013 23:51:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 335361BF840 for ; Sun, 10 Nov 2013 23:51:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 24E4E8D15F for ; Sun, 10 Nov 2013 23:51:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bPt9MtN-JgmP for ; Sun, 10 Nov 2013 23:51:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 61E688CF31 for ; Sun, 10 Nov 2013 23:51:45 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id n12so1072598wgh.22 for ; Sun, 10 Nov 2013 15:51:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=rghDSTNF/zlV9AMVp99Z5HKdib4x66g2z7+qfw7PPG0=; b=J4ygN/u/CnZ5ntib4WLdeJjh2O3Je1zxI86j0yI0k99HWyvEYL7coQ9m5HSX6sxv+o b2j91KHReqyYS0fWMB84zY/EP4iSpJcoTdzEXbGQKEKYhJfzPHGaCNelOCco2DechgYn 159c+0X5DNXwh1RiGgRwH8tnP0O3t/slIBa2ka7rvq1rCf6EDCBp1we961J7qc/OrTvV e2U3D0EWmqP8kDF1UncnC+ZjjPQGHxWgecaz80sEis6M8glqOacaUaBN+1P3cBUM9H4I 3c3qDBM2bdXETPmddR7Hev4P2jVJmvTG5GgSPU3MtCIniWPw2geDRWyV22nsvZKPJEfC EHdg== X-Received: by 10.194.71.72 with SMTP id s8mr29386wju.52.1384127503569; Sun, 10 Nov 2013 15:51:43 -0800 (PST) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id dj8sm28761662wid.2.2013.11.10.15.51.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 10 Nov 2013 15:51:43 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Mon, 11 Nov 2013 00:51:37 +0100 Message-Id: X-Mailer: git-send-email 1.8.1.2 In-Reply-To: References: Cc: Peter Korsgaard , "Yann E. MORIN" Subject: [Buildroot] [PATCH 3/4] pkg-infra: add hook to log timing of steps X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: "Yann E. MORIN" The timing information is stored in the file $(O)/build-time.log Signed-off-by: "Yann E. MORIN" --- package/pkg-generic.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 02ab8a3..5dba216 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -43,6 +43,17 @@ define step_end $(foreach hook,$(GLOBAL_INSTRUMENTATION_HOOKS),$(call $(hook),end,$(1),$($(PKG)_NAME))$(sep)) endef +####################################### +# Actual steps hooks + +# Time steps +define step_time + printf "%s:%-5.5s:%-20.20s: %s\n" \ + "$$(date +%s)" "$(1)" "$(2)" "$(3)" \ + >>"$(BUILD_DIR)/build-time.log" +endef +GLOBAL_INSTRUMENTATION_HOOKS += step_time + ################################################################################ # Implicit targets -- produce a stamp file for each step of a package build ################################################################################