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 72F90A0093; Tue, 29 Nov 2022 11:42:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6620F40691; Tue, 29 Nov 2022 11:42:47 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id B2BF74067E for ; Tue, 29 Nov 2022 11:42:46 +0100 (CET) Content-class: urn:content-classes:message Subject: RE: [PATCH v3 0/4] add support for self monitoring MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Tue, 29 Nov 2022 11:42:45 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87526@smartserver.smartshare.dk> X-MimeOLE: Produced By Microsoft Exchange V6.5 In-Reply-To: <20221129092821.1304853-1-tduszynski@marvell.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v3 0/4] add support for self monitoring Thread-Index: AdkD1Pbkdix60IPTStOaP151EqeSsgABzrjw References: <20221121121121.3917194-1-tduszynski@marvell.com> <20221129092821.1304853-1-tduszynski@marvell.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Tomasz Duszynski" , Cc: , 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 > From: Tomasz Duszynski [mailto:tduszynski@marvell.com] > Sent: Tuesday, 29 November 2022 10.28 >=20 > This series adds self monitoring support i.e allows to configure and > read performance measurement unit (PMU) counters in runtime without > using perf utility. This has certain adventages when application runs > on > isolated cores with nohz_full kernel parameter. >=20 > Events can be read directly using rte_pmu_read() or using dedicated > tracepoint rte_eal_trace_pmu_read(). The latter will cause events to = be > stored inside CTF file. >=20 > By design, all enabled events are grouped together and the same group > is attached to lcores that use self monitoring funtionality. >=20 > Events are enabled by names, which need to be read from standard > location under sysfs i.e >=20 > /sys/bus/event_source/devices/PMU/events >=20 > where PMU is a core pmu i.e one measuring cpu events. As of today > raw events are not supported. Hi Thomasz, I am very interested in this patch series for fast path profiling = purposes. (Not using EAL trace, but our proprietary profiler.) However, it seems that rte_pmu_read() is quite longwinded, compared to = rte_pmu_pmc_read(). But perhaps I am just worrying too much, so I will ask: What is the = performance cost of using rte_pmu_read() - compared to = rte_pmu_pmc_read() - in the fast path? If there is a non-negligible difference, could you please provide an = example of how to configure PMU events and use rte_pmu_pmc_read() in an = application? I would primarily be interested in data cache misses and branch = mispredictions. But feel free to make your own choices for the example.