From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 466BD45B42; Tue, 15 Oct 2024 11:14:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7F5A4027D; Tue, 15 Oct 2024 11:14:58 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 8D91E400D7 for ; Tue, 15 Oct 2024 11:14:57 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49F25aMH012780; Tue, 15 Oct 2024 02:14:53 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2173.outbound.protection.outlook.com [104.47.58.173]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 4290y72dd6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Oct 2024 02:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=w1gegnKWQ5ncDl/BxieGlxJZHgnVsr7CKoPiMm4OS2gTyZbYr6D7Ko02xzVtpiNk1fSdUa2qMYE1QNnHyRn4VJXPezUtcRQfLATrY/9HucJ5mxPRGBxGi0RXxtJvJM+NggySAVkiGf7dQ7JKYkkHyKZqPtgRXKHg95l5Y/zbj/ElbjrSx5ClSd9CBjo9fyMd8IqRZwfOIuroHGDZHqOXXrq5d2fGxbXpu9iVADWcwLD2rpoDm6ZfLLu8KHd5nsAUpD8Z7UCcw4PqKb9xszQ5xUXWPtHSkhf5QOw9tS8zX4OWgqLWNStsM2edOvvPT9tf4YeknDxRsUwsjzP3HGcszA== 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=hLRDSACuWHFWpRcLwEUt7PvFuqScxPE0Z1VoWOjy7Gg=; b=CwW2klAAlRks6X498aqNQoUMNZKRsiszc2BH7x/1MBj2TPiPEOOpBDl7OyXjGlG15WgXgOWCN3vjyktMd+CbpcXtyvakCIrLma+M3mTJzmnjY4RyQ/3Z6XiAhBex5tZuEtZvApnPt6AFPmxmD1BVLBizef5Qppv1bqVMaP2/bxpxjhyBTrMMH4WKHDn/N+yPuA8s3RJdNjrSgFeJwZjcfC06ft3vJIwXOv1OBzQ5rbh/9zxAFeVv/td3GQmS3WgvdF2sTF7seQkTOtDQKnLM/ZZjH66Fn+4x7rEKrTYZ+exNmp5wO8cP+6jbbQIcoF6kufZstPRrjTVdVHt5FCrGMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hLRDSACuWHFWpRcLwEUt7PvFuqScxPE0Z1VoWOjy7Gg=; b=K28vfiu4VvAA9vnNuV5WGNgV1MqZg5YxNxF5XmxbzSFB75ng6SF5FAnwu3uKKxHQqRb018wATyjY0/dgaWDhQ493ofpIj2WnrIJtiddRPZxe5D7I0CjsiRbRdyqOe4TlkkA/vFsI0BO2ZIU6b10wIcQSdZ8AZtYj4Emw4Rtn1eU= Received: from DM4PR18MB4368.namprd18.prod.outlook.com (2603:10b6:5:39d::6) by SA1PR18MB4679.namprd18.prod.outlook.com (2603:10b6:806:1d6::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.28; Tue, 15 Oct 2024 09:14:50 +0000 Received: from DM4PR18MB4368.namprd18.prod.outlook.com ([fe80::1679:98:2091:7e98]) by DM4PR18MB4368.namprd18.prod.outlook.com ([fe80::1679:98:2091:7e98%7]) with mapi id 15.20.8048.020; Tue, 15 Oct 2024 09:14:50 +0000 From: Tomasz Duszynski To: Stephen Hemminger , Konstantin Ananyev CC: Thomas Monjalon , "Ruifeng.Wang@arm.com" , "bruce.richardson@intel.com" , "david.marchand@redhat.com" , "dev@dpdk.org" , Jerin Jacob , "konstantin.v.ananyev@yandex.ru" , "mattias.ronnblom@ericsson.com" , "mb@smartsharesystems.com" , "roretzla@linux.microsoft.com" , "zhoumin@loongson.cn" Subject: RE: [EXTERNAL] Re: [PATCH v14 1/4] lib: add generic support for reading PMU events Thread-Topic: [EXTERNAL] Re: [PATCH v14 1/4] lib: add generic support for reading PMU events Thread-Index: AQHbG8Lz18C3AnVickC0ZF6x2leNf7KBcZIAgAAn9QCABfOGQA== Date: Tue, 15 Oct 2024 09:14:49 +0000 Message-ID: References: <20241009112308.2973903-1-tduszynski@marvell.com> <20241011094944.3586051-1-tduszynski@marvell.com> <20241011094944.3586051-2-tduszynski@marvell.com> <660c6a2a24fd4cd785333881208fb659@huawei.com> <20241011071904.6f8064c7@hermes.local> In-Reply-To: <20241011071904.6f8064c7@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR18MB4368:EE_|SA1PR18MB4679:EE_ x-ms-office365-filtering-correlation-id: 12fdda09-be65-4330-1ab2-08dcecf9d254 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|7416014|366016|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?cnFhME9lYVZ1VzVIY1pkeHVJb3o5MXFoQ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:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR18MB4368.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(7416014)(366016)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?Y3JZOXloNlRhNGVKVlEwc2ZWU1NtTURiWldGL1lXYytqbU1ldklIbHVzZWRU?= =?utf-8?B?U2hGaUdwYnFncHd6NDczV016RWY4SWs0eFNhWE9NUnZ6RzhESCtyREJNMEQ3?= =?utf-8?B?TmVCdmlRSUJRZlVrRmdkM0VueTFyaFJaRVRzKzdKTFVWUTBPZm82NFVRNWxn?= =?utf-8?B?NlpsRVBtOXdma21tQ09Td0hSbDNuZS9jbnd3WXpMNE1NdEl4Q0hCaUxPTWF2?= =?utf-8?B?ek1mcDBFbzFFU0x1OFR5RG5XV2pRZFNqMmxwVzBFRHQyLzRWYzBCeFBNNWtB?= =?utf-8?B?OUpuc0RkRi9jWk9vdEM5NmN0TlduRDdwNkY1WXhoMXJzMlpYd3FZckg5c2hw?= =?utf-8?B?N3lZelBvaW9wbmFkQ1dxM01Lb05VR2gvZEFKRnE3bHNGeFhxUEh4TlhnR1BU?= =?utf-8?B?bnJvWUdEbDQvNTIzQ1AvR3FzVGRIT2dkdEdRbVgvbHpMMGUxMURjekY4eE82?= =?utf-8?B?MklBT1ZmdklJSGZCMHl2cDY0N0pJYWZTZFBQOUhCQ0l4OURiaTFLeTUyV1RL?= =?utf-8?B?QTZXT1NwbVk0bVFjYlFnUC9KSFRmdmVra3p4Q3E5VWJXM3FZVXZEWjRnMG9v?= =?utf-8?B?SVhDUEU3Ymhmb2VEYnJJTEU3d2FIWHVzOVlGR09OVGVqUjYrZFlJS09QT0pP?= =?utf-8?B?R1grWWRQdXEyUko1L3RPMWRmTFZiUkNWdHpHRE1veGZGNC95eUhkampVMXk3?= =?utf-8?B?ckJ0RCsyUE4vWnpKb25kclZDU3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DhKeURLSWJCNnFaSjkyVW5iN0RGblNIZGtyV0luM3h0UUZCV1hkbFh0?= =?utf-8?B?YTJOS1VQemRpTkwvK2hrUE00WFg5NEsrMllBK3QrQURrOGFlZXpBV0UreXh3?= =?utf-8?B?Q2hSaktJM2IyMThTSUJTd0R3V29zRWZCMUc5dW1lOUhDNWI1Sld3Y3ZWZlpD?= =?utf-8?B?VVIzSlV2TmdPZjVVeDdlT0U5MWFqSVArUE1lV3pPQnRsQTlYZmhxUnExYXNF?= =?utf-8?B?d3JaMDVSdHFPVUtjaXp4cjVpZVV4LzhudldzMEtwbWV2c3Q1Vi9YUkVUdEVM?= =?utf-8?B?MER2UHY5R09UWW5OS2tYOHBrQ0dPVEdJL1RaNkcyWDR5d3kyOEJpVEtzMHJO?= =?utf-8?B?V2drV1Q3UTBld2lwVUVMa1JyMFczalN5a0Z2WVh3TEdma29wZTZMdTVWdG9N?= =?utf-8?B?WFpNWUFwUlJKOWhGVks2SkNqVDVIbXhKeWkrdFJJRUNtME1NazdGSmMzL1E4?= =?utf-8?Q?K0B8Q6ZVhH5DLE2gAgtYTtCVE?= MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR18MB4368.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12fdda09-be65-4330-1ab2-08dcecf9d254 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2024 09:14:49.8978 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: L2PixeVixYGBWXUzuNSmZa0GU5m/fAqzfv7v0qelOt0PX3WXTv5IWOpE1DfLtleBReEcvaGPbJM25wmxWAg4Kw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR18MB4679 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: svmbarTWRPZ3OGhrRRQCsnddFgL5ZL1s X-Proofpoint-ORIG-GUID: svmbarTWRPZ3OGhrRRQCsnddFgL5ZL1s X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org >-----Original Message----- >From: Stephen Hemminger >Sent: Friday, October 11, 2024 4:19 PM >To: Konstantin Ananyev >Cc: Tomasz Duszynski ; Thomas Monjalon ; >Ruifeng.Wang@arm.com; bruce.richardson@intel.com; david.marchand@redhat.co= m; dev@dpdk.org; Jerin >Jacob ; konstantin.v.ananyev@yandex.ru; mattias.ronnbl= om@ericsson.com; >mb@smartsharesystems.com; roretzla@linux.microsoft.com; zhoumin@loongson.cn >Subject: [EXTERNAL] Re: [PATCH v14 1/4] lib: add generic support for readi= ng PMU events > >On Fri, 11 Oct 2024 11:=E2=80=8A56:=E2=80=8A04 +0000 Konstantin Ananyev wrote: > >> + * > > + * @return > > + * 0 in case of success, negative value otherwi= se. > > + */ > > >+__rte_experimental=20 >On Fri, 11 Oct 2024 11:56:04 +0000 >Konstantin Ananyev wrote: > >> > + * >> > + * @return >> > + * 0 in case of success, negative value otherwise. >> > + */ >> > +__rte_experimental >> > +int >> > +rte_pmu_init(void); >> > + >> > +/** >> > + * @warning >> > + * @b EXPERIMENTAL: this API may change without prior notice >> > + * >> > + * Finalize PMU library. This should be called after PMU counters are= no longer being read. >> > + */ >> > +__rte_experimental >> > +void >> > +rte_pmu_fini(void); >> >> Hmm..., why _fini_() is allowed to be called directly while _init_() doe= sn't? > >Is this handled by destructor, called from rte_eal_cleanup() and/or testpm= d? If fast tracepoint is enabled then this is called by eal_trace_fini() which= is called by eal_trace_cleanup().=20 If fast tracepoint is disabled user should call it himself. Though, that co= unter reading works best with fast trace point because everything is handle= d automatically.=20