From patchwork Fri Apr 29 06:50:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 53334 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A5F8D3857404 for ; Fri, 29 Apr 2022 06:51:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A5F8D3857404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1651215106; bh=/Vnv1fsUlZxfL+paTc6ZKXVLLP5BHsnQ0xzQ2A3nzSI=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=UHm7Jz2GyBPeocJUWVLsfQ//UkeponG8AR831A962R2cBSILy/TKll7Tkt1jTJmFb zdJqeS0hREVqrgBwSnUPkJXtB9r8y4NbGWopyjAVju2TMnURL8tkVU6qCvKPKc/ixT T2G36yQ3x7J9dO8/C4TX2UMo1qMn3x1b+RH9F0Xk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org 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) 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 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-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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