From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2047.outbound.protection.outlook.com [40.107.21.47]) by sourceware.org (Postfix) with ESMTPS id 323CE3858CD1 for ; Mon, 18 Mar 2024 15:03:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 323CE3858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 323CE3858CD1 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.21.47 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1710774248; cv=pass; b=BTdFfEEb8WQH9QeEpr+RE5AME2dlGyp1NBeW0wJWve0vwVDwWy1ictPs6E/E/CmgmcTj8Sq1IpU/V2MNBOqeaCogOMtvuzcom41dmaJo8MXxUwsKeKw6kzbsoq8mTvGIiJPkqNqFJM4cve7rZDb3EYNR2mnHfhi+miOapep5B9M= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1710774248; c=relaxed/simple; bh=3rqZIOqaArLyp9X0IhD/wkJpAAD4DQI1Py6/64LR3Uc=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=SE6hr2NidGMX+O/X9KEDtla178TnaxWvs87piadniij2L7dddu5RmHormffKPKfGj8w6SGYJoAVyMB7cVzwmE5/WqR125AvyS2c+2N/e8vgaNVA/7g+L+VPCwIghzMR+O21+Bxuw/Nn415OYN9NV5dw6BHSUsQl0XEE7NPMxCMo= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=VXnEz5hk7HjkT39h2c+iMrBLXpcv9QDvIDMqfTaG3kf3s8IRzd6SYdVuQvu63xvnab1FSRgRXy9YCMFHiBuT3RainanDeuXdprFPMwENNiVbbGbk7BI6b1qYh7oQHsffmlHEn6/4cY51oB8AG76KmtAbjS2Dn9qDKCMluTXCTpCzNDLyucdKFgbMTPCv5/AMQ5/B72nFeKNdGe5H3NM6jbVHjnTZOHRN6FJEAuYImxW8mjbii4f7L0D2eJJMHM3tvKdY4TlwuZl9r9VcROxb/6H8X3Pg1KE/xNTeukoaQciI/OH94IeJ6mPDdA9jKUSZTzXZCKUii2y6Aaopf7cuSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AS1KiYJp5ohUww+azgP8/v6LrKNbyo9usZ8rJHfCwVc=; b=ePVSPtjZdohAEFFQFJtgcr0vX9Da1DUsOtv4rTgzwglinUFmiop3C9RlVvlKqCdmYrV+Joprpwq9pcuaikNn6Z4A42DWqL7y2qzp47HLora6E4pgxh4g8HFfhy9xb8AxZkYQmj5veqLEnHzYOxQaCITJijCrXKDBorJ0WWRfriGbH258RrjnbIhRaQ8N0NlJG+JDXjSM8LygT0dDpoWncgbiQNko5owQpc24ywZWe13dOvy/ZlcvAZc/P0GqTiGmIs/Kmf5WhtbE8z098GuOo6d1JW1vZ9rtGtB85f53wBw22eodzwIaHF65fVRLQjtzNgHQ4rUTpq/5N5uRRdjF2Q== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AS1KiYJp5ohUww+azgP8/v6LrKNbyo9usZ8rJHfCwVc=; b=ftLIP2ZLagmnSsN8ZgMdFYf6jbheauPnR9wZ+kXdSwsA35D5oA25MRcQ0+GbNKnP4GBsY6HoTDJfBVxV+76jQL6DTAh1Y7PEH8uYVtgXfy0fOYI/8syTdKD73DjZMe57L0mI/mspP+8KYgVODzb/OsX1pzdR7mLSdPIdcxbihBo= Received: from DU7PR01CA0048.eurprd01.prod.exchangelabs.com (2603:10a6:10:50e::17) by DU5PR08MB10802.eurprd08.prod.outlook.com (2603:10a6:10:526::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.26; Mon, 18 Mar 2024 15:03:51 +0000 Received: from DU2PEPF00028D0A.eurprd03.prod.outlook.com (2603:10a6:10:50e:cafe::b6) by DU7PR01CA0048.outlook.office365.com (2603:10a6:10:50e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27 via Frontend Transport; Mon, 18 Mar 2024 15:03:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DU2PEPF00028D0A.mail.protection.outlook.com (10.167.242.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Mon, 18 Mar 2024 15:03:50 +0000 Received: ("Tessian outbound 9d16f63426bd:v300"); Mon, 18 Mar 2024 15:03:49 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2b6df60f72ce467d X-CR-MTA-TID: 64aa7808 Received: from 956e73676867.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9481C9AA-A3E2-4635-A0CD-DB1C65DCC270.1; Mon, 18 Mar 2024 15:03:44 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 956e73676867.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 18 Mar 2024 15:03:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AxMWKXujfJLlIZctf2setrRIpuNCp36Yjwunu46VyrsCFqWKEXA8ZGxm0w7s9pyhdr23M6E3mKcH/l1WwqbDMbQjw+V2S88X9qILUUKNIjnMoZEkcO+qPlr0k5vQ7wSZgdDpZ92dP7fx+hQqynbX+ByJGWnYBsPdlOECshYlXmtC0zMF+a1DA8pjGgDw8gJBMnHCFThsLuvyYCQMe3+pOyLfKyeoQGXZ0C9Y+FmXeVlr7EJYGTwVT+3cmFPCc78q/MgSTaomBTKK6VGF3RoigP1klMkY4tr9j/APXt2qgqUUIzFJ3BuzVuAxro+GhXcg+JBbyJN4iWfjU9o4b88rAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AS1KiYJp5ohUww+azgP8/v6LrKNbyo9usZ8rJHfCwVc=; b=AtByyAV5LVmaCV62zEkuuNUWMa0E+cGBSO5m/7prDFG2vnvte4XxjvWIzFMkKnU4X9RfHAqQ3MbxYEzB7CEmMeN76VXEmTNSVdGDg4HJEr7gF4C0Ln7xrpZruCmxr3DwC8ilu/XNvK4dORjC+5s7VsvkxSx29DDkv7c/JeBRq6yy3jgk/+K0R8nj0a495IgQCdSZCeIIwOWreefLFcxsmrogRP/QlsOgriIbR/xQhxEuKxOf1CTndotqbOeIjNtimlKdBX9zHHhsh+8q7tBzYTfzO57Ra74Pbowhh+RRt7hsEH7EiguGf92njiC+umezAejPpEyPzJQpcRf8keSGWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AS1KiYJp5ohUww+azgP8/v6LrKNbyo9usZ8rJHfCwVc=; b=ftLIP2ZLagmnSsN8ZgMdFYf6jbheauPnR9wZ+kXdSwsA35D5oA25MRcQ0+GbNKnP4GBsY6HoTDJfBVxV+76jQL6DTAh1Y7PEH8uYVtgXfy0fOYI/8syTdKD73DjZMe57L0mI/mspP+8KYgVODzb/OsX1pzdR7mLSdPIdcxbihBo= Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by PAWPR08MB8934.eurprd08.prod.outlook.com (2603:10a6:102:33e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.26; Mon, 18 Mar 2024 15:03:42 +0000 Received: from PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::8b1b:5f28:5006:ac18]) by PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::8b1b:5f28:5006:ac18%4]) with mapi id 15.20.7386.023; Mon, 18 Mar 2024 15:03:42 +0000 From: Wilco Dijkstra To: 'GNU C Library' Subject: [PATCH] Benchtests: Remove broken walk benchmarks Thread-Topic: [PATCH] Benchtests: Remove broken walk benchmarks Thread-Index: AQHaeUVZdgN1vhkzaUmOomUizrMEqw== Date: Mon, 18 Mar 2024 15:03:42 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: PAWPR08MB8982:EE_|PAWPR08MB8934:EE_|DU2PEPF00028D0A:EE_|DU5PR08MB10802:EE_ X-MS-Office365-Filtering-Correlation-Id: cefd5880-6ad4-4fb2-73b4-08dc475c9e6b x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: OqrLPfQL9Dke34CBmMSCNzArU41YrpjvIK/ZowXbp0zWYnyvb3byCnVZ7XO3dc7UAaMtiLqQgkLavVsEjGGAjc6OMOKUzUOhD9qpf/fnAMsMQsqVLObzUcZmvq0hu0OeQMKX5IPB/sNQ7VoLXiRDLnFtHJFDU0r0qz1M+Wzismm+DCCXjgN6+s6qfCzhs5zc3MFJ5LWDj9o7OrUhklBw44MwQQH2bES3Lz37S3f1u+cqRzsLvnmlV7ByvKxvcQluHkgqwBqjCbpKEbSXNY9j4TTPlwrWYugPeSV78klx/yRqkZR/1mE5plyF1baXRXBQEo/h0F7wNLbEy17kpmbLvhGSfclK+sl4E5JKI/GfJ9fBOPLJeGA5VKYVOAHkx0i0Aa5dkaEpYv4CWdYN5LnNr33XcFAckXjFzwW4eRUWD3rhDtRmwIBpjhQXtIozroevd/SzsR/uKiNXFXfCq+3e56e+XLeQQs0t3Z7MyKB54CrHrJVg39Ttcp/PWbe3oY/6Qg/ZiY4xSKwi7XS0DnGWmX70V65qf/dTBKhYld+44+qQzCeXQ1KGICejxeL4icJ9PydGHOdTk4ToS6UL4X+RY9HStXHWr7b4OGxk+vODK1q2xNWBbn9SrwMRy0XOYr5CscsLM5TguprIr1SuB7LCXvlG2dN3lnzIPD7nNRo48X8= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAWPR08MB8982.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015)(38070700009);DIR:OUT;SFP:1101; Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB8934 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF00028D0A.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2e3b3d82-ca7e-4c7b-ab1e-08dc475c99c8 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fWleXSCO4NtRlop1qy0Vuo53173OdpZBlkBu/jAjUHrSZIFfAnFYulnpRHARVP1PtuzjBmSfGixjxJCmLefZLom/WhIscc9o0skol9CWPPcmkwvFeHdv4Ks1lAg9RfSxjM4BQqN50ltLilCNtRJezDmo1PqA/tNSlNfjzorzatFNkpX7Vzm+BvliMoTuGEDikG2b/B4WDPx+p1CrugpzIS/7WKuJ5uvyjYGY4XpAQ8hL+GUKcYzcDoOf7gdgAgl9ZHpVDyNk4BPVJ2/reZX0ZpiS6e46gy/ZAdnAbgpaQ9dsRc2fHVuhLxheIE/hrCwcvZoZz+OkBzKiMnST93HZmvJNJt6o5ht3MEPhmj9k1qOzuOr5xv/nZ5lxY7qgfY486dIrAZExJ+tcDpatKvBjoKn+YR9CnRb3uu1w/CIsFUZLFWD0XQmDQrBze+YQE6SsyOa9NjeRoVM3DqUW53Nqq/O/6Q1zNk2PFFv1kMeuqqRSAsMY23he3EiudUKj43Jd1nFPwKFDyrN39zaerh7kqTs+3S9BIeu36RwGF1wWJ6iD2KStLKGMTQRcc3YMMfweJCZGDcTldZNKzB59v8H1hXtOFdF2+FycUkUPCG7w+QtJUHtq6wdIMIDIHl6PNQsAMkWyRA/YQWa1M5bePB1qVnAeUHzzq1uXk9YYFyGI8o8zZVKRnwYP2ipMALqWaI9PlCcMj88SJmtPdGIX49n6sQ== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230031)(1800799015)(376005)(36860700004)(82310400014);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2024 15:03:50.0016 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cefd5880-6ad4-4fb2-73b4-08dc475c9e6b X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D0A.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU5PR08MB10802 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,KAM_LOTSOFHASH,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: =0A= The walk benchmarks don't measure anything useful - memory is not initializ= ed=0A= properly so doing a single walk in 32MB just measures reading the 4KB zero= =0A= page for reads and clear_page overhead for writes. The memset variants don= 't=0A= even manage to do a walk in the 32MB region due to using incorrect pointer= =0A= increments... Neither is it clear why it is walking backwards since this= =0A= won't confuse modern prefetchers. If you fix the benchmark and print the= =0A= bandwidth, the results are identical for all sizes larger than ~1KB since i= t=0A= is just testing memory bandwidth of a single 32MB block. This case is alre= ady=0A= tested by the large benchmark, so overall it doesn't seem useful to keep th= ese.=0A= =0A= OK for commit?=0A= =0A= ---=0A= =0A= diff --git a/benchtests/Makefile b/benchtests/Makefile=0A= index 05b8751c55e7eb862efef9d99421fbbf2f4febb2..76fa33535ef1b1cc4fa4f32ed42= 99ad7fbbcbf11 100644=0A= --- a/benchtests/Makefile=0A= +++ b/benchtests/Makefile=0A= @@ -139,7 +139,6 @@ bench-string :=3D \=0A= string-benchset :=3D \=0A= bzero \=0A= bzero-large \=0A= - bzero-walk \=0A= memccpy \=0A= memchr \=0A= memcmp \=0A= @@ -147,19 +146,15 @@ string-benchset :=3D \=0A= memcpy \=0A= memcpy-large \=0A= memcpy-random \=0A= - memcpy-walk \=0A= memmem \=0A= memmove \=0A= memmove-large \=0A= - memmove-walk \=0A= mempcpy \=0A= memrchr \=0A= memset \=0A= memset-large \=0A= - memset-walk \=0A= memset-zero \=0A= memset-zero-large \=0A= - memset-zero-walk \=0A= rawmemchr \=0A= stpcpy \=0A= stpcpy_chk \=0A= diff --git a/benchtests/bench-bzero-walk.c b/benchtests/bench-bzero-walk.c= =0A= deleted file mode 100644=0A= index 48df0d77c34f82435d2ffb963067dc8d9a81ff6f..000000000000000000000000000= 0000000000000=0A= --- a/benchtests/bench-bzero-walk.c=0A= +++ /dev/null=0A= @@ -1,143 +0,0 @@=0A= -/* Measure memset function throughput with large data sizes.=0A= - Copyright (C) 2017-2024 Free Software Foundation, Inc.=0A= - This file is part of the GNU C Library.=0A= -=0A= - The GNU C Library is free software; you can redistribute it and/or=0A= - modify it under the terms of the GNU Lesser General Public=0A= - License as published by the Free Software Foundation; either=0A= - version 2.1 of the License, or (at your option) any later version.=0A= -=0A= - The GNU C Library is distributed in the hope that it will be useful,=0A= - but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU=0A= - Lesser General Public License for more details.=0A= -=0A= - You should have received a copy of the GNU Lesser General Public=0A= - License along with the GNU C Library; if not, see=0A= - . */=0A= -=0A= -#define TEST_MAIN=0A= -#ifdef DO_MEMSET=0A= -# define TEST_NAME "memset"=0A= -#else=0A= -# define TEST_NAME "bzero"=0A= -#endif=0A= -#define START_SIZE 128=0A= -#define MIN_PAGE_SIZE (getpagesize () + 32 * 1024 * 1024)=0A= -#define TIMEOUT (20 * 60)=0A= -#include "bench-string.h"=0A= -=0A= -#include "json-lib.h"=0A= -=0A= -#ifdef DO_MEMSET=0A= -void *generic_memset (void *, int, size_t);=0A= -=0A= -typedef void *(*proto_t) (void *, int, size_t);=0A= -=0A= -IMPL (memset, 1)=0A= -IMPL (generic_memset, 0)=0A= -=0A= -#else=0A= -static void=0A= -memset_zero (void * s, size_t len)=0A= -{=0A= - memset (s, '\0', len);=0A= -}=0A= -=0A= -typedef void (*proto_t) (void *, size_t);=0A= -=0A= -IMPL (bzero, 1)=0A= -IMPL (memset_zero, 0)=0A= -#endif=0A= -=0A= -static void=0A= -do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s, CHAR *s_end,=0A= - size_t n)=0A= -{=0A= - size_t i, iters =3D MIN_PAGE_SIZE / n;=0A= - timing_t start, stop, cur;=0A= -=0A= - TIMING_NOW (start);=0A= - for (i =3D 0; i < iters && s <=3D s_end; s_end -=3D n, i++)=0A= -#ifdef DO_MEMSET=0A= - CALL (impl, s, 0, n);=0A= -#else=0A= - CALL (impl, s, n);=0A= -#endif=0A= - TIMING_NOW (stop);=0A= -=0A= - TIMING_DIFF (cur, start, stop);=0A= -=0A= - /* Get time taken per function call. */=0A= - json_element_double (json_ctx, (double) cur / i);=0A= -}=0A= -=0A= -static void=0A= -do_test (json_ctx_t *json_ctx, size_t len)=0A= -{=0A= - json_element_object_begin (json_ctx);=0A= - json_attr_uint (json_ctx, "length", len);=0A= - json_array_begin (json_ctx, "timings");=0A= -=0A= - FOR_EACH_IMPL (impl, 0)=0A= - {=0A= - do_one_test (json_ctx, impl, (CHAR *) buf1,=0A= - (CHAR *) buf1 + MIN_PAGE_SIZE - len, len);=0A= - alloc_bufs ();=0A= - }=0A= -=0A= - json_array_end (json_ctx);=0A= - json_element_object_end (json_ctx);=0A= -}=0A= -=0A= -int=0A= -test_main (void)=0A= -{=0A= - json_ctx_t json_ctx;=0A= - size_t i;=0A= -=0A= - test_init ();=0A= -=0A= - json_init (&json_ctx, 0, stdout);=0A= -=0A= - json_document_begin (&json_ctx);=0A= - json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);=0A= -=0A= - json_attr_object_begin (&json_ctx, "functions");=0A= - json_attr_object_begin (&json_ctx, TEST_NAME);=0A= - json_attr_string (&json_ctx, "bench-variant", "walk");=0A= -=0A= - json_array_begin (&json_ctx, "ifuncs");=0A= - FOR_EACH_IMPL (impl, 0)=0A= - json_element_string (&json_ctx, impl->name);=0A= - json_array_end (&json_ctx);=0A= -=0A= - json_array_begin (&json_ctx, "results");=0A= - for (i =3D 1; i <=3D 64; i++)=0A= - do_test (&json_ctx, i);=0A= -=0A= - for (i =3D START_SIZE; i <=3D MIN_PAGE_SIZE; i <<=3D 1)=0A= - {=0A= - do_test (&json_ctx, i);=0A= - do_test (&json_ctx, i + 1);=0A= - }=0A= -=0A= - json_array_end (&json_ctx);=0A= - json_attr_object_end (&json_ctx);=0A= - json_attr_object_end (&json_ctx);=0A= - json_document_end (&json_ctx);=0A= -=0A= - return ret;=0A= -}=0A= -=0A= -#include =0A= -=0A= -#ifdef DO_MEMSET=0A= -# define libc_hidden_builtin_def(X)=0A= -# define libc_hidden_def(X)=0A= -# define libc_hidden_weak(X)=0A= -# define weak_alias(X,Y)=0A= -# undef MEMSET=0A= -# define MEMSET generic_memset=0A= -# include =0A= -#endif=0A= diff --git a/benchtests/bench-memcpy-walk.c b/benchtests/bench-memcpy-walk.= c=0A= deleted file mode 100644=0A= index 661a40ccd1fe6a669f717319b676f60b39cb56af..000000000000000000000000000= 0000000000000=0A= --- a/benchtests/bench-memcpy-walk.c=0A= +++ /dev/null=0A= @@ -1,131 +0,0 @@=0A= -/* Measure memcpy function combined throughput for different alignments.= =0A= - Copyright (C) 2017-2024 Free Software Foundation, Inc.=0A= - This file is part of the GNU C Library.=0A= -=0A= - The GNU C Library is free software; you can redistribute it and/or=0A= - modify it under the terms of the GNU Lesser General Public=0A= - License as published by the Free Software Foundation; either=0A= - version 2.1 of the License, or (at your option) any later version.=0A= -=0A= - The GNU C Library is distributed in the hope that it will be useful,=0A= - but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU=0A= - Lesser General Public License for more details.=0A= -=0A= - You should have received a copy of the GNU Lesser General Public=0A= - License along with the GNU C Library; if not, see=0A= - . */=0A= -=0A= -/* This microbenchmark measures the throughput of memcpy for various sizes= from=0A= - 1 byte to 32MiB, doubling every iteration and then misaligning by 0-15= =0A= - bytes. The copies are done from source to destination and then back an= d the=0A= - source walks forward across the array and the destination walks backwar= d by=0A= - one byte each, thus measuring misaligned accesses as well. The idea is= to=0A= - avoid caching effects by copying a different string and far enough from= each=0A= - other, walking in different directions so that we can measure prefetche= r=0A= - efficiency (software or hardware) more closely than with a loop copying= the=0A= - same data over and over, which eventually only gives us L1 cache=0A= - performance. */=0A= -=0A= -#ifndef MEMCPY_RESULT=0A= -# define MEMCPY_RESULT(dst, len) dst=0A= -# define START_SIZE 128=0A= -# define MIN_PAGE_SIZE (getpagesize () + 32 * 1024 * 1024)=0A= -# define TEST_MAIN=0A= -# define TEST_NAME "memcpy"=0A= -# define TIMEOUT (20 * 60)=0A= -# include "bench-string.h"=0A= -=0A= -IMPL (memcpy, 1)=0A= -#endif=0A= -=0A= -#include "json-lib.h"=0A= -=0A= -typedef char *(*proto_t) (char *, const char *, size_t);=0A= -=0A= -static void=0A= -do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src,=0A= - size_t len)=0A= -{=0A= - size_t i =3D 0;=0A= - timing_t start, stop, cur;=0A= -=0A= - char *dst_end =3D dst + MIN_PAGE_SIZE - len;=0A= - char *src_end =3D src + MIN_PAGE_SIZE - len;=0A= -=0A= - TIMING_NOW (start);=0A= - /* Copy the entire buffer backwards, LEN at a time. */=0A= - for (; src_end >=3D src && dst_end >=3D dst; src_end -=3D len, dst_end -= =3D len, i++)=0A= - CALL (impl, src_end, dst_end, len);=0A= - TIMING_NOW (stop);=0A= -=0A= - TIMING_DIFF (cur, start, stop);=0A= -=0A= - /* Get time taken per function call. */=0A= - json_element_double (json_ctx, (double) cur / i);=0A= -}=0A= -=0A= -static void=0A= -do_test (json_ctx_t *json_ctx, size_t len, int both_ways)=0A= -{=0A= -=0A= - char *s1, *s2;=0A= - size_t repeats;=0A= - s1 =3D (char *) (buf1);=0A= - s2 =3D (char *) (buf2);=0A= -=0A= - for (repeats =3D both_ways ? 2 : 1; repeats; --repeats)=0A= - {=0A= - json_element_object_begin (json_ctx);=0A= - json_attr_uint (json_ctx, "length", (double) len);=0A= - json_attr_uint (json_ctx, "dst > src", (double) (s2 > s1));=0A= - json_array_begin (json_ctx, "timings");=0A= -=0A= - FOR_EACH_IMPL (impl, 0)=0A= - do_one_test (json_ctx, impl, s2, s1, len);=0A= -=0A= - json_array_end (json_ctx);=0A= - json_element_object_end (json_ctx);=0A= -=0A= - s1 =3D (char *) (buf2);=0A= - s2 =3D (char *) (buf1);=0A= - }=0A= -}=0A= -=0A= -int=0A= -test_main (void)=0A= -{=0A= - json_ctx_t json_ctx;=0A= -=0A= - test_init ();=0A= -=0A= - json_init (&json_ctx, 0, stdout);=0A= -=0A= - json_document_begin (&json_ctx);=0A= - json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);=0A= -=0A= - json_attr_object_begin (&json_ctx, "functions");=0A= - json_attr_object_begin (&json_ctx, "memcpy");=0A= - json_attr_string (&json_ctx, "bench-variant", "walk");=0A= -=0A= - json_array_begin (&json_ctx, "ifuncs");=0A= - FOR_EACH_IMPL (impl, 0)=0A= - json_element_string (&json_ctx, impl->name);=0A= - json_array_end (&json_ctx);=0A= -=0A= - json_array_begin (&json_ctx, "results");=0A= - for (size_t i =3D START_SIZE; i <=3D MIN_PAGE_SIZE; i <<=3D 1)=0A= - {=0A= - do_test (&json_ctx, i, 1);=0A= - do_test (&json_ctx, i + 1, 1);=0A= - }=0A= -=0A= - json_array_end (&json_ctx);=0A= - json_attr_object_end (&json_ctx);=0A= - json_attr_object_end (&json_ctx);=0A= - json_document_end (&json_ctx);=0A= -=0A= - return ret;=0A= -}=0A= -=0A= -#include =0A= diff --git a/benchtests/bench-memmove-walk.c b/benchtests/bench-memmove-wal= k.c=0A= deleted file mode 100644=0A= index 94b394eb8b22c1d82490002061a4eae469e29dbd..000000000000000000000000000= 0000000000000=0A= --- a/benchtests/bench-memmove-walk.c=0A= +++ /dev/null=0A= @@ -1,160 +0,0 @@=0A= -/* Measure memmove function combined throughput for different alignments.= =0A= - Copyright (C) 2017-2024 Free Software Foundation, Inc.=0A= - This file is part of the GNU C Library.=0A= -=0A= - The GNU C Library is free software; you can redistribute it and/or=0A= - modify it under the terms of the GNU Lesser General Public=0A= - License as published by the Free Software Foundation; either=0A= - version 2.1 of the License, or (at your option) any later version.=0A= -=0A= - The GNU C Library is distributed in the hope that it will be useful,=0A= - but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU=0A= - Lesser General Public License for more details.=0A= -=0A= - You should have received a copy of the GNU Lesser General Public=0A= - License along with the GNU C Library; if not, see=0A= - . */=0A= -=0A= -/* This microbenchmark measures the throughput of memmove for various size= s from=0A= - 1 byte to 32MiB, doubling every iteration and then misaligning by 0-15= =0A= - bytes. The copies are done from source to destination and then back an= d the=0A= - source walks forward across the array and the destination walks backwar= d by=0A= - one byte each, thus measuring misaligned accesses as well. The idea is= to=0A= - avoid caching effects by copying a different string and far enough from= each=0A= - other, walking in different directions so that we can measure prefetche= r=0A= - efficiency (software or hardware) more closely than with a loop copying= the=0A= - same data over and over, which eventually only gives us L1 cache=0A= - performance. */=0A= -=0A= -#ifndef MEMMOVE_RESULT=0A= -# define MEMMOVE_RESULT(dst, len) dst=0A= -# define START_SIZE 128=0A= -# define MIN_PAGE_SIZE (getpagesize () + 32 * 1024 * 1024)=0A= -# define TEST_MAIN=0A= -# define TEST_NAME "memmove"=0A= -# define TIMEOUT (20 * 60)=0A= -# include "bench-string.h"=0A= -=0A= -#define NO_OVERLAP 0=0A= -#define PARTIAL_OVERLAP 1=0A= -#define COMPLETE_OVERLAP 2=0A= -=0A= -IMPL (memmove, 1)=0A= -#endif=0A= -=0A= -#include "json-lib.h"=0A= -=0A= -typedef char *(*proto_t) (char *, const char *, size_t);=0A= -=0A= -static void=0A= -do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src,=0A= - size_t len)=0A= -{=0A= - size_t i =3D 0;=0A= - timing_t start, stop, cur;=0A= -=0A= - char *dst_end =3D dst + MIN_PAGE_SIZE - len;=0A= - char *src_end =3D src + MIN_PAGE_SIZE - len;=0A= -=0A= - TIMING_NOW (start);=0A= - /* Copy the entire buffer backwards, LEN at a time. */=0A= - for (; src_end >=3D src && dst <=3D dst_end; dst +=3D len, src_end -=3D = len, i++)=0A= - CALL (impl, dst, src_end, len);=0A= - TIMING_NOW (stop);=0A= -=0A= - TIMING_DIFF (cur, start, stop);=0A= -=0A= - /* Get time taken per function call. */=0A= - json_element_double (json_ctx, (double) cur / i);=0A= -}=0A= -=0A= -static void=0A= -do_test (json_ctx_t *json_ctx, size_t len, int overlap, int both_ways)=0A= -{=0A= - char *s1, *s2, *tmp;=0A= - size_t repeats;=0A= -=0A= - s1 =3D (char *) (buf1);=0A= - s2 =3D (char *) (buf2);=0A= - if (overlap !=3D NO_OVERLAP)=0A= - s2 =3D s1;=0A= - if (overlap =3D=3D PARTIAL_OVERLAP)=0A= - s2 +=3D len / 2;=0A= -=0A= - for (repeats =3D both_ways ? 2 : 1; repeats; --repeats)=0A= - {=0A= - json_element_object_begin (json_ctx);=0A= - json_attr_uint (json_ctx, "length", (double) len);=0A= - json_attr_string(json_ctx, "overlap",=0A= - overlap =3D=3D NO_OVERLAP ? "none"=0A= - : overlap =3D=3D PARTIAL_OVERLAP ? "partial"=0A= - : "complete");=0A= - json_attr_uint (json_ctx, "dst > src", (double) (s2 > s1));=0A= - json_array_begin (json_ctx, "timings");=0A= -=0A= -=0A= - FOR_EACH_IMPL (impl, 0)=0A= - do_one_test (json_ctx, impl, (char *) buf2, (char *) buf1, len);= =0A= -=0A= - json_array_end (json_ctx);=0A= - json_element_object_end (json_ctx);=0A= -=0A= - tmp =3D s1;=0A= - s1 =3D s2;=0A= - s2 =3D tmp;=0A= - }=0A= -}=0A= -=0A= -int=0A= -test_main (void)=0A= -{=0A= - json_ctx_t json_ctx;=0A= -=0A= - test_init ();=0A= -=0A= - json_init (&json_ctx, 0, stdout);=0A= -=0A= - json_document_begin (&json_ctx);=0A= - json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);=0A= -=0A= - json_attr_object_begin (&json_ctx, "functions");=0A= - json_attr_object_begin (&json_ctx, "memmove");=0A= - json_attr_string (&json_ctx, "bench-variant", "walk");=0A= -=0A= - json_array_begin (&json_ctx, "ifuncs");=0A= - FOR_EACH_IMPL (impl, 0)=0A= - json_element_string (&json_ctx, impl->name);=0A= - json_array_end (&json_ctx);=0A= -=0A= - json_array_begin (&json_ctx, "results");=0A= - /* Non-overlapping buffers. */=0A= - for (size_t i =3D START_SIZE; i <=3D MIN_PAGE_SIZE; i <<=3D 1)=0A= - {=0A= - do_test (&json_ctx, i, NO_OVERLAP, 1);=0A= - do_test (&json_ctx, i + 1, NO_OVERLAP, 1);=0A= - }=0A= -=0A= - /* Partially-overlapping buffers. */=0A= - for (size_t i =3D START_SIZE; i <=3D MIN_PAGE_SIZE / 2; i <<=3D 1)=0A= - {=0A= - do_test (&json_ctx, i, PARTIAL_OVERLAP, 1);=0A= - do_test (&json_ctx, i + 1, PARTIAL_OVERLAP, 1);=0A= - }=0A= -=0A= - /* Complete-overlapping buffers. */=0A= - for (size_t i =3D START_SIZE; i <=3D MIN_PAGE_SIZE; i <<=3D 1)=0A= - {=0A= - do_test (&json_ctx, i, COMPLETE_OVERLAP, 0);=0A= - do_test (&json_ctx, i + 1, COMPLETE_OVERLAP, 0);=0A= - }=0A= -=0A= - json_array_end (&json_ctx);=0A= - json_attr_object_end (&json_ctx);=0A= - json_attr_object_end (&json_ctx);=0A= - json_document_end (&json_ctx);=0A= -=0A= - return ret;=0A= -}=0A= -=0A= -#include =0A= diff --git a/benchtests/bench-memset-walk.c b/benchtests/bench-memset-walk.= c=0A= deleted file mode 100644=0A= index 7be904a4507db60b5fc46dee03f5a681da960de5..000000000000000000000000000= 0000000000000=0A= --- a/benchtests/bench-memset-walk.c=0A= +++ /dev/null=0A= @@ -1,122 +0,0 @@=0A= -/* Measure memset function throughput with large data sizes.=0A= - Copyright (C) 2017-2024 Free Software Foundation, Inc.=0A= - This file is part of the GNU C Library.=0A= -=0A= - The GNU C Library is free software; you can redistribute it and/or=0A= - modify it under the terms of the GNU Lesser General Public=0A= - License as published by the Free Software Foundation; either=0A= - version 2.1 of the License, or (at your option) any later version.=0A= -=0A= - The GNU C Library is distributed in the hope that it will be useful,=0A= - but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU=0A= - Lesser General Public License for more details.=0A= -=0A= - You should have received a copy of the GNU Lesser General Public=0A= - License along with the GNU C Library; if not, see=0A= - . */=0A= -=0A= -#define TEST_MAIN=0A= -#define TEST_NAME "memset"=0A= -#define START_SIZE 128=0A= -#define MIN_PAGE_SIZE (getpagesize () + 32 * 1024 * 1024)=0A= -#define TIMEOUT (20 * 60)=0A= -#include "bench-string.h"=0A= -=0A= -#include "json-lib.h"=0A= -=0A= -void *generic_memset (void *, int, size_t);=0A= -typedef void *(*proto_t) (void *, int, size_t);=0A= -=0A= -IMPL (MEMSET, 1)=0A= -IMPL (generic_memset, 0)=0A= -=0A= -static void=0A= -do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s, CHAR *s_end,=0A= - int c __attribute ((unused)), size_t n)=0A= -{=0A= - size_t i, iters =3D MIN_PAGE_SIZE / n;=0A= - timing_t start, stop, cur;=0A= -=0A= - TIMING_NOW (start);=0A= - for (i =3D 0; i < iters && s <=3D s_end; s_end -=3D n, i++)=0A= - CALL (impl, s, c, n);=0A= - TIMING_NOW (stop);=0A= -=0A= - TIMING_DIFF (cur, start, stop);=0A= -=0A= - /* Get time taken per function call. */=0A= - json_element_double (json_ctx, (double) cur / i);=0A= -}=0A= -=0A= -static void=0A= -do_test (json_ctx_t *json_ctx, int c, size_t len)=0A= -{=0A= - json_element_object_begin (json_ctx);=0A= - json_attr_uint (json_ctx, "length", len);=0A= - json_attr_uint (json_ctx, "char", c);=0A= - json_array_begin (json_ctx, "timings");=0A= -=0A= - FOR_EACH_IMPL (impl, 0)=0A= - {=0A= - do_one_test (json_ctx, impl, (CHAR *) buf1,=0A= - (CHAR *) buf1 + MIN_PAGE_SIZE - len, c, len);=0A= - alloc_bufs ();=0A= - }=0A= -=0A= - json_array_end (json_ctx);=0A= - json_element_object_end (json_ctx);=0A= -}=0A= -=0A= -int=0A= -test_main (void)=0A= -{=0A= - json_ctx_t json_ctx;=0A= - size_t i;=0A= -=0A= - test_init ();=0A= -=0A= - json_init (&json_ctx, 0, stdout);=0A= -=0A= - json_document_begin (&json_ctx);=0A= - json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);=0A= -=0A= - json_attr_object_begin (&json_ctx, "functions");=0A= - json_attr_object_begin (&json_ctx, TEST_NAME);=0A= - json_attr_string (&json_ctx, "bench-variant", "walk");=0A= -=0A= - json_array_begin (&json_ctx, "ifuncs");=0A= - FOR_EACH_IMPL (impl, 0)=0A= - json_element_string (&json_ctx, impl->name);=0A= - json_array_end (&json_ctx);=0A= -=0A= - json_array_begin (&json_ctx, "results");=0A= - for (i =3D START_SIZE; i <=3D MIN_PAGE_SIZE; i <<=3D 1)=0A= - {=0A= - do_test (&json_ctx, 65, i);=0A= - do_test (&json_ctx, 65, i + 1);=0A= - }=0A= -=0A= - for (i =3D START_SIZE; i <=3D MIN_PAGE_SIZE; i <<=3D 1)=0A= - {=0A= - do_test (&json_ctx, 0, i);=0A= - do_test (&json_ctx, 0, i + 1);=0A= - }=0A= -=0A= - json_array_end (&json_ctx);=0A= - json_attr_object_end (&json_ctx);=0A= - json_attr_object_end (&json_ctx);=0A= - json_document_end (&json_ctx);=0A= -=0A= - return ret;=0A= -}=0A= -=0A= -#include =0A= -=0A= -#define libc_hidden_builtin_def(X)=0A= -#define libc_hidden_def(X)=0A= -#define libc_hidden_weak(X)=0A= -#define weak_alias(X,Y)=0A= -#undef MEMSET=0A= -#define MEMSET generic_memset=0A= -#include =0A= diff --git a/benchtests/bench-memset-zero-walk.c b/benchtests/bench-memset-= zero-walk.c=0A= deleted file mode 100644=0A= index 200a17f128f08cf18cddb2b31c331dc9cad3899c..000000000000000000000000000= 0000000000000=0A= --- a/benchtests/bench-memset-zero-walk.c=0A= +++ /dev/null=0A= @@ -1,20 +0,0 @@=0A= -/* Measure memset functions for zeroing throughput with large data sizes.= =0A= - Copyright (C) 2022-2024 Free Software Foundation, Inc.=0A= - This file is part of the GNU C Library.=0A= -=0A= - The GNU C Library is free software; you can redistribute it and/or=0A= - modify it under the terms of the GNU Lesser General Public=0A= - License as published by the Free Software Foundation; either=0A= - version 2.1 of the License, or (at your option) any later version.=0A= -=0A= - The GNU C Library is distributed in the hope that it will be useful,=0A= - but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU=0A= - Lesser General Public License for more details.=0A= -=0A= - You should have received a copy of the GNU Lesser General Public=0A= - License along with the GNU C Library; if not, see=0A= - . */=0A= -=0A= -#define DO_MEMSET 1=0A= -#include "bench-bzero-walk.c"=0A= =0A=