From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (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) by dcvr.yhbt.net (Postfix) with ESMTPS id B1E681F8C6 for ; Wed, 8 Sep 2021 02:03:47 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D2CA138515D9 for ; Wed, 8 Sep 2021 02:03:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2CA138515D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631066626; bh=RjNxf8ipAMHSSWzlT9AzpY4i/y82SYaMklG7D2Gnp1U=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Khds5yFBmxhqnrUUku9ZfwEv/QfAXTvpmR/ELPMSiEwuGeUTGPjoYPTQG4AN3xn9E /DxiamHHmzMMTka7OxevaygMwrw7EvCIu6S0hUCGW6SaUbybiBrX+YNO6/Xiq+m6Os 1iczBq4dYVgpVtBonTJlUH6cgd5zks1EHCn/qIMk= Received: from esa18.fujitsucc.c3s2.iphmx.com (esa18.fujitsucc.c3s2.iphmx.com [216.71.158.38]) by sourceware.org (Postfix) with ESMTPS id E62A53858C60 for ; Wed, 8 Sep 2021 02:03:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E62A53858C60 X-IronPort-AV: E=McAfee;i="6200,9189,10100"; a="39382617" X-IronPort-AV: E=Sophos;i="5.85,276,1624287600"; d="scan'208";a="39382617" Received: from mail-sg2apc01lp2053.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([104.47.125.53]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2021 11:03:21 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KXbQjqkzZRsf3LtilRvE5qgZ++nRIhcBmc14wbv+b3r90zfs7fcBblGrHFaagSNIqvM8ucHdOQJvQ06q/A60rUgH5wHkqG3/dGrufCruyJnLEg5lO09Bqg/EkQP+jw01QBJYQ5UDd9Pb1N4GB23HR5076mh8CDs/3LQPkJURJMDLNaqYJUo24tnGp2Sb5pglfNt32P3vloaHBLb+l5V9xGrDJlc6XXOFA3MjdXeyzC3iIVv2ayKmCmFE7bJyNdKA8DgkMTzOyXGxXCWCXTQv/Sxgg5ar4MdFPHZjd+Iq8Lr+ASeigXsQu4WU0uRm+nHKIkLgg2atM8VUly07yjvTyQ== 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; bh=RjNxf8ipAMHSSWzlT9AzpY4i/y82SYaMklG7D2Gnp1U=; b=IcHbbsDfXmexPJvPrqnj/p+bMGq8pdtgSutsyCJGrIM1VVw6VyrKnHaeSAQPAjCBNi66LIdWq5UsX2DLxWjJ2foPxJ0BiWZEqwse8fFYIS3UmE0uc4hzR66P+ZwRHkoCGiDcURMNp/IT0z3j0jWQ/eVxWD+UKrHW43nheEWMrhM7wSMXuDhiIvA58LZR/m4tLCjpZIwaunDEcHv/Qpdx1YD9fZ0LhW26yLr9ONQ1jz3XDaWoiKEnFmAod53ETqatA5GOkVPiP6sKiDgc7euDpb+ES9i9IMwTzhDcihF76L4+Eyn55/QxBP0icE9nLRwdEJeHxobStA8LbqNoltS5YQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fujitsu.com; dmarc=pass action=none header.from=fujitsu.com; dkim=pass header.d=fujitsu.com; arc=none Received: from TYAPR01MB6025.jpnprd01.prod.outlook.com (2603:1096:402:36::13) by TY2PR01MB2217.jpnprd01.prod.outlook.com (2603:1096:404:c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.20; Wed, 8 Sep 2021 02:03:18 +0000 Received: from TYAPR01MB6025.jpnprd01.prod.outlook.com ([fe80::cde6:2645:63a1:51b]) by TYAPR01MB6025.jpnprd01.prod.outlook.com ([fe80::cde6:2645:63a1:51b%9]) with mapi id 15.20.4478.025; Wed, 8 Sep 2021 02:03:18 +0000 To: "Lucas A. M. Magalhaes" , Wilco Dijkstra , Noah Goldstein , "libc-alpha@sourceware.org" Subject: RE: [PATCH v3 2/5] benchtests: Add memset zero fill benchtest Thread-Topic: [PATCH v3 2/5] benchtests: Add memset zero fill benchtest Thread-Index: AQHXic6jy6USnJyx5kO37MI1gLA1squZlv0w Date: Wed, 8 Sep 2021 02:03:18 +0000 Message-ID: References: <20210805074733.433430-1-naohirot@fujitsu.com> <20210805075053.433538-1-naohirot@fujitsu.com> In-Reply-To: <20210805075053.433538-1-naohirot@fujitsu.com> Accept-Language: en-001, ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-securitypolicycheck: OK by SHieldMailChecker v2.6.3 x-shieldmailcheckermailid: ca21f07c044c4fb9946ad9a6f91fcf12 msip_labels: MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Enabled=true; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_SetDate=2021-09-08T02:00:31Z; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Method=Standard; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Name=FUJITSU-RESTRICTED?; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_SiteId=a19f121d-81e1-4858-a9d8-736e267fd4c7; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_ActionId=5b79a8c2-7c7f-425b-acf0-02af19db2625; MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_ContentBits=0 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d68fff95-8e52-472a-c02f-08d9726cd412 x-ms-traffictypediagnostic: TY2PR01MB2217: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8hxDtvIlP83R1pw7jnvNAot4065Ri2zYY7BlbWzedTN3NjGOAynQIe/GZ4JO5NlvuB2YX/XzcRXXJgNAe/lDzV/BvM3Y1V7HmzCCnRtMkyy45KUjO7yPE6lzq8APg03myEvpTok8OK2qINg4gDyDcoeiBx+kPXRmIrct4Dh7koFhRxDd85PkSlyXY1mrXRvdgNrG4TxxAtd8df6zqH9ZS7K9IDx1d/LKKsFyhm6SsRWPPqfqq8Y0ueayV0Qgb+pPks3KVG8tRaXF0XGjTBVk+6QEDXJh/CZGKCEayUA7mLPWfURmFO7uJdjZsg9ouy71GOuyB9mniMn987blCGldMFYX9Km5vsFqnGZOJ0wWys2G35hbmPgI1+2Gjm5of1JPRPpOSl0coODv/LhH866Y3QhXCwxXM1zzgz0zWsONayjJHhLIjPoWyJQH0aey9os8temhE81gfg68CsDcW/AmLGxjsn+HkB79PXKFs3Ws3AB7XR6OKE3BXjqJa2w3KptvifTVEAWjJ5ABE+rVckl5Rq89uHELPr8f3uaB5Y0JwKUtNML4TQRyOJoSyWdQCw31506RXj5bRZ4NgjRBFrQemGZJNTYDjZ0M5TsbMtE8bc7Cd1tM8E3wLDSKGugpryNwOG87ytrRmXNkxZSTSuQtqVh0Gb3DLuEF/ajuyVw+XwhJsgdoF8zGZvoj4vbKeLwD8jLlSp+7hSyh4oUfcLWgt3vc53B9Q0fQmDNXY+bqECex5ouQJqyp40lUfkf9G1xWHVnXOrtXCg352uy9ewy5uKbjoCsraN7m5g2Y09bO8ZeBc2j3G0nGLHquLV+TrhLb x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYAPR01MB6025.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(39860400002)(376002)(136003)(396003)(85182001)(52536014)(66476007)(122000001)(76116006)(71200400001)(64756008)(66556008)(55016002)(9686003)(33656002)(53546011)(38070700005)(8676002)(7696005)(8936002)(66946007)(6506007)(66446008)(38100700002)(5660300002)(478600001)(26005)(83380400001)(110136005)(316002)(86362001)(2906002)(186003)(966005)(2004002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?RXd5WHhxUHNNTjRXTmtJbjZjRE5nc2J4OHVnUGIyYkZidit6c2hTVTNR?= =?iso-2022-jp?B?ZUpUUnE2WG82K252V0NlQURucTg1NGRvZXNHa2dMaVlWMkJpREh3MGcr?= =?iso-2022-jp?B?OGszWFA1REtjTHphb0x2R2NoMXVWY2hjTm8wTm83ZDAzTVFsVzhlQ2V5?= =?iso-2022-jp?B?QXgxUGlWZ2NPUFBXS3JUUC9qSDlmVmJsYXV2Sm01dFcyZXVRYTNNYW5H?= =?iso-2022-jp?B?L0RkV1NJd0Ruc3ZQLzFCdU55c0RKakZJZzFsUWdvSTFHeCtuMlN2aXhD?= =?iso-2022-jp?B?NEVoanN5YlpIa2hhMkxWMFpnRk1YSnNESkFCZmVoU3RYR0gzNVgxMjdC?= =?iso-2022-jp?B?NmV0SGl3TEVta1VCampMYlBNaElRT29BcUh0SDFCMjV5ai90bTQ0ZUdq?= =?iso-2022-jp?B?cDllOFI0Sll4Sndoa0VVYllITVRqLzZYcVZmdGxzOHhlaS9IMUJkWWtv?= =?iso-2022-jp?B?bnBmZzVodWNrMkhia2FsMDJ1V3dzaHBwWFMyb0UxMXNub2Ywa2JBZkZy?= =?iso-2022-jp?B?SDc0bUlleS9EUnJHeGxtckZIdmswUEtSbGxaSE1nM0txVjBNYkZPdGZ3?= =?iso-2022-jp?B?U1Y4eFdEdExodWY1UVppSkV1d0FZOCtNVlhXSEhsNFBMWTRiNTNQMVhG?= =?iso-2022-jp?B?di8rYXA1anNIUEdoTjhMak9ORGNZQ1VoL0RoVGdVcDZ0Qzk0QkI3blBz?= =?iso-2022-jp?B?Z0VaZHhNSHkxSjZqOHpYMWJWbDVMdVlpVTZRNVRNZVRDTG5VaGlaWUFL?= =?iso-2022-jp?B?ZVlKQlF4bUQ2c1huWStmM3F1UTRuYU93bFBWSzRFQWo3dko4UTA0U2hO?= =?iso-2022-jp?B?U0ZXSnZJdG4wN21TY244bFBXQ0RzMWxyS0llVERmTUQzRWlXK2VvWlpI?= =?iso-2022-jp?B?NUtETkJ6Wk13M2tqUzBzYlgrZnVBMVdoM1RQTkcvYUhzUTQ5Mmc3K1F6?= =?iso-2022-jp?B?OXR5SndSMnlka2Vid0x0Qm1OQkc2ZGtMa1dscGJ2amNzRVhiazF4Tk92?= =?iso-2022-jp?B?Y21qekhycVhhckROZStPd3RRWGhPWnJoajk3UWpwbk51U2VjUVZUcXlX?= =?iso-2022-jp?B?alFJUW4wWXgzRGErV0YzeXZQWjNaa2ZBVVJiSDdjZncxZWh3RjFFT25E?= =?iso-2022-jp?B?OEdzNDVtenBhcDVaaVc3TzlSMCtMYThqVWpDcDdsMUo4T3NXbFMzcU1y?= =?iso-2022-jp?B?eFl2RHZkVDB3QUpVTTR4R3p0aUVFNlJOREtadUp1UFZDbXJGNUlrYktj?= =?iso-2022-jp?B?SFdXaXpHOFRpN1dEbUp4bnlPcVVCMnhtc0h5d3IxdnowdVYxYmJlOVo5?= =?iso-2022-jp?B?NVh2TGpUZDYwUnk4UHQ1K015QmlFS3NZT2Vqa2VsWjRXdlRVWXJiZ1E4?= =?iso-2022-jp?B?SjRaeTNGc3FtUFlGbWN4eEVRVzc5TFE5QmZUZlZoV0s5Wjg5bmxjcmdn?= =?iso-2022-jp?B?WHNrSzduaGpDeDV3ZHk2THV3ZS9uTVo4ZEV2WnJtc2ZIRStobHR4Wkgx?= =?iso-2022-jp?B?U0pwVzVkRDgxRlNnSkFTNURqVFgvTEdKTkxZa3NzYWNUcnZZcFBmald6?= =?iso-2022-jp?B?cFdndjh3d1RZY09TV0ltenBWS1I4UUs0RFVLRjdYTCsrbDNUa3RkZCtZ?= =?iso-2022-jp?B?aTQxNE5WQlp2TUh1RFh0b3NYNlRKMm5VNDFnbFdxNktLRFBBb3VOWTVW?= =?iso-2022-jp?B?NTJJcFhRQmZuRFZUMVhsSC9sWVBpMktkbEl3WWZTSkpUZVJnbmMwSXM0?= =?iso-2022-jp?B?K21vYkxtVVNsazQ5YnF1VlhUYWYyQ01UR3dNWDJtT0tGajN4VjdBZWxu?= =?iso-2022-jp?B?L2lCYU4yNldETVBQbHZBM1MxdmYvbDQyUHZGYWQvdFVqK2JjeVdVcDdj?= =?iso-2022-jp?B?VVU1NHJFTDd5SFc1eEtUMkhscmJlcDhTWHYwTHUvMTIxcXorWEFQMEFJ?= Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: fujitsu.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TYAPR01MB6025.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d68fff95-8e52-472a-c02f-08d9726cd412 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2021 02:03:18.8862 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a19f121d-81e1-4858-a9d8-736e267fd4c7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: mI+p8PixdLXGfDCM5HvldvbNJOJpDkBIV0F2/et4HNtSVrYzql1R1NbhtqQOTDW75oZsrpreAJEhhUm4/ZhI5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR01MB2217 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: , From: naohirot--- via Libc-alpha Reply-To: "naohirot@fujitsu.com" Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" Hi Lucas, Wilco, Noah and all, Is there any comment? https://sourceware.org/pipermail/libc-alpha/2021-August/129839.html Thanks. Naohiro > -----Original Message----- > From: Naohiro Tamura > Sent: Thursday, August 5, 2021 4:51 PM > To: Lucas A. M. Magalhaes ; Wilco Dijkstra ; Noah Goldstein > ; libc-alpha@sourceware.org > Cc: Tamura, Naohiro/=1B$BEDB<=1B(B =1B$BD>9-=1B(B > Subject: [PATCH v3 2/5] benchtests: Add memset zero fill benchtest >=20 > Memset takes 0 as the second parameter in most cases. > However, we cannot measure the zero fill performance by > bench-memset.c, bench-memset-large.c and bench-memset-walk.c > precisely. > X86_64 micro-architecture has some zero-over-zero optimization, and > AArch64 micro-architecture also has some optimization for DC ZVA > instruction. > This patch provides bench-memset-zerofill.c which is suitable to > analyze the zero fill performance by comparing among 4 patterns, > zero-over-zero, zero-over-one, one-over-zero and one-over-one, from > 256B to 64MB(RAM) through L1, L2 and L3 caches. >=20 > The following commands are examples to analyze a JSON output, > bench-memset-zerofill.out, by 'jq' and 'plot_strings.py'. >=20 > 1) compare zero-over-zero performance >=20 > $ cat bench-memset-zerofill.out | \ > jq -r ' > .functions.memset."bench-variant"=3D"zerofill-0o0" | > del(.functions.memset.results[] | select(.char1 !=3D 0 or .char2 !=3D= 0)) > ' | \ > plot_strings.py -l -p thru -v - >=20 > 2) compare zero paformance >=20 > $ cat bench-memset-zerofill.out | \ > jq -r ' > .functions.memset."bench-variant"=3D"zerofill-zero" | > del(.functions.memset.results[] | select(.char2 !=3D 0)) > ' | \ > plot_strings.py -l -p thru -v - >=20 > 3) compare nonzero paformance >=20 > $ cat bench-memset-zerofill.out | \ > jq -r ' > .functions.memset."bench-variant"=3D"zerofill-nonzero" | > del(.functions.memset.results[] | select(.char2 =3D=3D 0)) > ' | \ > plot_strings.py -l -p thru -v - > --- > benchtests/Makefile | 2 +- > benchtests/bench-memset-zerofill.c | 134 +++++++++++++++++++++++++++++ > 2 files changed, 135 insertions(+), 1 deletion(-) > create mode 100644 benchtests/bench-memset-zerofill.c >=20 > diff --git a/benchtests/Makefile b/benchtests/Makefile > index 1530939a8ce8..21b95c736190 100644 > --- a/benchtests/Makefile > +++ b/benchtests/Makefile > @@ -53,7 +53,7 @@ string-benchset :=3D memccpy memchr memcmp memcpy memme= m memmove \ > strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \ > strspn strstr strcpy_chk stpcpy_chk memrchr strsep strtok \ > strcoll memcpy-large memcpy-random memmove-large memset-large \ > - memcpy-walk memset-walk memmove-walk > + memcpy-walk memset-walk memmove-walk memset-zerofill >=20 > # Build and run locale-dependent benchmarks only if we're building nativ= ely. > ifeq (no,$(cross-compiling)) > diff --git a/benchtests/bench-memset-zerofill.c b/benchtests/bench-memset= -zerofill.c > new file mode 100644 > index 000000000000..7aa7fe048574 > --- /dev/null > +++ b/benchtests/bench-memset-zerofill.c > @@ -0,0 +1,134 @@ > +/* Measure memset functions with zero fill data. > + Copyright (C) 2021 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 TEST_MAIN > +#define TEST_NAME "memset" > +#define START_SIZE 256 > +#define MIN_PAGE_SIZE (getpagesize () + 64 * 1024 * 1024) > +#define TIMEOUT (20 * 60) > +#include "bench-string.h" > + > +#include "json-lib.h" > + > +void *generic_memset (void *, int, size_t); > +typedef void *(*proto_t) (void *, int, size_t); > + > +IMPL (MEMSET, 1) > +IMPL (generic_memset, 0) > + > +static void > +__attribute__((noinline, noclone)) > +do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s, > + int c1 __attribute ((unused)), int c2 __attribute ((unused)), > + size_t n) > +{ > + size_t i, iters =3D 32; > + timing_t start, stop, cur, latency =3D 0; > + > + CALL (impl, s, c2, n); // warm up > + > + for (i =3D 0; i < iters; i++) > + { > + memset (s, c1, n); // alternation > + > + TIMING_NOW (start); > + > + CALL (impl, s, c2, n); > + > + TIMING_NOW (stop); > + TIMING_DIFF (cur, start, stop); > + TIMING_ACCUM (latency, cur); > + } > + > + json_element_double (json_ctx, (double) latency / (double) iters); > +} > + > +static void > +do_test (json_ctx_t *json_ctx, size_t align, int c1, int c2, size_t len) > +{ > + align &=3D getpagesize () - 1; > + if ((align + len) * sizeof (CHAR) > page_size) > + return; > + > + json_element_object_begin (json_ctx); > + json_attr_uint (json_ctx, "length", len); > + json_attr_uint (json_ctx, "alignment", align); > + json_attr_int (json_ctx, "char1", c1); > + json_attr_int (json_ctx, "char2", c2); > + json_array_begin (json_ctx, "timings"); > + > + FOR_EACH_IMPL (impl, 0) > + { > + do_one_test (json_ctx, impl, (CHAR *) (buf1) + align, c1, c2, len)= ; > + alloc_bufs (); > + } > + > + json_array_end (json_ctx); > + json_element_object_end (json_ctx); > +} > + > +int > +test_main (void) > +{ > + json_ctx_t json_ctx; > + size_t i; > + int c1, c2; > + > + test_init (); > + > + 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", "zerofill"); > + > + 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 (c1 =3D 0; c1 < 2; c1++) > + for (c2 =3D 0; c2 < 2; c2++) > + for (i =3D START_SIZE; i <=3D MIN_PAGE_SIZE; i <<=3D 1) > + { > + do_test (&json_ctx, 0, c1, c2, i); > + do_test (&json_ctx, 3, c1, c2, 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 > + > +#define libc_hidden_builtin_def(X) > +#define libc_hidden_def(X) > +#define libc_hidden_weak(X) > +#define weak_alias(X,Y) > +#undef MEMSET > +#define MEMSET generic_memset > +#include > -- > 2.17.1