From patchwork Mon Jul 29 14:13:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 1966002 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=rLZ8AFyg; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=rLZ8AFyg; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WXgMp3wdwz1ybY for ; Tue, 30 Jul 2024 00:14:14 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 22263385B529 for ; Mon, 29 Jul 2024 14:14:12 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2082.outbound.protection.outlook.com [40.107.103.82]) by sourceware.org (Postfix) with ESMTPS id 73A583858D37 for ; Mon, 29 Jul 2024 14:13:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 73A583858D37 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 73A583858D37 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.103.82 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1722262432; cv=pass; b=Wsu1yEjjbxymi1CViXgnqtTSh1o2WF/YjDlBF0tIwuGOMllWhPtha0obYnRgmi9Py/y9zjGKz9zhTiYFF9K3fOTGeVcyKIasQvKC1ZuksZf1nUZddy5LdAOHByDiylbm1am2W4BkAoNZgXlvMkRmYXDljuj/fYydbKk1MHie3ic= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1722262432; c=relaxed/simple; bh=8W8INpF9sMu2MpVoz0h2nw7L0nBVMpCEHjkBo91psbs=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=HMKL6PcsKs9A/Dow5dPD44meyQcOY8FcY0IQgT1GcwEfKA3I5g/O+nTI2MSiAEAda3Z5DZhH8SMVU7Hh5dM27e3IEkTcOvT9EbIcjKODdKIosyH4VaBOucehdrlxWzE2x521k4heY5qojSY8NVh8DTY8uhrYukqPZpZK++kTHhM= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=iQymPRlB4p+CtnzNOiX/sA2OmCnegEbclYxt5GWN/UcNFSzBIkWuvJGc9zclx4p/qnguiG1v9YX8MHWFARJCKpks5Ibxow3esTRcJkIAqAkuA69W6IVFTuzMsA/eRpWdM98dMXu/qqXWA5bejyzy4WZkV1B0o06xpki/irHkYnu00igbsZxWb774fxGMCSI4m3BI8B5vPQv/+6HLINqtiVjtI0c25d6efvatN7UUNa8rXGN6W7tJEorI1/5AYdFVJ7Llkcj9iOP7EKB8on/WN+0PPJ99vQnFPn55JnuFFnl7tF1mLQQQZugg4Abn0Xkt2poGpm01ZTc0cdHm/8yyfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=h9OY8y/29MAYvBYmGA+d8X6vc7HD7rUBfBDZts96M3I=; b=n19x9Dhv8WUhncJX380RxIoyweQBrYUY4mEG2KXWCZ41aO6Mr3ie99ofZQ3abK8VJ+Oc9bIZ41ZWK/GMMCnq2VDJXb5uuFc0mhzw2+yS0K2Rq/8n6iugL8x3Tw+3mpon2HKflTFv8krpsAnhRY2EjM1ZPORc/l66Nm3OfIebmkyp8/e3B9xeTWT5MpL1ucRoMGL6aNb4czBLWddr6bP6ExmlcYp/qknMwhj3l1hJ1y1QC93td9IIl8v6aNP/ugfxjFe4bp6FTXq5Ix5Zi9ixzh3EpC7Y2Qv7eNn9aPwNnlE7HhhpvuAmWOXSkgWTYP2ewSLqdtyKTAKi3e4fX22INQ== 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=arm.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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h9OY8y/29MAYvBYmGA+d8X6vc7HD7rUBfBDZts96M3I=; b=rLZ8AFygDcYYzVJYijwrBmC6NrOE329xFASAl75K9R768cXU0j26B5/GKGSGKvomYegzvU0YiD6FJPZM74FcE/wFBg2CakICYYXq+hfyKNeaNdeI5FWT1l3q8AjiRMgSEwbBnGg5GEZAoIiRoq848FWd1Nmrz1NzK/K9rNR6OuA= Received: from AS9PR0301CA0020.eurprd03.prod.outlook.com (2603:10a6:20b:468::26) by AS2PR08MB10128.eurprd08.prod.outlook.com (2603:10a6:20b:644::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Mon, 29 Jul 2024 14:13:46 +0000 Received: from AM2PEPF0001C708.eurprd05.prod.outlook.com (2603:10a6:20b:468:cafe::35) by AS9PR0301CA0020.outlook.office365.com (2603:10a6:20b:468::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.34 via Frontend Transport; Mon, 29 Jul 2024 14:13:46 +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=arm.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 AM2PEPF0001C708.mail.protection.outlook.com (10.167.16.196) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7828.19 via Frontend Transport; Mon, 29 Jul 2024 14:13:45 +0000 Received: ("Tessian outbound ab09e808a502:v365"); Mon, 29 Jul 2024 14:13:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a99cf6efd3d8efb1 X-CR-MTA-TID: 64aa7808 Received: from L0b288b445abe.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 66ACC6B4-2A85-4030-8160-B7623FC305B5.1; Mon, 29 Jul 2024 14:13:38 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L0b288b445abe.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 29 Jul 2024 14:13:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CNzR6DBa6twJZNbZ7rBg6atOWq14ir+7PclPAzsmLDe5vDhIzkOoZyiA5DSiHzfsZz0EqlpF1tQQXGA2I1pZSdbb133+09O/b9RD6t+oRdUsO7dCoj+RHozaUnA/Rb7+7x/EVHuyVMcnXNxUieNEM+hJdvEZYIV9/0EWVm3jP6V/p6PG1XkFebcrsbPPcVzl/+ko6FY8Es+u3FgdGQpsx4rfBL7H8xustoNI81lRo3PWw4tAT0e4vom03iekIJjhBUlmChXkZnnrhsh8vMJyndmRwEofHY7CCgTW69N3LKseznxJ/SzxiI93QKOW/03VOecqFj0bHGWivvyF0FQRvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=h9OY8y/29MAYvBYmGA+d8X6vc7HD7rUBfBDZts96M3I=; b=Dd4WDCPuQX2sAVcKCW79kQSjDCHBOFW6vsZ6xPe9DroULDEDPuZoeoqgt1BiUJSuydb5miIqXO6kt+S1OLHPvO5ngO6/5z9X5sn3Elh/SsdRf1CohoYL4TNQR40hFGXiU1oPbCTfOsWyZlcOCMMuJSeR0ZL4HLWrbK/Tm2WgqXewhcSor5JOBCffj8D4xr1ByIaFQuQm4H2OjRPyBzPJAnRaEJZQojbbVmwfJyuvWzTOOYKNqVgjsnPCMNvIRmSKBQKFywpFwj88JTtoXdTMc8yhj5FtqQQ7EYP0e2k10jv43mrFWEQykTkQKIsycXM8zU/I50Kz6cmD3N/pDISmuA== 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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h9OY8y/29MAYvBYmGA+d8X6vc7HD7rUBfBDZts96M3I=; b=rLZ8AFygDcYYzVJYijwrBmC6NrOE329xFASAl75K9R768cXU0j26B5/GKGSGKvomYegzvU0YiD6FJPZM74FcE/wFBg2CakICYYXq+hfyKNeaNdeI5FWT1l3q8AjiRMgSEwbBnGg5GEZAoIiRoq848FWd1Nmrz1NzK/K9rNR6OuA= Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by DU0PR08MB7691.eurprd08.prod.outlook.com (2603:10a6:10:3a5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.27; Mon, 29 Jul 2024 14:13:35 +0000 Received: from PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::b366:6358:236e:352d]) by PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::b366:6358:236e:352d%6]) with mapi id 15.20.7807.026; Mon, 29 Jul 2024 14:13:35 +0000 From: Wilco Dijkstra To: 'GNU C Library' Subject: [PATCH] benchtests: Add random memset benchmark Thread-Topic: [PATCH] benchtests: Add random memset benchmark Thread-Index: AQHa4cE+0gQlSfOcVkeIjnOJ5yFeZA== Date: Mon, 29 Jul 2024 14:13:35 +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_|DU0PR08MB7691:EE_|AM2PEPF0001C708:EE_|AS2PR08MB10128:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d8b97bb-6ae9-4acd-38c7-08dcafd8a8ae x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|376014|1800799024|366016|38070700018; X-Microsoft-Antispam-Message-Info-Original: =?iso-8859-1?q?yGxq85txHSmN027wK?= =?iso-8859-1?q?iMkuvvklUJd2m/DH2gKUUQLLDPsgE6ZgZ33KQQq63oekS40mzK0PoM/OEykH?= =?iso-8859-1?q?LofmECPy7Q96PY1wKlDmAb0LZimjNtBF3mxitWriNn7K1IVXtdOIhG2/H77y?= =?iso-8859-1?q?hSZdnTqlxXtbvdlHg+pKrLf04WQDMkPVyMjvLJUBXUoj0ulzSWQza4aVC1jJ?= =?iso-8859-1?q?5n9bNjBdsUEU3RUk1w8EGWsr1ygmBLwsmixAUOZxQzvL/4SDJW/xFujfRLyZ?= =?iso-8859-1?q?45TS7BO1K/b4f0VAmNY9TGri4jwu3Ewpk7QkmhPx3vUzx4iKzhPsQkUq+tn4?= =?iso-8859-1?q?TOFXQw3KZ4FNp+JRnL3d9IOwtMMXQXEPXrtsOxD8yTwaComzDpyA5YBZNPbV?= =?iso-8859-1?q?AKoEN2mJ7AHMGiXO4iRxmCtBPOuTdmKinaNoowy6QBNjqDCfcNkF3zgfAG0j?= =?iso-8859-1?q?H7bUfm3gvYUO2wRE4YHV2DD0bU52EyGwPj95HEdUdOZznqO2dFpIg1SGjCdY?= =?iso-8859-1?q?yTweFqNNV4jcQ1WMhNvWUfVl9dWaEvyc10xrWYuiuURkaw3BOaUtPjhP7DQ4?= =?iso-8859-1?q?GcZw1PzSTvgIoQTrUdN7f9ikLcU+fuh+sadreUx31OkqbTwcs4+R9sWwJi/E?= =?iso-8859-1?q?AYJFs7jCQVH4NwNWqNuXM5khOt/ivO38eTAHQ5c6d/akg+UUhEU7FlK/4z40?= =?iso-8859-1?q?dzHOnYG2AlgNYgpRVtIM1w1kzleCrbU+6JaO5qjfzD5UqVm+EAhZvTQRcXyq?= =?iso-8859-1?q?dQMptSpm2EmSNPjs/qgXQgmhfD6Ae7A2gElNnE1M1fbQ8qU01ByCwKNkOwLm?= =?iso-8859-1?q?u5xAEsb/04vkVd49N2qX9G2eOLHhczPxGtDDxK1n7ScCww3KrJOfxN0y32vL?= =?iso-8859-1?q?mgSnMB3Q4MtV70BhoDND+rt6YhxBXs9O24hZ9O6a1rsVOVnojXM8HsvT+raA?= =?iso-8859-1?q?jP9XjFfO3FeUHouNgqt5AAyFBLzL9B8pzEiTEc6IjNnMKhr7NvWgonZIkuY/?= =?iso-8859-1?q?qdWi8L9PfHwstAy1V1STFIoDhYKUS3LeZvbkTW4RYzuowbjg42LgoI+cEIa3?= =?iso-8859-1?q?DwT7g5q8f59p18eIPZh7B4+WN/Crxh+Q9QlkD+SIN2e9FeJgik/ETZG2sb5G?= =?iso-8859-1?q?mLFzshRTnMMVCNL30pXwkHtoq5O9v+yVi9nyCVIljrZ55tLxyFx8x88La2yX?= =?iso-8859-1?q?gtlt/dAGj2FkX2NTLUYwy4ctLGxY5zhbyC5AWuhcwKwf94N5zCtQNbCim3MN?= =?iso-8859-1?q?rGl2iLZ6FJe1vj1RRMq/DO2Pte+Yuug9IZhLk1LxiawMfZwgdSZJcgHENbyn?= =?iso-8859-1?q?ff0M4Mbf4pUN9OSKiKTl/1i5vyaJ/3IFqJIiuXakLAXepeRWjpXNaXumhHwP?= =?iso-8859-1?q?o+K8PBLy7veBzwlf7M4C7ZEIW2J032jzSRSQU3ZKgKvMa0ZvGo=3D?= 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:(13230040)(376014)(1800799024)(366016)(38070700018); DIR:OUT; SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7691 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-SkipListedInternetSender: ip=[2603:10a6:102:33f::20]; domain=PAWPR08MB8982.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM2PEPF0001C708.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 108f3103-7121-44cd-d5af-08dcafd8a27c X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|35042699022|36860700013; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?q?tk4JpMNzfgi95Et8w3Hj2sPi0J?= =?iso-8859-1?q?LoMr8Zrt5xYecXopfDH9u+gxuas02QQdhte5WQ1E+Q6llAqmu79gXp7RD+so?= =?iso-8859-1?q?/XUtiN/QGG8Oz+A/qUsVqsKM7iqKjMB/n7+U8KeqwY4StVSZNGOTi+8vBG9t?= =?iso-8859-1?q?4mMJRDqmwWvXRhvaGgUJqmjvRez3JCy+w4g67y82rll52ksnaVX60DtBlmQk?= =?iso-8859-1?q?yZ2dtSwz3JM5MgP/jrGTgTmGyYF0i0gnKPyYcD+suHl1doxacFWTw+Chwf4d?= =?iso-8859-1?q?yjTKxCClj8RcuGrAPBKI9zQzL/QAwza2vjZLxdijfkPSkAp8+KYMQkbrbRym?= =?iso-8859-1?q?wxvdAGv0afqTkDVs6gp8PBQs6lxL9tMIIBgOTaQwUXg5wzQJCcpfkb+HuUU6?= =?iso-8859-1?q?8DCa5aLzD0bQCz3TIAs1jOvWrnZJHANEwW8icNTpqo10B8imzpApah6ddhfm?= =?iso-8859-1?q?zsPqph+8t5lwwPKZjxRPODM4SgDRB+Ai833r3iijJrTpwYHyj5/Nc4RQiqXc?= =?iso-8859-1?q?fVESLAD4CoJ9sFREHAhl/1ApKuiQvGTJkilgkxElQbaK84YA7k93l6lI3l57?= =?iso-8859-1?q?2Rd3rh37qgvvYMxdfl1PBTy3E1HVR9dpqA+QxACd40fjJdJUUhPsjtAEkCUU?= =?iso-8859-1?q?prkydBZSIRXhna8ERsM+5NJ4rjEQTZCy0cYLSYRUmYGm4fGRtmg6irVS+Zx5?= =?iso-8859-1?q?RHgCY6rk+E2k4MXQXzgMXfukgErt6F2t24ogj3pXlyhpwSQ79C8caUS6VL4N?= =?iso-8859-1?q?DfcwAKtFyKziqc4XM8g0SIK7czqGGRVdEBtnLhA6AeuLZ1a6gLDuZqzUOg/5?= =?iso-8859-1?q?xemkWgChukQCc503pXUUkAi2VZ1C0JlBM8vMTKY3DEgPpTyXVIHteS7YZxkP?= =?iso-8859-1?q?G9L1rGmH6/gGBisWFK+WS4C5/AjoT2ecqSRC+VyTmHFawP7IhewOoEmDf2Xb?= =?iso-8859-1?q?0SaIFcRJvvlL25OENlxF+UzOWoaFPVWbisJjR3TWRsWzKRXGUJFuCLQV+p0r?= =?iso-8859-1?q?j0n5ED89tF1u5C5T4gAJUBwzHblgEgh1Vo+7k9xPgT2VefulLkYg154Uc0kr?= =?iso-8859-1?q?kypEFBUXKRIGINqI+t6WcFi9VnR1EQPyMFSOseig9POR1c0SZlTrBsivox7B?= =?iso-8859-1?q?sPtcU0NgUgIVA19CcmDCQSiXL1OAXVdZR25yTUoV3P5xQ+DNofEw8L0hdLQH?= =?iso-8859-1?q?JuzI8MaRWO1TvlCoo3s8RuCG8alJ9Le0T990wGLucJyAP1sJZrS23GliGkVl?= =?iso-8859-1?q?UGq1TbKQVOtDLkRY8oP3DdQh4Wq3OX4M7rUZCBBz3GVRPyyfph0g9WxSTplY?= =?iso-8859-1?q?b1ax7GtxKL2HuJvruAJ11l9xiVyD59nTza/1MjtS4X3BJJeeX3cY/H1UI8B6?= =?iso-8859-1?q?2YhLNbhI4tUCkR8YA0TVZfNjCBjK8A7r4oaNHDF9GsibxcpQdkC45O22LhTS?= =?iso-8859-1?q?KpCBVM24/hEDWWMfbVImQNDQ=3D=3D?= 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:(13230040)(82310400026)(376014)(1800799024)(35042699022)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2024 14:13:45.6148 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6d8b97bb-6ae9-4acd-38c7-08dcafd8a8ae 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: AM2PEPF0001C708.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB10128 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SCC_5_SHORT_WORD_LINES, SPF_HELO_PASS, SPF_NONE, TXREP, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org Add a new randomized memset test similar to bench-random-memcpy. Instead of repeating the same call to memset over and over again, it times a large number of different inputs. The distribution of memset length and alignment is based on SPEC2017. OK for commit? Reviewed-by: Adhemerval Zanella diff --git a/benchtests/Makefile b/benchtests/Makefile index 382fb7bae17b62bf74d11b32b13e99b9ef1460f4..d228e9e68af3d73129591f3d875d6be545182eac 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -153,6 +153,7 @@ string-benchset := \ memrchr \ memset \ memset-large \ + memset-random \ memset-zero \ memset-zero-large \ rawmemchr \ diff --git a/benchtests/bench-memset-random.c b/benchtests/bench-memset-random.c new file mode 100644 index 0000000000000000000000000000000000000000..9c1eacbf8171f922859927034c4b4c56952c4735 --- /dev/null +++ b/benchtests/bench-memset-random.c @@ -0,0 +1,185 @@ +/* Measure memset performance. + Copyright (C) 2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#define MIN_SIZE 32768 +#define MAX_SIZE (1024*1024) +#define NUM_TESTS 16384 + +#define MIN_PAGE_SIZE (MAX_SIZE + getpagesize()) +#define TEST_MAIN +#define TEST_NAME "memset" +#include "bench-string.h" +#include +#include "json-lib.h" + +typedef void *(*proto_t) (void *, int, size_t); + +IMPL (MEMSET, 1) + +typedef struct { uint32_t offset : 20, len : 12; } memset_test_t; +static memset_test_t test_arr[NUM_TESTS]; + +typedef struct { uint16_t size; uint16_t freq; } freq_data_t; +typedef struct { uint8_t align; uint16_t freq; } align_data_t; + +#define SIZE_NUM 65536 +#define SIZE_MASK (SIZE_NUM-1) +static uint8_t len_arr[SIZE_NUM]; + +/* Frequency data for memset sizes up to 4096 bytes based on SPEC2017. */ +static freq_data_t memset_len_freq[] = +{ +{40,28817}, {32,15336}, { 16,3823}, {296,3545}, { 24,3454}, { 8,1412}, +{292,1202}, { 48, 927}, { 12, 613}, { 11, 539}, {284, 493}, {108, 414}, +{ 88, 380}, { 20, 295}, {312, 271}, { 72, 233}, { 2, 200}, { 4, 192}, +{ 15, 180}, { 14, 174}, { 13, 160}, { 56, 151}, { 36, 144}, { 64, 140}, +{4095,133}, { 10, 130}, { 9, 124}, { 3, 124}, { 28, 120}, { 0, 118}, +{288, 110}, {1152, 96}, {104, 90}, { 1, 86}, {832, 76}, {248, 74}, +{1024, 69}, {120, 64}, {512, 63}, {384, 60}, { 6, 59}, { 80, 54}, +{ 17, 50}, { 7, 49}, {520, 47}, {2048, 39}, {256, 37}, {864, 33}, +{1440, 28}, { 22, 27}, {2056, 24}, {260, 23}, { 68, 23}, { 5, 22}, +{ 18, 21}, {200, 18}, {2120, 18}, { 60, 17}, { 52, 16}, {336, 15}, +{ 44, 13}, {192, 13}, {160, 12}, {2064, 12}, {128, 12}, { 76, 11}, +{164, 11}, {152, 10}, {136, 9}, {488, 7}, { 96, 6}, {560, 6}, +{1016, 6}, {112, 5}, {232, 5}, {168, 5}, {952, 5}, {184, 5}, +{144, 4}, {252, 4}, { 84, 3}, {960, 3}, {3808, 3}, {244, 3}, +{280, 3}, {224, 3}, {156, 3}, {1088, 3}, {440, 3}, {216, 2}, +{304, 2}, { 23, 2}, { 25, 2}, { 26, 2}, {264, 2}, {328, 2}, +{1096, 2}, {240, 2}, {1104, 2}, {704, 2}, {1664, 2}, {360, 2}, +{808, 1}, {544, 1}, {236, 1}, {720, 1}, {368, 1}, {424, 1}, +{640, 1}, {1112, 1}, {552, 1}, {272, 1}, {776, 1}, {376, 1}, +{ 92, 1}, {536, 1}, {824, 1}, {496, 1}, {760, 1}, {792, 1}, +{504, 1}, {344, 1}, {1816, 1}, {880, 1}, {176, 1}, {320, 1}, +{352, 1}, {2008, 1}, {208, 1}, {408, 1}, {228, 1}, {2072, 1}, +{568, 1}, {220, 1}, {616, 1}, {600, 1}, {392, 1}, {696, 1}, +{2144, 1}, {1280, 1}, {2136, 1}, {632, 1}, {584, 1}, {456, 1}, +{472, 1}, {3440, 1}, {2088, 1}, {680, 1}, {2928, 1}, {212, 1}, +{648, 1}, {1752, 1}, {664, 1}, {3512, 1}, {1032, 1}, {528, 1}, +{4072, 1}, {204, 1}, {2880, 1}, {3392, 1}, {712, 1}, { 59, 1}, +{736, 1}, {592, 1}, {2520, 1}, {744, 1}, {196, 1}, {172, 1}, +{728, 1}, {2040, 1}, {1192, 1}, {3600, 1}, {0, 0} +}; + +#define ALIGN_NUM 1024 +#define ALIGN_MASK (ALIGN_NUM-1) +static uint8_t align_arr[ALIGN_NUM]; + +/* Alignment data for memset based on SPEC2017. */ +static align_data_t memset_align_freq[] = +{ + {16, 338}, {8, 307}, {32, 148}, {64, 131}, {4, 72}, {1, 23}, {2, 5}, {0, 0} +}; + +static void +init_memset_distribution (void) +{ + int i, j, freq, size, n; + + for (n = i = 0; (freq = memset_len_freq[i].freq) != 0; i++) + for (j = 0, size = memset_len_freq[i].size; j < freq; j++) + len_arr[n++] = size; + assert (n == SIZE_NUM); + + for (n = i = 0; (freq = memset_align_freq[i].freq) != 0; i++) + for (j = 0, size = memset_align_freq[i].align; j < freq; j++) + align_arr[n++] = size - 1; + assert (n == ALIGN_NUM); +} + +static void +do_one_test (json_ctx_t *json_ctx, impl_t *impl, size_t iters, + memset_test_t *input, size_t n) +{ + timing_t start, stop, cur; + + /* Avoid 'cold start' performance penalty. */ + for (int j = 0; j < n; j++) + CALL (impl, buf1 + input[j].offset, 0, input[j].len); + + TIMING_NOW (start); + for (int i = 0; i < iters; ++i) + for (int j = 0; j < n; j++) + CALL (impl, buf1 + input[j].offset, 0, input[j].len); + TIMING_NOW (stop); + TIMING_DIFF (cur, start, stop); + json_element_double (json_ctx, (double) cur / (double) iters); +} + +static void +do_test (json_ctx_t *json_ctx, size_t max_size) +{ + int n; + + /* Create a random set of memset inputs strings with the given length + and alignment distributions. */ + for (n = 0; n < NUM_TESTS; n++) + { + int align = align_arr[rand () & ALIGN_MASK]; + int len = len_arr[rand () & SIZE_MASK]; + + test_arr[n].offset = (rand () & (max_size - 1)) & ~align; + test_arr[n].len = len; + } + + json_element_object_begin (json_ctx); + json_attr_uint (json_ctx, "length", (double) max_size); + json_array_begin (json_ctx, "timings"); + + FOR_EACH_IMPL (impl, 0) + do_one_test (json_ctx, impl, INNER_LOOP_ITERS_MEDIUM * 2, test_arr, n); + + json_array_end (json_ctx); + json_element_object_end (json_ctx); +} + +int +test_main (void) +{ + json_ctx_t json_ctx; + + test_init (); + init_memset_distribution (); + memset (buf1, 1, MIN_PAGE_SIZE); + + json_init (&json_ctx, 0, stdout); + + json_document_begin (&json_ctx); + json_attr_string (&json_ctx, "timing_type", TIMING_TYPE); + + json_attr_object_begin (&json_ctx, "functions"); + json_attr_object_begin (&json_ctx, TEST_NAME); + json_attr_string (&json_ctx, "bench-variant", "random"); + + json_array_begin (&json_ctx, "ifuncs"); + FOR_EACH_IMPL (impl, 0) + json_element_string (&json_ctx, impl->name); + json_array_end (&json_ctx); + + json_array_begin (&json_ctx, "results"); + for (int i = MIN_SIZE; i <= MAX_SIZE; i = i * 2) + do_test (&json_ctx, i); + + json_array_end (&json_ctx); + json_attr_object_end (&json_ctx); + json_attr_object_end (&json_ctx); + json_document_end (&json_ctx); + + return ret; +} + +#include