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 9EED445C82; Tue, 5 Nov 2024 05:04:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 697954060B; Tue, 5 Nov 2024 05:04:41 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 15FC84028E for ; Tue, 5 Nov 2024 05:04:38 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4A4IBOFJ005167; Mon, 4 Nov 2024 20:04:35 -0800 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 42q3b210y9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Nov 2024 20:04:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=k0AIgx1vQ3SbPs32UKZ4ad+O3X7+ZVnDbl5ZeQlkS7gLgEhvBHcvFwsmAaRYtcCvCV6zt0eK9Pmi6Ffbt1YLRqepkawPOpOx8z6Zxopu47Ft9cvm/4izp0BGudoDKgcNcAMCtpO3/TwbZI1O5ZopIWA+gW0saT9CLwGm57WmWFCqGS98X1ttXQaQtE8f563te4WasbZHcnIJdsc7Jz7F3u/Vciy6JvyZ6lruLX4bamQRItI+7e/eJMoIRMGBoFrwKGiX5umBM4MnUPjTpcgjPRiXwYN0HZraUfcLpJVlEZZSdCqUP2po/8eVeZV7W27n0UCNMqeitq+vQZxjet/M1Q== 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=Bph/s5onswpV8rTdlg4yko+Qx6TVpq/1b6WYGA/oFJE=; b=VdBNDapgikNZY6NSZoF7zM21JKSJtVUjVw+bk5WMK+qJlXrvvBiwd12wpEbcSONBRZ6n9DAp5XsW0SSmby/6NWCc1mmCordniwu8hD6F3LKRpBCw7boq2S8l+ToKlQ0yF2HIGAogvBRNvyQ0E6WhHTJe0xZCew3OBA0N8g+mHPFjVLAGVX9rv/quQU1Hx3kPW0Sl15oJd09A1ueqUsUH5SpLcBLkyCPrbGGtNYMvSPs3C0AvVNlTEQqf2thA0nbdWmVZicpqbxRRteizEBpgk6qgoOl5YW3z+z1ZQD5xMm+SetATG3f6utDpmmzC6vZ30FZGgvFIa4ZKLREYGroUdg== 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=Bph/s5onswpV8rTdlg4yko+Qx6TVpq/1b6WYGA/oFJE=; b=bqZWqh0tWBDZD+HlR+G2aH/P/b0ts4KQuOeINOhi5eIDCxzBvpE7uu8chjcYxcBUFf+3Pd9kOkAETwnGcbjKtrdAZ5lr5ySr4vTNP5DMFyG8Np9wTjXLQ4STOaYVEV5r1ZQE/Xo2LmDtzWLDsSaOgE8g8qnKxR9Id/v7Jna2P0g= Received: from DM4PR18MB4368.namprd18.prod.outlook.com (2603:10b6:5:39d::6) by SA6PR18MB6203.namprd18.prod.outlook.com (2603:10b6:806:415::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Tue, 5 Nov 2024 04:04:32 +0000 Received: from DM4PR18MB4368.namprd18.prod.outlook.com ([fe80::1679:98:2091:7e98]) by DM4PR18MB4368.namprd18.prod.outlook.com ([fe80::1679:98:2091:7e98%6]) with mapi id 15.20.8114.028; Tue, 5 Nov 2024 04:04:32 +0000 From: Tomasz Duszynski To: Tomasz Duszynski CC: "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" , "stephen@networkplumber.org" , "thomas@monjalon.net" , "zhoumin@loongson.cn" Subject: RE: [PATCH v15 0/4] add support for self monitoring Thread-Topic: [PATCH v15 0/4] add support for self monitoring Thread-Index: AQHbJruI1Dgw1W18IkSr3SCELVLLILKoIMBQ Date: Tue, 5 Nov 2024 04:04:32 +0000 Message-ID: References: <20241011094944.3586051-1-tduszynski@marvell.com> <20241025085414.3412068-1-tduszynski@marvell.com> In-Reply-To: <20241025085414.3412068-1-tduszynski@marvell.com> 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_|SA6PR18MB6203:EE_ x-ms-office365-filtering-correlation-id: c3c17f42-bbf9-4392-4a35-08dcfd4ef408 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|376014|1800799024|7416014|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?Xgf6K3L1ZhzbLJtphbxUKDsN+1NNWc9swX6Td+6d9/z9vwlEbPK7poDxIXEa?= =?us-ascii?Q?e+CmrM1r7GAP2XWv5EQU1sBD/Xvovd9zOsT8HK4gVxqDEJs2dHjdC0xipC/W?= =?us-ascii?Q?7Q6SC8f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hK9GzdHM?= =?us-ascii?Q?F5aH6cs/OneKIR5iJwbOn1lvyuOaduAqUNwuEnRtdK0L0NicHt9a4wm6vVlc?= =?us-ascii?Q?kHODynxaNwc97QadVF+IJABW34GPX3PQvWHoRiRjBnRXNddcesy6s27n39U9?= =?us-ascii?Q?g6hMYm90OD2N+xerjMTZNxoP18HeWOsjcSGq1eQJwyT2QA50to1xYdZn5VEX?= =?us-ascii?Q?iKbgg95aMeRjA6u+42FwdzatHZocCMlw97YmqL96iT4f8BsESpaPqqOJwmod?= =?us-ascii?Q?iRPVlsFkIyH2UXSBalXPjbM6cwWQiXwTr3uik+k1yjA3Mppr2LAbm9H/rFXP?= =?us-ascii?Q?ir2qCW5l/5T1MXFn90cyPvQXsoMIJGVROMIAi6WLIO3eZD7V/53sLAEb/cuh?= =?us-ascii?Q?nHtV5R8=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR18MB4368.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024)(7416014)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Pi+Pdaxu1Dca9Hi0USJQA2inHzjh1y1S6N7Lwdr/3f9mSy0EYMCvhwRPwX8c?= =?us-ascii?Q?4WpmMMy96e1EoReBdpQUcldLFYv3kBnBI+TpIPhqrX8ANDI5wNO/FyqtnvX3?= =?us-ascii?Q?tntaHEbFqHBxA0SEKVe2zR/FGA42PzonUUfgDcnxT/U0mH7K/RPjR7KOG+n7?= =?us-ascii?Q?K3zF5gybNdwWC9EOMJrm7Yz0JzOZBFi0uxpV7jX/pghO++iLoCkLW0Svc7DC?= =?us-ascii?Q?mve44oxY4IqR3SHG5YnjPg4wbVTLKx9itiGUnVEc/tdc5Fz12JOnA9l8r1/e?= =?us-ascii?Q?x1moeZn8anEDiiPni6jP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i?= =?us-ascii?Q?3fm+no5hGfvbrjoy22kqNY7mt1pMHKIIfLUQ2OdnBz3R1nI/2KtD2uHA6d+b?= =?us-ascii?Q?jDs8WXGo4KMI1AknYnOtQwSpeTQYHAzeHmjf3oX+kYfjXeF0hxFwdfQErG2F?= =?us-ascii?Q?IVrkXrA4L4O75cznYXKXHJ5ZtIvuxVtRr/2/QFh0oEk6EPk7UQwfp3Gxr0vh?= =?us-ascii?Q?roRlz0OyOKFPpXHXdj2axVZPUtGBNmlctE/h0KUPwKkISZip1isj+su6QoL5?= =?us-ascii?Q?YxX/n1Q6T9v33m4FLvVwK6hpZAb8CfuitNW5Lirqx0AC48rR6EayHXv1F2gV?= =?us-ascii?Q?VtZsHiu4Au3UOxwOZNd1W+RjmPaBYHB+ViAtouuqoF2yegiW7mEAGnieGz46?= =?us-ascii?Q?QlQ5gSFtO6hg4RGwKQM2dNHT0XpdF+NlDjaE/Mx3?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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: c3c17f42-bbf9-4392-4a35-08dcfd4ef408 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2024 04:04:32.3150 (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: 8NygwEbazC/b5QM51v2KzVdcRRrpTTiAfMyvLFCNBMOj6XMDyQ4Vnhlxjz1HZ+ndMMsKZ6k4AK+/Tzi3VTbIVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA6PR18MB6203 X-Proofpoint-ORIG-GUID: 3ytp4fIEsqZ67XqPNZnQJIXd3FWgSgaO X-Proofpoint-GUID: 3ytp4fIEsqZ67XqPNZnQJIXd3FWgSgaO 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: Tomasz Duszynski >Sent: Friday, October 25, 2024 10:54 AM >To: Tomasz Duszynski >Cc: Ruifeng.Wang@arm.com; bruce.richardson@intel.com; david.marchand@redha= t.com; dev@dpdk.org; >Jerin Jacob ; konstantin.v.ananyev@yandex.ru; mattias.= ronnblom@ericsson.com; >mb@smartsharesystems.com; roretzla@linux.microsoft.com; stephen@networkplu= mber.org; >thomas@monjalon.net; zhoumin@loongson.cn >Subject: [PATCH v15 0/4] add support for self monitoring > >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 certai= n advantages when >application runs on isolated cores running dedicated tasks. > >Events can be read directly using rte_pmu_read() or using dedicated tracep= oint >rte_eal_trace_pmu_read(). The latter will cause events to be stored inside= CTF file. > >By design, all enabled events are grouped together and the same group is a= ttached to lcores that >use self monitoring funtionality. > >Events are enabled by names, which need to be read from standard location = under sysfs i.e > >/sys/bus/event_source/devices/PMU/events > >where PMU is a core pmu i.e one measuring cpu events. As of today raw even= ts are not supported. > >v15: >- add some basic logs related to API failures >- get rid of thread-local-storage >- do not support MT-safety (which was buggy anyway) in management APIs (rt= e_pmu_init(), > rte_pmu_fini(), rte_pmu_add_{event,events_by_pattern}() as it impacts rt= e_pmu_read() > performance because more logic needs to be incorporated to handle all co= rner cases >- improve documentation slightly >- various other improvements here and there >v14: >- replace __atomic_xxx with rte_atomic_xxx >- rebase to dpdk/main since that's a new feature >v13: >- allow init/fini calling from multiple contexts >- get rid of conditional compilation and return erors in case APIs are > used on unsupported OS >v12: >- rebase old series >- slightly refresh existing documentation >- make sure compiler won't optimize accesses to certain variables during > event readout >- drop previous Acked-by to respin a fresh review cycle >v11: >- skip fast test in case init fails >v10: >- check permissions before using counters >- do not use internal symbols in exported functions >- address review comments >v9: >- fix 'maybe-uninitialized' warning reported by CI >v8: >- just rebase series >v7: >- use per-lcore event group instead of global table index by lcore-id >- don't add pmu_autotest to fast tests because due to lack of suported > on every arch >v6: >- move codebase to the separate library >- address review comments >v5: >- address review comments >- fix sign extension while reading pmu on x86 >- fix regex mentioned in doc >- various minor changes/improvements here and there >v4: >- fix freeing mem detected by debug_autotest >v3: >- fix shared build >v2: >- fix problems reported by test build infra > >Tomasz Duszynski (4): > lib: add generic support for reading PMU events > pmu: support reading ARM PMU events in runtime > pmu: support reading Intel x86_64 PMU events in runtime > eal: add PMU support to tracing library > > MAINTAINERS | 5 + > app/test/meson.build | 1 + > app/test/test_pmu.c | 55 +++ > app/test/test_trace_perf.c | 10 + > doc/api/doxy-api-index.md | 3 +- > doc/api/doxy-api.conf.in | 1 + > doc/guides/prog_guide/profile_app.rst | 34 ++ > doc/guides/prog_guide/trace_lib.rst | 32 ++ > doc/guides/rel_notes/release_24_11.rst | 7 + > lib/eal/common/eal_common_trace.c | 5 +- > lib/eal/common/eal_common_trace_pmu.c | 38 ++ > lib/eal/common/eal_common_trace_points.c | 5 + > lib/eal/common/eal_trace.h | 4 + > lib/eal/common/meson.build | 1 + > lib/eal/include/rte_eal_trace.h | 11 + > lib/eal/meson.build | 3 + > lib/eal/version.map | 1 + > lib/meson.build | 1 + > lib/pmu/meson.build | 22 + > lib/pmu/pmu_arm64.c | 94 ++++ > lib/pmu/pmu_private.h | 32 ++ > lib/pmu/rte_pmu.c | 536 +++++++++++++++++++++++ > lib/pmu/rte_pmu.h | 229 ++++++++++ > lib/pmu/rte_pmu_pmc_arm64.h | 30 ++ > lib/pmu/rte_pmu_pmc_x86_64.h | 24 + > lib/pmu/version.map | 14 + > 26 files changed, 1196 insertions(+), 2 deletions(-) create mode 100644 = app/test/test_pmu.c >create mode 100644 lib/eal/common/eal_common_trace_pmu.c > create mode 100644 lib/pmu/meson.build > create mode 100644 lib/pmu/pmu_arm64.c > create mode 100644 lib/pmu/pmu_private.h create mode 100644 lib/pmu/rte_= pmu.c create mode 100644 >lib/pmu/rte_pmu.h create mode 100644 lib/pmu/rte_pmu_pmc_arm64.h create = mode 100644 >lib/pmu/rte_pmu_pmc_x86_64.h create mode 100644 lib/pmu/version.map > >-- >2.34.1 Hi,=20 Did anyone interested have a time to look into latest series? =20