Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 028C5C433F5 for ; Tue, 21 Dec 2021 08:25:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235564AbhLUIZk (ORCPT ); Tue, 21 Dec 2021 03:25:40 -0500 Received: from esa18.fujitsucc.c3s2.iphmx.com ([216.71.158.38]:40516 "EHLO esa18.fujitsucc.c3s2.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234882AbhLUIZi (ORCPT ); Tue, 21 Dec 2021 03:25:38 -0500 X-Greylist: delayed 428 seconds by postgrey-1.27 at vger.kernel.org; Tue, 21 Dec 2021 03:25:38 EST DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1640075139; x=1671611139; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=leLuW5M0w/kxejprJQIO678ts1KHdQeKyaT3AAB0+70=; b=qzMriaFKaKZcEdTNkCwI55ZyZYhc124QAYHO5aKRzXBlxRN0VGHrUiuz l2+HQjYPyuIZPXQofob2cLXHvA/z6gm/v7/pV5oG09tgw8RwAXGTHgR4m VFh4y1HqFwg5ELIBKm1KAusXk5MY4zXzg6gfWE4qVicZeswtT0pl2LxSd GTdBh9rcKtjA90p91U6yg0eNpKpcEICHlx/CMgjyJBe+z4eeaP5Cj1uf3 +E+8b2qK1z7nt8K+zneA43/O6/TjoBwLBIxbReLq/OJ3xcW7WVZpXEj9G XQc0IiI9r2Cv0EfL0xPbP8et4h8aQV9gmgJ+B75zJIDprjBDiSX1uuX9y g==; X-IronPort-AV: E=McAfee;i="6200,9189,10204"; a="47237113" X-IronPort-AV: E=Sophos;i="5.88,222,1635174000"; d="scan'208";a="47237113" Received: from mail-tycjpn01lp2168.outbound.protection.outlook.com (HELO JPN01-TYC-obe.outbound.protection.outlook.com) ([104.47.23.168]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2021 17:18:25 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g94IoXCAllgai6xCcAbwCgxSOR9+WHLjD0FCx9Ck3GDnu8TYsJu89+cxUdpZC4evCrWgJJreCSYxx/uV4WrW6HnuQeZCS0RShFI+uujwbT1MruoV4l8LAjmZutrahlyKt4uuJ3Fw7pcgRNQ4wiXmWhF5AECf00SOQItTJDXisMdkKyjM5NFyxma0+qdDPsEyru6Sw9Lk0ixwhnFUNaVeoVhgzE8Byq7oHDq6t+pzIaltFzK09XCd8GhxaEkjv4wQyC4vsgqOsqR8nIUdie40rPU3bznmMT43oQvkEI4wZe9WMRAk6WcxY8DENP8mBllhFHsc1a6uDZAIJVyNWqP1NQ== 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=T3SrEdiPGG5AeD20O1QZjkIwHzOy3CNY1JN7WZzttx8=; b=kYX+cvuSOJXhm4yQxQhqRPHVIJNmMNW8UF01DKUA3OCxRxQR/27hsjhcr/OtRggVCkD8bApmIM2zSj5fuwuWpuNIdYi/Q4fxKw7aYOr/SoCtVnLmXOxI64OxVUGenTJ52eNvtSjnjGKLi/qdyVLjTCJWA2movjDH9Arxq20a+tVVd6imdKi5rQjJbkvZcYgrlT29BIpLdD2vjhtkuAWQT2zbq5LiV+WiDTS5Jyik0fY6DnGth5/A1Ebu5Q66guXLVvFqbrkW45v/exd+6BDBm1fTgaAUFb/c7zaRPENdrpzgXgZHug54cynE3z06YjicNcj4tF1LugML9UnK9zWA+Q== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.onmicrosoft.com; s=selector2-fujitsu-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T3SrEdiPGG5AeD20O1QZjkIwHzOy3CNY1JN7WZzttx8=; b=b95W555/5ArqLPZ3WQ3Kw5BAuz3SBbEyeymni0arj7VXqiFRt6XOrrAjxRbMdE2kyvr7Uxj20w0IEzOcJndUJyQP0qZIZSmK+unnM54VZuRd6c1eb8WITXoc43kMUewPywmvluOloq6nMC9K+ikH3slIdi4GOhChLzM6EqBT+Yc= Received: from OSBPR01MB4600.jpnprd01.prod.outlook.com (2603:1096:604:7e::12) by OSAPR01MB5060.jpnprd01.prod.outlook.com (2603:1096:604:6e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.17; Tue, 21 Dec 2021 08:18:22 +0000 Received: from OSBPR01MB4600.jpnprd01.prod.outlook.com ([fe80::2c38:ad18:39de:3042]) by OSBPR01MB4600.jpnprd01.prod.outlook.com ([fe80::2c38:ad18:39de:3042%5]) with mapi id 15.20.4801.020; Tue, 21 Dec 2021 08:18:22 +0000 From: "nakamura.shun@fujitsu.com" To: Namhyung Kim CC: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Rob Herring , linux-kernel , linux-perf-users , Jiri Olsa Subject: Re: [PATCH v5 3/3] libperf tests: Add test_stat_multiplexing test Thread-Topic: [PATCH v5 3/3] libperf tests: Add test_stat_multiplexing test Thread-Index: AQHX60P0SRYTbqZ3XUqLA2y/FGhh0Kwq2moAgBHT2H4= Date: Tue, 21 Dec 2021 08:18:22 +0000 Message-ID: References: <20211207082245.604654-1-nakamura.shun@fujitsu.com> <20211207082245.604654-4-nakamura.shun@fujitsu.com> In-Reply-To: Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Enabled=True;MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_SiteId=a19f121d-81e1-4858-a9d8-736e267fd4c7;MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_SetDate=2021-12-21T08:18:22.221Z;MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Name=FUJITSU-RESTRICTED;MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_ContentBits=0;MSIP_Label_a7295cc1-d279-42ac-ab4d-3b0f4fece050_Method=Standard; suggested_attachment_session_id: cc9cf796-e099-07d0-cb9d-642225b29653 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=fujitsu.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 101379f0-4599-4e4d-f22b-08d9c45a744e x-ms-traffictypediagnostic: OSAPR01MB5060:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qBJ1NagcM7ty3f84b8eBwrWC+oBCBNFLRA9LDDZOKtLMqe6QnzlqCtzsNlzSDkvHZwqpznB4pHCYVOLLWN6mEtyY5SwB2YxwvzhvXnurbFIWFQIQjBvsAIIACgK2OHW8MafAH1Y9lpRd/OaQddqQuxR9Nz+jVyt31Q5pgRVDWY14ZElYJwDz57zDCXYGTFTqU+itkNs6bDpkZeNhbKEwzHU6OGiEo8THs53oqAggJ1uEf60m17irLsbfhtElWeYP/uwvrru/zozdi5e376iLs/H5dpe7Tl1ZGzg0LiWdaF/SVPNoimMUYMNN72dcYZXCeikT43D0FT2ocX6pDA6owiKvybiDyl5m0yVAUJYN3QteZSdHj7y8bTpANYtMmg/hwPER5dMUWNpQeoe3h3byZ10puhxZ87EwbE8ttOn/ImZirwwuqNMkEkF/SQdXM7Yw0Rq1l95gTGsD5FSdiNkDLwUQcjnDjRqYk7/dV5w2ni3G+QJ7I6q/I8YB4TM7B4se7hSFTtU6r3fyNQ+U3BDYmZL6XeDhLW++3Nn7z9GjHPyK98/MId8YZ2zNr8WOCnARKT1WR5LoilDI1iIU43sj7nru/eM9zdVX1rQCHnXBZkYM28rscJ3vz1ZHOTFJdc3jsTzoOBtB6AUCnTKzn7sY+1LvAYhZRD21sSOR8xWqPITxv3tCUILRwobvbzJA4GJ4CxVYqBGxohTMBpV4OzH2oA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OSBPR01MB4600.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(4326008)(26005)(86362001)(6916009)(55016003)(186003)(8676002)(71200400001)(8936002)(38070700005)(54906003)(316002)(7696005)(9686003)(33656002)(66556008)(76116006)(52536014)(38100700002)(83380400001)(66476007)(66446008)(82960400001)(2906002)(64756008)(91956017)(66946007)(85182001)(7416002)(5660300002)(122000001)(6506007)(508600001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?VjRPdWdjaWZKa0g3bVYzNUJSK1JMNXFrYlZHWDR3NHh0Q1VYckM3M0I2?= =?iso-2022-jp?B?dWtSc0hJU2xWcm5yUmFlVCt1UkZlZDlLMzR4QnZyQWRFTzU1U2MxaURs?= =?iso-2022-jp?B?YzA3bGpSNlhNWTRNZjZBT080L1pONzkvMVVvTkowWUtuUVViMlcrWTd3?= =?iso-2022-jp?B?ZDR4MVZpbHlpa0YzeTlLZEJpMU5sOTlaNlhaY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-2022-jp?B?QjRhM3dRWnVDMzdTcHUxRENmdnViN1hKZEhTMWtpbDB4WVZoVTRCVkxE?= =?iso-2022-jp?B?K2picnB2cXVaa1dndnFpS2FqdW9MbUNtOTNSbWQrQzE4ZGJDcU40R3Ji?= =?iso-2022-jp?B?SVlodzZzR1NRU3VRenRyM2YyRWtWK2xZelZ3Q2JUTlEwaEhaNDFHZmwv?= =?iso-2022-jp?B?M053UzYzWTRmYXFOZmgvYVpwWk9WZnBXODVkTHM2R253RHhFUDlqbmZV?= =?iso-2022-jp?B?SWxHTDB6ZTUrRFpnY2lIc2ZVZ0pWblY3elpwQmlmY1gxOWJYcnVnb3Fr?= =?iso-2022-jp?B?enY4Y3BmYnEzaW5wUk1QeE0vWXQxNUJlN1o1VE95NlRLVmQ3bzI5ckdK?= =?iso-2022-jp?B?THFwZ2ZQRks3RVJVZTdJZHhhNjV0QW1NdUpwd0dhOWJjOHFmK1RSb2sz?= =?iso-2022-jp?B?Z211YVRnPT0=?= 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: OSBPR01MB4600.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 101379f0-4599-4e4d-f22b-08d9c45a744e X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Dec 2021 08:18:22.6687 (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: pO+c2EEKsQZT+apDP2qvYn6vQ7Bdz5/yz0Fo4kt46PL0ssHpTQ5iv7mlDAetAvZkOZYIpf1pQ2kYPvReZ9aFvkTZChK1OzEGiOFYYFqV+iM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSAPR01MB5060 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Namhyung=0A= =0A= Sorry for the late reply.=0A= =0A= > > +static double display_error(long long average,=0A= > > + long long high,=0A= > > + long long low,=0A= > > + long long expected)=0A= > > +{=0A= > > + double error;=0A= > > +=0A= > > + error =3D (((double)average - expected) / expected) * 100.0;=0A= > > +=0A= > > + __T_VERBOSE(" Expected: %lld\n", expected);=0A= > > + __T_VERBOSE(" High: %lld Low: %lld Average: %lld\n",=0A= > > + high, low, average);=0A= > > +=0A= > > + __T_VERBOSE(" Average Error =3D %.2f%%\n", error);=0A= > > +=0A= > > + return error;=0A= > > +}=0A= > > +=0A= > > +static int test_stat_multiplexing(void)=0A= > > +{=0A= > > + struct perf_counts_values expected_counts =3D { .val =3D 0 };= =0A= > > + struct perf_counts_values counts[EVENT_NUM] =3D {{ .val =3D 0 }= ,};=0A= > > + struct perf_thread_map *threads;=0A= > > + struct perf_evlist *evlist;=0A= > > + struct perf_evsel *evsel;=0A= > > + struct perf_event_attr attr =3D {=0A= > > + .type =3D PERF_TYPE_HARDWARE,=0A= > > + .config =3D PERF_COUNT_HW_INSTRUCTIONS,=0A= > > + .read_format =3D PERF_FORMAT_TOTAL_TIME_ENABLED |=0A= > > + PERF_FORMAT_TOTAL_TIME_RUNNING,=0A= > > + .disabled =3D 1,=0A= > =0A= > It'd be nice if you use a less restrictive event attribute=0A= > so that we can test it on VM or with non-root.=0A= > =0A= > How about using SOFTWARE / CPU_CLOCKS with=0A= > exclude_kernel =3D 1 ?=0A= =0A= I'm currently working on adding a new API for libperf.=0A= So, I will respond to the above comments around the end of January.=0A= =0A= =0A= Best Regards=0A= Shunsuke=