From patchwork Wed Oct 16 05:15:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 176421 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6868156ill; Tue, 15 Oct 2019 22:17:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxt0ItXRCmRIrAAL0DUehqHb26xMcZv7ksCjkn1MZCf8MrgWQmssye02bUqoRm8KZzmD4yR X-Received: by 2002:a17:906:a88e:: with SMTP id ha14mr36860339ejb.92.1571203040456; Tue, 15 Oct 2019 22:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571203040; cv=none; d=google.com; s=arc-20160816; b=0BFZpBCG6hXvcq6gzHYTg9HbsQBc7OBjvFhayWjW7QHqqgAEv3GQWKuSBHHsD8c1vr JgSLUdyxZ1TBo3xrrUxSvMsVwuQvhKVDkOUmorcFFK0R3AYy/VsqGkm1kk++KLK5/l8C wngsN3WyP+UJCqczEybNmtArS4x0MQm5AVQsPPlsC7eG96FUOnlrvZ2PCMcC8EUnRP1P k8bQy0+JCKVujn/SFmqNYId4o9hS/ZmZaqphbM73BMBOQsfBpHICId/NZm9J8oJ1YpJG GZZo3pEK6RpqsBa8uqsrQ+tgWPAFWvGv82g4ah4CQn9qb5tWD5jz2w5V9V9B/vX4jt3d LEzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=7esRt800qRlkwyQ3paFYTyNUrseNp3QJ3LafPyce9PM=; b=LkyEzatvJ+aPi9M0C3PXzR2fXGB8TTXn6vshXQCCb8MB7j8j/zqMndD5bw7MMV56P6 EUpLevuHOdSqraKzh26F5NwIgWgjIN9bimPtBkwMx4yPFELwePQnIDaGJbLy9WsdKMaZ 0WW8PcdyjWqvJVp0Priqewa7efK7Wa2k/dooGnUyaHGtU9EcRDnEjE9y88JbGXm/OnNw rbaKcpnmniamJaKpKv7P47i8+02PuR3pi1M9pNN5Kh/O9jHa3ZalDjhLy33g9nc9tvsE IhRsL/Ti8rzG6QzA6MS/Mf4fqX9tpy5bcn3lkbZ1qN36HSiO0ac8Cx2CjxLi39Gorb/B +YVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=dD5ADPdM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sa16si14638234ejb.356.2019.10.15.22.17.20; Tue, 15 Oct 2019 22:17:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=dD5ADPdM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728117AbfJPFRI (ORCPT + 26 others); Wed, 16 Oct 2019 01:17:08 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:16529 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726423AbfJPFRI (ORCPT ); Wed, 16 Oct 2019 01:17:08 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id x9G5FoQ3015921; Wed, 16 Oct 2019 14:15:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x9G5FoQ3015921 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1571202951; bh=7esRt800qRlkwyQ3paFYTyNUrseNp3QJ3LafPyce9PM=; h=From:To:Cc:Subject:Date:From; b=dD5ADPdMZFPpOjl0GTtVKjMRhAvvnHLxO0n78B3/rdszRxgz6FtAf+zFVVCM63bg3 dEZwXv04YqdVFw7xkAzoyomMUwHwOcVo0I8imT8ZVEtsUsCMekaS23SVaIC8aY+L+n 25LugesoShcNpDNyw525EwYAJ5OsE9LagO5oxzGxXXXqqWShkLa6KSdrhBuDgHgV6y fipLPoAOxmNPwBzjRZidnWVlThfWG2xyqtZFdS/H9+XliqV9LUGntIqWeQ5Fq01exI QPl9sK90ctqR5VxS1+qc35mzhkp3nxa7iw63wDGm1SOk5E+K99oiV35As3PDKVt+GA cXX0MsSPmzmFQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Julia Lawall , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] kbuild: reduce KBUILD_SINGLE_TARGETS as descending into subdirectories Date: Wed, 16 Oct 2019 14:15:46 +0900 Message-Id: <20191016051547.11399-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org KBUILD_SINGLE_TARGETS does not need to contain all the targets. Change it to keep track the targets only from the current directory and its subdirectories. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index a9e47953ca53..dcbb0124dac4 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -469,15 +469,15 @@ targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \ ifdef single-build +KBUILD_SINGLE_TARGETS := $(filter $(obj)/%, $(KBUILD_SINGLE_TARGETS)) + curdir-single := $(sort $(foreach x, $(KBUILD_SINGLE_TARGETS), \ $(if $(filter $(x) $(basename $(x)).o, $(targets)), $(x)))) # Handle single targets without any rule: show "Nothing to be done for ..." or # "No rule to make target ..." depending on whether the target exists. unknown-single := $(filter-out $(addsuffix /%, $(subdir-ym)), \ - $(filter $(obj)/%, \ - $(filter-out $(curdir-single), \ - $(KBUILD_SINGLE_TARGETS)))) + $(filter-out $(curdir-single), $(KBUILD_SINGLE_TARGETS))) __build: $(curdir-single) $(subdir-ym) ifneq ($(unknown-single),) From patchwork Wed Oct 16 05:15:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 176420 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6868026ill; Tue, 15 Oct 2019 22:17:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+NfJxCRGUHUun4q23z+LgqVosiBEKvnwAzi3ZYFB9vf7dV+tJvidy8z2SGUb4PHMJ0CZA X-Received: by 2002:a17:906:35d6:: with SMTP id p22mr37852593ejb.274.1571203033389; Tue, 15 Oct 2019 22:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571203033; cv=none; d=google.com; s=arc-20160816; b=IG0xQ8HaFApxxzYnsghHO42GkE4N3lIeb4dQ25j+imSOZupc38wnLZEQXtWK3wqr41 ngi/aNzL/uDd6/3awdfJOrflKg/7snzqkKk4jAxXzlJ+Dv38N9208E0mXmw3EjwVUmgo Ana8avQ5rivKlIvtrEltEY67MyupeggtWs6GYiR8oDezYtSyb6eB1PZUlG7YK2wPycIh nVVtJ6Pqq5mdilvMoSELrLa+98/JmbTJ8XLCICg4qldgHpvHOoJFISqG+/ZvywspSibE wh7XDHS9Vf6dVKSmUay40Skjl5OxJVUXG3S39reY82cJIfVUirL7gL5IvCFJc12vnvJy 2KsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=QtgpQ/my2rTeLEaCijY9xyHVCu56r8/Xe5J3OP0ouag=; b=picNf1AxxevuNEyY2U0ycJl2kjNNE/rQkGrQr2oCMpSG8lUoSyidvb4GQ5O1lF/dAn ezBn77EbN+ZXErR/MDGU6EDbp96xz1aYL/Mme/VC+vIN98pl7i0CEv9cL3sqD6+0oJ5h HVSbiARpHy6NPjbHIcuD3nHrfEbzeoN+sn0oUYCYViYj7W1zU2GLxXx9zKeL4CNzLEr3 HeA1wCq6zcgEUp8jHqCjPLqndamEvREoItUF5UpgHkY9zWKz6rDEFl6BPSN3oKbaqgZw VfhhErB8b3ndwFf1wfPJjuHIIcqUptMrMPJMPKaUz0iNdlzxZwLSukJqbVEoqttRi36y xNzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=JN8HLDv6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si14632036eje.338.2019.10.15.22.17.13; Tue, 15 Oct 2019 22:17:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=JN8HLDv6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729763AbfJPFRI (ORCPT + 26 others); Wed, 16 Oct 2019 01:17:08 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:16530 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726648AbfJPFRI (ORCPT ); Wed, 16 Oct 2019 01:17:08 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id x9G5FoQ4015921; Wed, 16 Oct 2019 14:15:51 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x9G5FoQ4015921 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1571202952; bh=QtgpQ/my2rTeLEaCijY9xyHVCu56r8/Xe5J3OP0ouag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JN8HLDv6MMIPtYbJAW3nPi19uX8f0i4WrIiXmjuNROywzjsZkPG82oWq5MjXyzscO 3tMNft3xUxDy4AI8xybNsSSR8fSYhaJdh0nEEE78PbnhucETCLe5+CLeCrWh116/h4 QFgEc8JflOgn3ouaBEMWHcyGTDYZRrSybiQkSDavavyw5TojECZ3FSGVra8p+Y2J7w burxT3QWsh8axh8KZIb6bPRWC9HSuquNGc4WYUUlYyKThrBHJfzAfPnFZkWu6bbEXd PoiK8PX9w/cDMaT6b5Q4Mu7Hu+/5yxIb60+bn4XykG3+PmRc2P4nEO0kewA41hVqU8 WQNxNgd7x/CHw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Julia Lawall , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] kbuild: make target builds much faster Date: Wed, 16 Oct 2019 14:15:47 +0900 Message-Id: <20191016051547.11399-2-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191016051547.11399-1-yamada.masahiro@socionext.com> References: <20191016051547.11399-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 394053f4a4b3 ("kbuild: make single targets work more correctly"), building single targets is really slow. Speed it up by not descending into unrelated directories. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index dcbb0124dac4..7eabbb66a65c 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -479,7 +479,10 @@ curdir-single := $(sort $(foreach x, $(KBUILD_SINGLE_TARGETS), \ unknown-single := $(filter-out $(addsuffix /%, $(subdir-ym)), \ $(filter-out $(curdir-single), $(KBUILD_SINGLE_TARGETS))) -__build: $(curdir-single) $(subdir-ym) +single-subdirs := $(foreach d, $(subdir-ym), \ + $(if $(filter $(d)/%, $(KBUILD_SINGLE_TARGETS)), $(d))) + +__build: $(curdir-single) $(single-subdirs) ifneq ($(unknown-single),) $(Q)$(MAKE) -f /dev/null $(unknown-single) endif