From patchwork Wed Dec 28 01:57:47 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: 37087 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1674650wrt; Tue, 27 Dec 2022 18:01:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXswbeuPqeFApVkFIXP1hNV3GvXVQfJvW5v70bQcuBCWHmRDm+P2sS+ymQEmdqJH0giX0oBI X-Received: by 2002:a05:6a21:78a0:b0:a3:960e:7d0a with SMTP id bf32-20020a056a2178a000b000a3960e7d0amr37324675pzc.58.1672192869837; Tue, 27 Dec 2022 18:01:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672192869; cv=none; d=google.com; s=arc-20160816; b=bXcKZ/ZR7C9M4Z3Jv3jIE07wYlQiq8J7WXLgXycr2NmjkVYh1BDi8f1JtrAWU6kv7M E+wQLhlNUO8oTc3yTcF0gwOEyQ2b6sjopZ6xg/UJcL6FukNRHrRxmXFbIMd2qBLUVEqZ xzH18SEnvs76ZRdOyvqL2n8gchZuwXJCVxFtf0LrNfnISBGTri+kGqKEGt6DkSSrnb3z F55e3Gv0b1hiXtC7b9+Q9ig/xFaIWoP9css4H2SFbbFwgozwR0Ql7sVX3Thlr+VkwxzR KN4tUkxvcmfz9++49lUxpbe3Dplegl51NmQCiHmeVUMCggxNbVOKodGZYSZZKfio1Yih xMCA== 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=o4jIGtLja4Hj5GRjeark9HSlYauGwO868x9Vz1r98v8=; b=G5tm8GYmmN4wy/J8QZxYvrqCZUcRIC2i0qa9Zz4GrQGl1ocGbjJHNocxUfV3tUeGnC cddFRKpRO04G1wC9ufFYlJBvLN7+1qek+IEVXn+0okMWBGzO0KHEI+VFTwwBFsKVnaxD nhpIC78DuLklbdv3cUcQkeCfHmytPEcMBXMCdp26/LPCHVl5/zeGQnSJpVVmK2HAfqSn fJUl7zpSv2RyX7NNXuAOW9zHl768ITKAed5kPF6giSCNj8ifc1cBu62ee/Rnos9nnCLW LV+u6EDFjy5o2510cxpC/u66kdE6i1X4UgR1ZY7Da3CAzGrec2nAVRCU0+yoTz3lgqZT Plag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202211 header.b=WJ8W7cOk; 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 j11-20020a63e74b000000b004774e9ef1casi14983916pgk.728.2022.12.27.18.00.57; Tue, 27 Dec 2022 18:01:09 -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=WJ8W7cOk; 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 S232560AbiL1B6Y (ORCPT + 99 others); Tue, 27 Dec 2022 20:58:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbiL1B5t (ORCPT ); Tue, 27 Dec 2022 20:57:49 -0500 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1C3F9292; Tue, 27 Dec 2022 17:57:49 -0800 (PST) Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 67C94120C; Wed, 28 Dec 2022 02:57:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202211; t=1672192668; bh=Xb7nUn6EDqGGST4kb/TTOlSVXa+n18Xx10sbI7pkaC4=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=WJ8W7cOkD3Lw2VBRVTJz9C7TXysy97mFkEQj8xQEkMWm/X/k6T2VOYZ+qILeedJT0 HoAnOmyrwPpQLRXtCkU9ZqfdDBokmuVUzyo4FEoi3Fj5zqoNBuBsMnQKnE8xxTXcLU tnmHCeC3VWhFPkfu/zA+0JBd8OU7lnjAwSoy9fnoDqmeWE3fTm9tcg9kzihmc2m+bp /E8yxp2+08AuudJc84X4xan5COazxmYRzRhyax6dQnu12gjOHRGR+EYL7eU7D03sje 3WtxhyNwnnvspISDmbEd/amakF6T5dG/wZblaaJYW+OdLWdqIydQwODUxS8zUtW9pa eE7aMnBJ8yFqQ== Date: Wed, 28 Dec 2022 02:57:47 +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 v2 3/4] perf python: don't run the linker for clang feature tests Message-ID: <6dd7e9dd522c7c6014f8273affa7a558918b048b.1672192591.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?1753421310654574995?= 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 sh -c '$CC "$@"' '' "$a" -o /dev/null ../build/feature/test-hello.c; 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 ba0b1e078855..0a557f2bf357 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py @@ -6,7 +6,7 @@ cc_is_clang = b"clang version" in Popen(["/bin/sh", "-c", "$CC -v"], stderr=PIPE src_feature_tests = getenv('srctree') + '/tools/build/feature' def clang_has_option(option): - cc_output = Popen(["/bin/sh", "-c", '$CC "$@"', "", option, "-o", "/dev/null", path.join(src_feature_tests, "test-hello.c")], stderr=PIPE).stderr.readlines() + cc_output = Popen(["/bin/sh", "-c", '$CC "$@"', "", 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: