From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2042.outbound.protection.outlook.com [40.107.104.42]) by sourceware.org (Postfix) with ESMTPS id 017DC3858D37 for ; Mon, 18 Mar 2024 15:17:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 017DC3858D37 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 017DC3858D37 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.104.42 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1710775039; cv=pass; b=CTb2HdwEN+Rfnd+BID47oiKC7xh5AQOhDm6W20ii+OfyOSI9tm3Wyrqv90QyqGF+SwL3u0PUR8b0dJuBTEfoQkBJMNfPv8YdLCczFZLM9XcealR4vmV6gbFpOvEtB+0VFW0UlzVBTL5BwSwqrFOIIdufbJRgJ0+SzlDysBGL2eY= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1710775039; c=relaxed/simple; bh=AJzDWhn0TVxEQhNGiHTAVFv+mfNLa1gmf58i4eQ/pKk=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=fwnwRkkMqDGYKOInwOjvPUgaVACLXSjurbZAKJYu2ffKg6I4D2kbblc/6SWua/vV1ucNxnZ9hfkT/YpVCbPzZ03L+14he2lMDt+IzJYcduUy0LHDHA+wNsPeUh/Yknr4GcSnS39APHISMiMo0Y/0bBJCa++2rklaL4N5o+KgAuA= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=WtUTdkW201Nyp8PKO/orf8bk9PpmXdghE2JPrNVU/jOSL1tCynW/0o1xELIAxQKJDjt6HJZBTTIOUHJT5gBhsErdqLWSPa/viRZ+TPRl1u4bnXMNkwV6hnR60A2qFLdXpaLgeIvEJ2O6SLhuDKDJzy2MwwfgicI+3KAh+zZA03v8lPYbKuMtmaqs3kN6XRJpQp2AFKm+S9OPXRbVWd2LuSQ4ETwCdK6p8VgeJM6Z4nts7S5if1j6SuS3mBiaqqd4SD8bA0KWHb8SMYDcBBjJukbm/6TvyRq68zGzCX8ObmMKqdxIxEw2RWBdWITv2klU3K9bfMgMlXIHNQY8+/x+CA== 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=zO01Q+XG4qGhSXBKDmkt9MrNry8i5n5eSfASSym1C78=; b=RTRKhej8BfeWCoxtgJUU4esCMhaYFnbSiQHdbM2/LXcZrdeFMcFvumYgVlt/6P3GGZnbUl2XE/1KyrK1d5Bkh33AS1uhglI1N1pwa3QZifoS0F0HItUwBGIF3Ct8jQCgOjj6cU1ZzIfkthVUHDOH1WPOI8BG4yCe5SHbpP662fDR8Is65dD83M4i2GLx5ly3l61cOhR7Nx6XNf/Q2lBr/V1Hs1/s/U818QHoYk0kWZ5481Z9IgBD0x5FWqT9skc9yq+/+M6fJn/EforjCZKmhSzsulLAccU6b8gaAI7SQtSnebyuIBEdcnxECUnzUT75zfwYiLh7OhI53bbJkmNt2A== 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=zO01Q+XG4qGhSXBKDmkt9MrNry8i5n5eSfASSym1C78=; b=BWH7Aq5k6RAH7JzYdwk9uT1+04ayBv1FovIm5poXzV0tu89kDet6MhufozGl+xfKzk7f8M925D6hqFySPnq0Io2Xf1GcSeUCuJC6XN0d9fIiyEF+YkmL967qDEL+Rz5lEAaDLxQ2nkiCVH24CuS9D8ZuoFGAc1Q5XGcjP9FNxAE= Received: from DUZPR01CA0233.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b4::17) by GV1PR08MB8059.eurprd08.prod.outlook.com (2603:10a6:150:95::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.25; Mon, 18 Mar 2024 15:17:09 +0000 Received: from DB5PEPF00014B91.eurprd02.prod.outlook.com (2603:10a6:10:4b4:cafe::3e) by DUZPR01CA0233.outlook.office365.com (2603:10a6:10:4b4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.39 via Frontend Transport; Mon, 18 Mar 2024 15:17:09 +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 DB5PEPF00014B91.mail.protection.outlook.com (10.167.8.229) 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:17:09 +0000 Received: ("Tessian outbound ff4e98f65004:v300"); Mon, 18 Mar 2024 15:17:08 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c0e30e05088fc676 X-CR-MTA-TID: 64aa7808 Received: from 881bda044310.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 81F252CF-3FA9-4B71-8907-EC10731169F9.1; Mon, 18 Mar 2024 15:17:02 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 881bda044310.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 18 Mar 2024 15:17:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bDIBP0c/oMYv0YF4MaHGAICfCyiFyJDHEZ8CoUdROHo1x/arjqZlp0mnFeHkwcuMgXEl20K4UfCbWqwvsirfpaCame2PlvaNQnxqaIrP9z5CM9xjXLyGqZfWmfINmDqhofBxlCI4EJ1RKPWfezPmGZ/dbh7I4c4uriioeNZmyuyoO2d8I5/C78ZZ64MDg9uSJrc4P+IlhESNvhJcTm7wKuQvdXliu1pf4+7XliBwyfMxjd+x3qx+PtoBWZUJa7NGsK9xUTNHIN3qG0VXMyacxU92+574SvWEppi54vP27gJAVqy4iTSjHi5l/v2xaauHtVPeq+CRB87YTIpDQRokQQ== 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=zO01Q+XG4qGhSXBKDmkt9MrNry8i5n5eSfASSym1C78=; b=Tf0/hcEiBIrhLWCa77oQkuMYYjOb45NfwnKjC6b+m85/ez8FepZZlphbaH1XjLkYqiVapZ6EbeSMbjeV0TpEzX8x+IZFuONBoVj6vta7x+DMzag/DxdX/+nxNUVTU+lu1q0G/GjVceOGGZE/vJUC8ocEXTtg5LGj6rqKhOFE+/+fNMRbZ0OTV6AqXKLj8Xv4UubY8jk45BaNxLWz/mlIRc+OCTA9uryM41MmlBQPNo5Pdf0kiqcAqLtB+UFa/THcus5sZbHadZjFBXsOYmdHdmCTau/PXdVGf+2+9awXQTNXoo0JsFD5AsPGd2yyVQg6OYbPJ5mk/vsPL0WU/BbOAw== 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=zO01Q+XG4qGhSXBKDmkt9MrNry8i5n5eSfASSym1C78=; b=BWH7Aq5k6RAH7JzYdwk9uT1+04ayBv1FovIm5poXzV0tu89kDet6MhufozGl+xfKzk7f8M925D6hqFySPnq0Io2Xf1GcSeUCuJC6XN0d9fIiyEF+YkmL967qDEL+Rz5lEAaDLxQ2nkiCVH24CuS9D8ZuoFGAc1Q5XGcjP9FNxAE= Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by AM9PR08MB6035.eurprd08.prod.outlook.com (2603:10a6:20b:2d9::24) 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:17:01 +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:17:01 +0000 From: Wilco Dijkstra To: 'GNU C Library' Subject: [PATCH 1/2] Add random benchmark Thread-Topic: [PATCH 1/2] Add random benchmark Thread-Index: AQHaeUa7SB0YBnP+/0KfpQ11Qxb7yg== Date: Mon, 18 Mar 2024 15:17:01 +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_|AM9PR08MB6035:EE_|DB5PEPF00014B91:EE_|GV1PR08MB8059:EE_ X-MS-Office365-Filtering-Correlation-Id: d1a286d8-740e-46c0-0e62-08dc475e7ab1 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: eGNruZYHAK1Z0ZD0Nwn1O4CsLOa0YyySZwMvSwV/SrWaNmU1YxbDdwpjmuZ+MT/I/G6/C3yxkQ6GdpttGDR1KaYrzF8+802qqG8p0HyDC9qQkJdQSSCnEtrmLCTotvDc8nV8Xa6ZCJrKVL5Ur6f14iHmeiiIBtJjWZpXo4IfBpjcvBP3ldBSTyV4IPuWr1T7hNtJ7wQBGcX5pbe7o5UjmIu5mD72+gJvHhDq7C2IZmi8WEDrts1QE2lGqyM4zMHjpPQQsiErrJn6VSYh0z3mZueNv3q8L0Uic3zQoOkRYpd8y/qHqJ0v9CNL+VRNi3TF78HiCbVOhxy1Eh7N8A/kNKcDDuex+LGEDumeWreDBzEyNkzXduOznPnyghwy9EYCxcei9HsQl9UGbYkWkeSD+CsUSbLz3N/IGQp9ELqyuFSGkm4bp9feP9P/Ecz5U7GCDRfr35Q7PK7ed/IqCfBMzhbtWfQO03cRCvNP+8U5O9gIRyKj26jLiAHmJ81zx18xPlpntZaecS3NnX2fK9BAkBdNt9rmlkAcKhR3lTAnZI4q6AoiW5qBx15fby3xStsO0G97Bc9F5+pQPeRO/pbkhEX0/QOxggVrWv8v3mar8VNa12auoxvYq0INjpiTc63xlRVIQtgqAbg7qT9MK2HXIqnxldMRaS9zje9bzFzyX9o= 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: AM9PR08MB6035 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: DB5PEPF00014B91.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 723e9e5d-23e8-414c-e1e7-08dc475e7612 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tZRVa+NExJUeuZGSFg3Zab2Y/LUgHtC1HofOPRBcbLhPEXLLcpu+2vo7STbGHJymutpaQ/lwzK+K9m3S9UsfpMqsFgObje53yeX6hfCUeBr15Jyqm4tKr3w54pRn4OpVNYZG0BDHbgmPXbbNiPGIpBay6/cS32XQTb2emM6LtPwhJhto2AmWr17TL2i2WZzqW2bBdaEJiZ/0imfJxMvg9NSfDmQ90Lhal05QxBXDZJ4mBvOhnU6zkOhpIMkoijsoSQS13O5C7fjoBQguawebIUWrfWclSPOvH/F0Mnr2/hi/AybwWpFDW+fWWYAMFzLsInfm/dhUu1PrPLT16Ux5E6XlX6x5CsLHaGerh8GtDylYuNvIaQ3SGAW4wL2bgE4A8X9jO+OYzCADuJ9sHFWF6R9vtKlJwpnOcIGG0iWaBZET9WsXvvg1OxswVQddOaiRxqqPQZgOSiOowVqLz4kwZe1GR2TPcu1pVAqU8jJX0NvVm07u6xg55XxnStGisBmwTVyk2MvDJE4li2cECdR0/+qRk5UgjKbYcppuDQfDkAyRiKrWHHMUJk6GyA2j7pCF5zN0dgbSJu4SEn1uTKcqVoY/2fJ9GGv/j+ZAkMnL3QH1ftnP8iHXyK/ekXk11cZloXFcNL9DPxSglXby+9fuTcxGstYhXACeB5ejSVcmVhGQBi6zmeS7Q+L4id+6kFi29rxLMeb52A4QairmnPBcVw== 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)(36860700004)(376005)(82310400014)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2024 15:17:09.0377 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d1a286d8-740e-46c0-0e62-08dc475e7ab1 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: DB5PEPF00014B91.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8059 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,KAM_DMARC_NONE,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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= Add a simple benchmark to measure the overhead of internal libc locks in=0A= the random() implementation on both single- and multi-threaded cases.=0A= This relies on the implementation of random using internal locks to=0A= access shared global data, and that the runtime uses multi-threaded=0A= locking once a thread has been created (even after it finishes).=0A= =0A= OK for commit?=0A= =0A= ---=0A= =0A= diff --git a/benchtests/Makefile b/benchtests/Makefile=0A= index e1346bbda125be9fc2b216f9e8be3f2ee7cb0c4d..1ec14078ab73d7c1c0fa1d4d870= a075a66543a5c 100644=0A= --- a/benchtests/Makefile=0A= +++ b/benchtests/Makefile=0A= @@ -246,6 +246,7 @@ hash-benchset :=3D \=0A= =0A= stdlib-benchset :=3D \=0A= arc4random \=0A= + random-lock \=0A= strtod \=0A= # stdlib-benchset=0A= =0A= diff --git a/benchtests/bench-random-lock.c b/benchtests/bench-random-lock.= c=0A= new file mode 100644=0A= index 0000000000000000000000000000000000000000..29a02ae9ff3a81114e8dd7e1ddd= cb3309b92df6c=0A= --- /dev/null=0A= +++ b/benchtests/bench-random-lock.c=0A= @@ -0,0 +1,108 @@=0A= +/* Benchmark internal libc locking functions used in random.=0A= + Copyright (C) 2022-2023 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 "random-lock"=0A= +=0A= +#include =0A= +#include =0A= +#include =0A= +#include "bench-timing.h"=0A= +#include "json-lib.h"=0A= +=0A= +/* Modern cores run 20M iterations in about 1 second. */=0A= +#define NUM_ITERS 50000000=0A= +=0A= +json_ctx_t json_ctx;=0A= +=0A= +=0A= +/* Measure the overhead of __libc_lock_lock and __libc_lock_unlock by=0A= + calling random (). */=0A= +static void=0A= +bench_random_lock (size_t iters)=0A= +{=0A= + timing_t start, stop, total;=0A= +=0A= + srandom (0);=0A= +=0A= + /* Warmup to reduce variations due to frequency scaling. */=0A= + for (int i =3D 0; i < iters / 4; i++)=0A= + (void) random ();=0A= +=0A= + TIMING_NOW (start);=0A= +=0A= + for (int i =3D 0; i < iters; i++)=0A= + (void) random ();=0A= +=0A= + TIMING_NOW (stop);=0A= +=0A= + TIMING_DIFF (total, start, stop);=0A= +=0A= + json_element_double (&json_ctx, (double) total / (double) iters);=0A= +}=0A= +=0A= +static void *=0A= +thread_start (void *p)=0A= +{=0A= + return p;=0A= +}=0A= +=0A= +int=0A= +do_bench (void)=0A= +{=0A= + json_init (&json_ctx, 0, stdout);=0A= +=0A= + json_document_begin (&json_ctx);=0A= +=0A= + json_attr_string (&json_ctx, "timing_type", TIMING_TYPE);=0A= + json_attr_object_begin (&json_ctx, "functions");=0A= + json_attr_object_begin (&json_ctx, "random");=0A= + json_attr_string (&json_ctx, "bench-variant", "single-threaded");=0A= + json_array_begin (&json_ctx, "results");=0A= +=0A= + /* Run benchmark single threaded. */=0A= + bench_random_lock (NUM_ITERS);=0A= +=0A= + json_array_end (&json_ctx);=0A= + json_attr_object_end (&json_ctx);=0A= +=0A= + json_attr_object_begin (&json_ctx, "random");=0A= + json_attr_string (&json_ctx, "bench-variant", "multi-threaded");=0A= + json_array_begin (&json_ctx, "results");=0A= +=0A= + /* Start a short thread to force SINGLE_THREAD_P =3D=3D false. This rel= ies on=0A= + the runtime disabling single-threaded optimizations when multiple=0A= + threads are used, even after they finish. */=0A= +=0A= + pthread_t t;=0A= + pthread_create (&t, NULL, thread_start, NULL);=0A= + pthread_join (t, NULL);=0A= +=0A= + /* Repeat benchmark with single-threaded optimizations disabled. */=0A= + bench_random_lock (NUM_ITERS);=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= + return 0;=0A= +}=0A= +=0A= +#define TEST_FUNCTION do_bench ()=0A= +=0A= +#include "../test-skeleton.c"=0A= =0A=