Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2238996pxb; Wed, 30 Mar 2022 20:21:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfUyoIsBlCTjI0plZIpLn4wBaJGkBK2LcCv+MI5M6FNRt40oUKc7pXDLWxNQD8RU7Zalo8 X-Received: by 2002:a63:924e:0:b0:382:4fa8:e36d with SMTP id s14-20020a63924e000000b003824fa8e36dmr8843433pgn.426.1648696870511; Wed, 30 Mar 2022 20:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648696870; cv=none; d=google.com; s=arc-20160816; b=dE8g+B/ktXW52sq71Qacesr118z0ElSfQM3YGcFSPj9G1FV1XtISop5JXEg05FBNZq baNq87m0Lw44YqKNhHNHl33gYrp6bxn2K44Efd2bEWW+2FiH8UskE/Q8xUb9tAwHJnr2 RUG7oAc+SFGuLeZrCbXBbHpzCHQpRl5YbfA6ukJMhOVajstynETNQkQ+gG0+Odm4Uhkt usg4BdbTWqbKNU+BH1qO0h+cTO/ecQBuxrrboIGl+W2bVz7sKlbgtuO69PI1TO4BnuVT YZLT1YCgLk9mYPOAImfk55aJ7cBy54TgFhY93hezxNa6la8hw6a1WV6qFMTJ4GRjz1ra EIOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WSQ0C2o24474KuOwr2eoSq1HKO0Q9H+0To6taC1a4t8=; b=tH7FzxCHGn1YLrfDsLEhkh3HLn1sQwj4C4TToN0wk1lSCNVeO0t/dmGxbw0ZfK6xVR hc7hx/6sI5mPuuile3HhlV09PYVRtxapXBYbKghAlSO0jC51/xMFooAre+hKXCiQ43Pq zf0zkgYfhZHgHWE5Y8ODbqiaEHeQNIgWhOXJtD5MbyNd2kolctjr/Sxqjv4qejqbh7wh bA9vrOcUIutdWs3eKilHQJegrqEGmiuEorran4V8QSNjoMQDawDzUGf8oT06m+N4LJrs jrOkr+l3er3ENTbJ1N48pW7gR6jg995SONl5xGiPRV8dC/MFhm4P+UDIPE2LNcssf6yA IYoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tfhw5qrk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z34-20020a631922000000b00398b6ba3101si2146450pgl.51.2022.03.30.20.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:21:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tfhw5qrk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D7D5F10E051; Wed, 30 Mar 2022 19:52:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346657AbiC3OOs (ORCPT + 99 others); Wed, 30 Mar 2022 10:14:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229816AbiC3OOp (ORCPT ); Wed, 30 Mar 2022 10:14:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A09C1ED043; Wed, 30 Mar 2022 07:13:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B22FD61465; Wed, 30 Mar 2022 14:12:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6B31C340EE; Wed, 30 Mar 2022 14:12:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648649579; bh=mzLs9jvJsYDXFkErQ/Szj/95kw/X1ivN1V9RDk1cSt4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tfhw5qrkOTUc4XxiU8xrpRa74xdxucu3PckINi7hYBOXcRvkgksR1gJTPp358C7l/ gjyIaVrdL+HCsYmGQ6yClO2CZW6K1wOwbf1B2uR+KU4Ka6jk/W+W/cbeBWCDAyFxeY zaTQe3AWvKPDHYojrJinnCyqStu8DCbt9cU64jduJoEk0oooNQcgCWI4CXlGRGUqpF 0ywiHYibYu87zrt3H8xIZHT1KNzPSuFp+pR4zhvVshnxBjBGuXkvx/hNm0tTxwoOiW ZRZYDLicZIofvJQUcYmn4vkitkZ4VEtKrqwwdj+Ok5Hmqnm2YikdBffNTxPvfN9zDZ 7b4q0gaZUOwQQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id F02CD40407; Wed, 30 Mar 2022 11:12:54 -0300 (-03) Date: Wed, 30 Mar 2022 11:12:54 -0300 From: Arnaldo Carvalho de Melo To: Matthieu Baerts Cc: John Garry , peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, irogers@google.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf tools: Stop depending on .git files for building PERF-VERSION-FILE Message-ID: References: <1648635774-14581-1-git-send-email-john.garry@huawei.com> <3a72702f-6cf9-2b6e-0f9c-bf6857ab7ed2@tessares.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a72702f-6cf9-2b6e-0f9c-bf6857ab7ed2@tessares.net> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Mar 30, 2022 at 03:22:37PM +0200, Matthieu Baerts escreveu: > Hi John, > > On 30/03/2022 12:22, John Garry wrote: > > This essentially reverts commit c72e3f04b45fb2e50cdd81a50c3778c6a57251d8 > > and commit 4e666cdb06eede2069a7b1a96a1359d1c441a3eb. > > > > In commit c72e3f04b45f ("tools/perf/build: Speed up git-version test on > > re-make"), a makefile dependency on .git/HEAD was added. The background is > > that running PERF-VERSION-FILE is relatively slow, and commands like > > "git describe" are particularly slow. > > > > In commit 4e666cdb06ee ("perf tools: Fix dependency for version file > > creation"), an additional dependency on .git/ORIG_HEAD was added, as > > .git/HEAD may not change for "git reset --hard HEAD^" command. However, > > depending on whether we're on a branch or not, a "git cherry-pick" may > > not lead to the version being updated. > > > > As discussed with the git community in [0], using git internal files for > > dependencies is not reliable. Commit 4e666cdb06ee also breaks some build > > scenarios [1]. > > > > As mentioned, c72e3f04b45f was added to speed up the build. However in > > commit 7572733b8499 ("perf tools: Fix version kernel tag") we removed the > > call to "git describe", so just revert Makefile.perf back to same as pre > > c72e3f04b45f and the build should not be so slow, as below: > > > > Pre 7572733b8499: > > $> time util/PERF-VERSION-GEN > > PERF_VERSION = 5.17.rc8.g4e666cdb06ee > > > > real 0m0.110s > > user 0m0.091s > > sys 0m0.019s > > > > Post 7572733b8499: > > $> time util/PERF-VERSION-GEN > > PERF_VERSION = 5.17.rc8.g7572733b8499 > > > > real 0m0.039s > > user 0m0.036s > > sys 0m0.007s > > > > [0] https://lore.kernel.org/git/87wngkpddp.fsf@igel.home/T/#m4a4dd6de52fdbe21179306cd57b3761eb07f45f8 > > [1] https://lore.kernel.org/linux-perf-users/20220329093120.4173283-1-matthieu.baerts@tessares.net/T/#u > > > > Fixes: 4e666cdb06ee ("perf tools: Fix dependency for version file creation") > > Reported-by: Matthieu Baerts > > Signed-off-by: John Garry > > Thank you for your patch, I just tested it and it also fixes the issue I > reported! I'm taking this as a: Tested-by: Matthieu Baerts Ok? - Arnaldo