From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dog.elm.relay.mailchannels.net (dog.elm.relay.mailchannels.net [23.83.212.48]) by sourceware.org (Postfix) with ESMTPS id CFB413858D28 for ; Fri, 29 Apr 2022 06:50:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CFB413858D28 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A48D6121DBA for ; Fri, 29 Apr 2022 06:50:42 +0000 (UTC) Received: from pdx1-sub0-mail-a306.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 469BD121D01 for ; Fri, 29 Apr 2022 06:50:42 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1651215042; a=rsa-sha256; cv=none; b=wxzgCvUSkCEH1VKNatlBSIDosfdvmFOxHetHO/dpZ8senlNcRlHQi7NWEhvssrz0jKAZZB aCyAy58OmY0cdQEPQiHdgyC5nACaDULNvpecziivvDU+iZEstjPOFaTSTwp2qQetqWDhSs Cj7Y2A4ikYMoWehd8nslcOy4cmHDNWti/iJm5hGoKL6ZwodMFmKQT6RhKLZUIBnupLVdzv azUt/OrQzxcwJ3DvvU9hGb6DsAXlfFJ3UpZDkRBDUzGlEguA0/8I2bXizgMsqNOQTwFsuf YG7XqfGRysShd9k0TqlXVJ4BbbOum5S4+l5TV9NzxMm9wnNXdAlDuqG31s1wdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1651215042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/Vnv1fsUlZxfL+paTc6ZKXVLLP5BHsnQ0xzQ2A3nzSI=; b=N2tnpM20jpyue6KraCt1Nn2pd5VW0oMCdiYhgcaOQFBcMSsePJM/ZcfDak5J387Zril4mS gaslb3yt5GIS/R9Lp9zp1NIZhPQA97O9H8GRJGRRYhAoYV/9Gcu9AX8BDb73TBYw6Mi7Rs RdUi18kNC6d5T6aM8c09yNyvhWbWaDoz6P37mSPVDDdV14eR+l6K1RwOO7iCoKhdcPcQvQ SLDOMj5UeN+NW7iztox7oKEONR5TwA1bslybvcMit61qoE5I+QpvO+vnJ6U6eptcAsVVYL lKIsTqzWK9q882g9Ju7ENM9SHuMnQ9NlaGis+agfVbpTdlEMQRmb4/e4wo8WIg== ARC-Authentication-Results: i=1; rspamd-fdd564cbf-77fsh; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@sourceware.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a306.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.124.238.121 (trex/6.7.1); Fri, 29 Apr 2022 06:50:42 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Arch-Illegal: 07424a293741d59c_1651215042505_1222670585 X-MC-Loop-Signature: 1651215042505:1086469364 X-MC-Ingress-Time: 1651215042505 Received: from rhbox.redhat.com (unknown [1.186.123.234]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a306.dreamhost.com (Postfix) with ESMTPSA id 4KqNRN6hrnzLF for ; Thu, 28 Apr 2022 23:50:40 -0700 (PDT) From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [committed 1/2] benchtests: Add UNSUPPORTED benchmark status Date: Fri, 29 Apr 2022 12:20:27 +0530 Message-Id: <20220429065028.2868756-2-siddhesh@sourceware.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429065028.2868756-1-siddhesh@sourceware.org> References: <20220429065028.2868756-1-siddhesh@sourceware.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3495.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_SBL, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2022 06:50:45 -0000 The libmvec benchmarks print a message indicating that a certain CPU feature is unsupported and exit prematurelyi, which breaks the JSON in bench.out. Handle this more elegantly in the bench makefile target by adding support for an UNSUPPORTED exit status (77) so that bench.out continues to have output for valid tests. Signed-off-by: Siddhesh Poyarekar --- benchtests/Makefile | 23 ++++++++++++++++----- sysdeps/x86_64/fpu/bench-libmvec-skeleton.c | 12 +++++------ 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/benchtests/Makefile b/benchtests/Makefile index b477042e6c..7943d1c58a 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -1,4 +1,5 @@ # Copyright (C) 2013-2022 Free Software Foundation, Inc. +# Copyright The GNU Toolchain Authors. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -417,11 +418,23 @@ bench-func: $(binaries-bench) echo "{\"timing_type\": \"$${timing_type}\","; \ echo " \"functions\": {"; \ for run in $^; do \ - if ! [ "x$${run}" = "x$<" ]; then \ - echo ","; \ - fi; \ - echo "Running $${run}" >&2; \ - $(run-bench) $(DETAILED_OPT); \ + op=$$($(run-bench) $(DETAILED_OPT)); \ + ret=$$?; \ + case "$${ret}" in \ + 77) \ + echo "UNSUPPORTED $${run}: $${op}" >&2; \ + ;; \ + 0) \ + echo "Running $${run}" >&2; \ + if [ "$${run}" != "$<" ]; then \ + echo ","; \ + fi; \ + echo "$${op}"; \ + ;; \ + *) \ + echo "FAILED $${run}" >&2; \ + ;; \ + esac; \ done; \ echo; \ echo " }"; \ diff --git a/sysdeps/x86_64/fpu/bench-libmvec-skeleton.c b/sysdeps/x86_64/fpu/bench-libmvec-skeleton.c index 8954abe8b8..e28249df91 100644 --- a/sysdeps/x86_64/fpu/bench-libmvec-skeleton.c +++ b/sysdeps/x86_64/fpu/bench-libmvec-skeleton.c @@ -40,20 +40,20 @@ main (int argc, char **argv) #if defined REQUIRE_AVX if (!CPU_FEATURE_ACTIVE (AVX)) { - printf ("AVX not supported.\n"); - return 0; + printf ("AVX not supported."); + return 77; } #elif defined REQUIRE_AVX2 if (!CPU_FEATURE_ACTIVE (AVX2)) { - printf ("AVX2 not supported.\n"); - return 0; + printf ("AVX2 not supported."); + return 77; } #elif defined REQUIRE_AVX512F if (!CPU_FEATURE_ACTIVE (AVX512F)) { - printf ("AVX512F not supported.\n"); - return 0; + printf ("AVX512F not supported."); + return 77; } #endif -- 2.35.1