From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2071.outbound.protection.outlook.com [40.107.22.71]) by sourceware.org (Postfix) with ESMTPS id BD2303855580 for ; Mon, 16 Jan 2023 18:35:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD2303855580 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=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=gaFfBRBFoj+ub5f7ryT8J4HnpvZ7oybNeMkMl01kQ/g=; b=IOlo145k2WnhyVfvsBUowCz8zLEogZ87k+Bk8QQ5sky8+tKBcdRMYTXtPkdfMM9ydwKhXxAj6bFsoaG6RA0u3KcK9ni6RaeKBPSNkqBqU+eY/Z18jXzPJMqNxkFMhI34v36AQABATY86EGJgykTUbbPkNo/Z9Gx4b2kHBRxRsyo= Received: from AS9PR06CA0594.eurprd06.prod.outlook.com (2603:10a6:20b:486::30) by GV1PR08MB8260.eurprd08.prod.outlook.com (2603:10a6:150:a1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Mon, 16 Jan 2023 18:35:43 +0000 Received: from VI1EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:486:cafe::e0) by AS9PR06CA0594.outlook.office365.com (2603:10a6:20b:486::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.19 via Frontend Transport; Mon, 16 Jan 2023 18:35:43 +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 VI1EUR03FT013.mail.protection.outlook.com (100.127.145.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13 via Frontend Transport; Mon, 16 Jan 2023 18:35:42 +0000 Received: ("Tessian outbound 0d7b2ab0f13d:v132"); Mon, 16 Jan 2023 18:35:41 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 01f98771ada45480 X-CR-MTA-TID: 64aa7808 Received: from d038959c6cb1.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 08F827ED-8834-4735-8CE9-9A9E3C7EEFF9.1; Mon, 16 Jan 2023 18:35:35 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d038959c6cb1.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 16 Jan 2023 18:35:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kyEJRKJF9JSU8fGt3qtQV6K4K+dm2GmI84SwRwoIKhhpzHqlylkFBU7GlpIYkq0x9hkPAWSc57d5Cw7sYkrAeSdQuObJOrZdxjIyn23UdwE6hX+RvlP0k8Scxi4XWJ3bhAC/6vlhpBegxIc5Ikt7P9N9bpoJlsCvoqjRYTwhoaEDMfXrVgcrd4zTS28v/VilGAhB3rn9pcfvSXL9mpmaR3RinQ9B61hRiEN9TtBWkcMKxK9qUx+klnfXGCi8oKq+qRgauaDZCFKRkdSAs28VJ0KuwAiwnhVBZq60wzjqgCgBrgm0XaMPZza2KSJX59ZLKqlhxXvo4ZX6P37cARh9Dg== 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=gaFfBRBFoj+ub5f7ryT8J4HnpvZ7oybNeMkMl01kQ/g=; b=d71hSAo6iOspdhSOfx7Nbw3Zkar4jmUY+6aFHIXKQVAyQcl/Gekkdy1xQEEIna8eX079mm8jgo4IInBAOYeod8MCqOCNZE5RotInuDqFkd+KY7umS72IXoBgbrxsf2kOF7p0vPo3p6kEFcX3/07IOVKEAdubvRWF7wZJMuM5mvS8nIV490HS8qC0VfpHv8wNg4Yavgu/+reWuUItanDqNB67isItB8nNw4H9coiRvdn48eqCBfCNd9WA4xpPFoYZAeHKifAcOM5qMXI+D5nfzJjqryxBhneke1IOXQMPNvLDOjjF03/XvDa/bLsmUc6kzeGrGqPuHWxtDHIJlGoMhw== 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=gaFfBRBFoj+ub5f7ryT8J4HnpvZ7oybNeMkMl01kQ/g=; b=IOlo145k2WnhyVfvsBUowCz8zLEogZ87k+Bk8QQ5sky8+tKBcdRMYTXtPkdfMM9ydwKhXxAj6bFsoaG6RA0u3KcK9ni6RaeKBPSNkqBqU+eY/Z18jXzPJMqNxkFMhI34v36AQABATY86EGJgykTUbbPkNo/Z9Gx4b2kHBRxRsyo= Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by AM9PR08MB6659.eurprd08.prod.outlook.com (2603:10a6:20b:30a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Mon, 16 Jan 2023 18:35:30 +0000 Received: from PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::66e4:4940:d096:4f7]) by PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::66e4:4940:d096:4f7%9]) with mapi id 15.20.5986.023; Mon, 16 Jan 2023 18:35:30 +0000 From: Wilco Dijkstra To: Noah Goldstein CC: Zack Weinberg , "Tang, Jun" , GNU libc development Subject: Re: bug fix for hp-timing.h (aarch64) Thread-Topic: bug fix for hp-timing.h (aarch64) Thread-Index: AQHZJg3QVFAnSPDyTkassNg7m1D9266a2aDggAApOnOAAB+IAIAACcQcgAAXFQCABe7qgYAAGfYAgAAOMgo= Date: Mon, 16 Jan 2023 18:35:29 +0000 Message-ID: References: <31276f46-5376-4c2c-85c7-ffa08e9a771d@app.fastmail.com> In-Reply-To: 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_|AM9PR08MB6659:EE_|VI1EUR03FT013:EE_|GV1PR08MB8260:EE_ X-MS-Office365-Filtering-Correlation-Id: 00e7a605-0c0d-4a28-8cea-08daf7f0791a 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: hyHPc1E3tLEJ+Ef8MEm2dscJRnCcyuuezJxuesKx6lApJZLrAroNO6mpUY3atSB79LcN6GgBbG7/Pxv328yBWI7ZHhb4hvei+2edUt66qXqYnw0ZCvc2yyykQ0VtKw9pqWGup/afhrypSG+sgL2EOlp3xMZ8qjJmILoEZUQc5l2azfCAukBw6TriYrfqBr4q0DgcgQ3cFg1dVlweZpvL7bC3N/VzrwzhOfBD9KpmwCUV0dCCGYDCsnzGx2Ir2yR+95FPlEaBeZDuc3Cv3OQS7RVtkVpLAg0spwWI6UYZdiDgLWs8C0thO91KtIkCNim0hPRTFtohBHWbIpiThdsseW+9xWbrLJ9/O+o5opXc/Ir0c7W0Vmze17PcCagDKhXrldZ2j4Q889k4825ueiHx9mNpHXkzurjJpes7u3IQ9kEDvW3SfJJF6021DXDihuyEuiGHZ8q5dpvRRA9BVnkB6X8yX5DwFdqFjzhdfB6iIAaxWpMxV6B5ZdpMB0yw3cIKkxEQNvJ5zTjbBEk2a1b7q218GUYdxKvQZiN8kJwoZQr0W9JyzKXrk33O8ljtJbJjkUfTgUFcdsl5qi7NO2v+wD1eSk9OxwCnixqV6EMGkqjpxAV1kV2CcT/wIR8owq5FcFodrIqh6DYCx6Co3pxOUpVbSX3y0C9IxIZv0dcMW9jSfnF3X1qmtj3E0uietikiH9cnH1gQ/xhbzpiz3HDPXA== 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:(13230022)(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(451199015)(2906002)(26005)(54906003)(83380400001)(38070700005)(9686003)(86362001)(7696005)(55016003)(6506007)(41300700001)(33656002)(478600001)(316002)(186003)(4326008)(52536014)(66446008)(71200400001)(8936002)(66556008)(122000001)(64756008)(6916009)(66946007)(38100700002)(8676002)(76116006)(66476007)(91956017)(5660300002);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: AM9PR08MB6659 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: VI1EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 06b1b2ef-5e0e-431e-1fe1-08daf7f07180 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5yEMSQywOck2DUctOn6KXVt3BnXHHxaU7ocfHwKkhvlMshsMOlB/DE+YABxW8fIYZBBUCZpJpBhzHCDwPVly6KpJWa8W+dK4KLF1fc0SZw5UWM3gd0JPesiWo3eruWAMf68vbQKFl+kdtSfL/G6npJZGcixZYe632PokkXJvznC9AkrgPFMQGEGuESsFAvD6fMPuiddr09stcv4/BZ59FFZrjfFQQK+Sp/KvA0m/ZQIdMqgBsyARH63/sxWFERDxAj6rlE13FNNfGCvXNeD6hk+0WIItgVy5WHwkg9pzX2CGfG7zwEubLpDnyEFgEWNYzu/+GQHAkM5vLwIPSNtDcFnS5T+AfDguoF565RNGoQ/aMCngCzLEkxy+8u2CG3OLsmg1J2m+GTGnBK9IYhD/0JropGtd58rLrCAz5HfSZvUYWKWjhdpZf/roJRsYD6m+ZVgCSvgF5j6QcCK7Q/Ne3fLMKCjWkAL56LA3CochkeSyA3C4pCokHucmsd3Nn3EsKWYP6hH2lohmoo8RyqoadP0IlibZlLq70bQVtc+4xRe4caEdDk3KMkMDzqKRidSkywmo/RwwxVx7ukJRtlfkZQljHaVVAjyuv5YiSRj0dTj0xe/f4OSNjkOzDKMvWUxqFCjWAYrsKAtr/e9V+KGkb2fXo2x3FcdZpO4qjW+YHOBqtpWA8fN5Ipy2bO87tYyiSPClEbC2vhHl/qfjTJNtFA== 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:(13230022)(4636009)(376002)(346002)(396003)(39860400002)(136003)(451199015)(36840700001)(40470700004)(46966006)(40480700001)(33656002)(55016003)(40460700003)(47076005)(41300700001)(4326008)(5660300002)(70206006)(83380400001)(70586007)(8676002)(6506007)(52536014)(6862004)(8936002)(186003)(26005)(9686003)(336012)(478600001)(54906003)(7696005)(316002)(82310400005)(86362001)(356005)(2906002)(36860700001)(82740400003)(81166007);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2023 18:35:42.1091 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00e7a605-0c0d-4a28-8cea-08daf7f0791a 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: VI1EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8260 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Noah,=0A= =0A= >> Many benchtests run a fixed number of iterations on varying inputs (eg.= =0A= >> string of size 1 vs 10000), so you wouldn't statically know which timer = to use.=0A= >> Targets that have timer overflow issues (eg. Alpha) don't use it at all = in the=0A= >> benchtests.=0A= >=0A= > You could probably estimate with a static number of iterations but payloa= ds=0A= > can be order of magnitude different i.e long strstr inputs vs short=0A= > memset.=0A= =0A= Yes, the iteration count remains fixed for all subtests while the inputs (a= nd time=0A= taken) vary by several orders of magnitude. So a single benchmark could rep= ort=0A= inaccurate results on small inputs due to not running long enough and on la= rge=0A= inputs due to running for too long...=0A= =0A= > How about then 3 APIs?=0A= >=0A= > `TIMING_NOW` -> statically choose `TIMING_NOW_SHORT` vs `TIMING_NOW_LONG`= =0A= > based on iter count, then explicit timers?=0A= =0A= I'm still not sure what you're trying to solve here - the underlying proble= m is not=0A= the timers but the fixed iteration counts. We could scale iteration counts = based on=0A= input size or the time it takes for that input.=0A= =0A= Cheers,=0A= Wilco=