From patchwork Wed Dec 28 00:36:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ahelenia_Ziemia=C5=84ska?= X-Patchwork-Id: 37053 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1651092wrt; Tue, 27 Dec 2022 16:42:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXsh5GA9DvnIJxV8ZZDR0UeTXgDhypM9yqvfjO7/rtxhDaEmvwItU6HR7yBz7mAPXoOEG9Hp X-Received: by 2002:a62:198a:0:b0:577:d10d:6eab with SMTP id 132-20020a62198a000000b00577d10d6eabmr24448794pfz.21.1672188158982; Tue, 27 Dec 2022 16:42:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672188158; cv=none; d=google.com; s=arc-20160816; b=Be/p8kGzgH2uQzNLkNt7Yc1Ji0IrX/KHrtet1wR3PraeOFOAQMF5mhY+M0kYna+ul6 bnGQxDcceq8E5TfLtESGSuUUDnfd4eJqMHPualD1tre5WzptAHud8KjCSvNIRXPGqQWV 1pW96oYUANl52Av/apuKrtYhTL3Sfi2DCaafy+UO7VivRYQ1OqEcYr/qg3WAtF9l5Se1 j3+e+RIk8qpk5WnHNToGmb50mWXsJ20S5QHUbNNuzUozNlmIcJV8yxQgKKFwzEmy/N4y i7Y4V06kuY1yi1opNDahyMv4J8Ym9UzImEsLC1ObZtza9u4Izoc2jXMGCm+hdJpXfzPO TcbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:from:date :dkim-signature; bh=5Nyu5a8aD0exGXIEq9DfNxLT0kk4u4U0mdegstypVdM=; b=BrP1Qukb2eh+IwxChcKW83vZ6TVZ1IziSY6wCjoLxxSCD+x78H6/7RKtiLvzXrip1l FEdFGpXFAysJFo+9NdrbvuMnL1353VxR8fTyAel/YcPWp8EqInNXGH4ACMw6GOZcICs+ IoHcjxAxzVbw4nJdq+xXh9ooPI2Dgqhm0v16v+zExOHbQsrqeVA02DHzyp/UJNdg0vdm lmolSnIuFqmzHXlajCuCUqOYPF4yxubiIYtXNiWy96I+96QG0GEnOHxJXTne4HIH9nNf NJalyJs426qCaATI6gSPQSlQ27b9zwAnYo3KbO+CTMD6ZeeFlxXE5RCOBAVhUvcdGZax rsfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202211 header.b=fuPuYWcB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c20-20020a624e14000000b005818164ef32si1590786pfb.291.2022.12.27.16.42.26; Tue, 27 Dec 2022 16:42:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202211 header.b=fuPuYWcB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229939AbiL1AgR (ORCPT + 99 others); Tue, 27 Dec 2022 19:36:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229918AbiL1AgN (ORCPT ); Tue, 27 Dec 2022 19:36:13 -0500 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D1170C2A; Tue, 27 Dec 2022 16:36:12 -0800 (PST) Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 04443DB8; Wed, 28 Dec 2022 01:36:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202211; t=1672187772; bh=/RGVuKr5/3fCEx87FQ8Nip6ERreIb5DBGC2EyffIs24=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=fuPuYWcBEuWZDrHK7r+tlFxnVEDjRSfUxg5F1XbZUdKjSLnkAUn2hZH2WRFYRtVr8 7wbGB7GKMQYpblP0yaD0DtfNvlvENzCWXcxQglQf288+wAbkC8nEH0BT4UmkQhCQnP vQ0spz/+EKLikRfa3lbF2LnzbCnoXuP+26d1jR4upnQOKZ/qSSyJpaZBkUyTlIw7As HhCx1oru5tKwvwf3knElh+jyjJH3ijWm8lONORICVA+3YDTNVUNYqM+8mMTZrueFEZ DZr/3V7lh66OSxXg0jtO1rBxeHh8ooZHLMAt8CWOKf+0eG73JtCyofQ4vMrHiF28GF jZSohr6L3xI+g== Date: Wed, 28 Dec 2022 01:36:10 +0100 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 2/2] perf python: don't run the linker for clang feature tests Message-ID: <7d943ff294fbc606880a824b9764704f803f8beb.1672187710.git.nabijaczleweli@nabijaczleweli.xyz> References: <44bb9a29bd7a0385c25ebfd69abd0a41ac2d753b.1672187710.git.nabijaczleweli@nabijaczleweli.xyz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <44bb9a29bd7a0385c25ebfd69abd0a41ac2d753b.1672187710.git.nabijaczleweli@nabijaczleweli.xyz> User-Agent: NeoMutt/20220429 X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, MISSING_HEADERS,PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_HELO_PASS, SPF_PASS,T_PDS_OTHER_BAD_TLD autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753416370897010813?= X-GMAIL-MSGID: =?utf-8?q?1753416370897010813?= This, for me, slightly-more-than-halves the time it takes to run for a in "-mcet" "-fcf-protection" "-fstack-clash-protection" \ "-fstack-protector-strong" "-fno-semantic-interposition" \ "-ffat-lto-objects"; do cc "$a" ../build/feature/test-hello.c -o /dev/null; done from just over 600ms. Signed-off-by: Ahelenia ZiemiaƄska --- tools/perf/util/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py index 58239e1cdb2a..400c99cd7734 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py @@ -16,7 +16,7 @@ cc_is_clang = b"clang version" in Popen([cc, "-v"], stderr=PIPE).stderr.readline src_feature_tests = getenv('srctree') + '/tools/build/feature' def clang_has_option(option): - cc_output = Popen([cc, cc_options + option + "-o /dev/null", path.join(src_feature_tests, "test-hello.c") ], stderr=PIPE).stderr.readlines() + cc_output = Popen([cc, cc_options + option + "-c -o /dev/null", path.join(src_feature_tests, "test-hello.c") ], stderr=PIPE).stderr.readlines() return [o for o in cc_output if ((b"unknown argument" in o) or (b"is not supported" in o))] == [ ] if cc_is_clang: