[0/4] add support for self monitoring
Message ID | 20221111094338.2736065-1-tduszynski@marvell.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 66AA7A0542; Fri, 11 Nov 2022 10:43:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 519D142D0D; Fri, 11 Nov 2022 10:43:51 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 99BE1427F2 for <dev@dpdk.org>; Fri, 11 Nov 2022 10:43:49 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AB91EGf006339; Fri, 11 Nov 2022 01:43:48 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=+Lv0rD3J9uyQ5MZffSDRF8HtsoN6OtUS7zhJvJ/fHu4=; b=Q09RjGyIWwWt2zeiMmiGWX+jiuBfP/EUtFGvPa1hAQWOHzd0OSQTYMoTL7RWwonsgzlH V+ZTv7JIlbKZJBTqojSgpIBTd+Drx1phqXCaoihayK7sxyueeR22D3A7AffvHLpc8Pvu nQWZpTZ2spJk9j8Yx726PCLlL1bUX4fKo/xFKO/i6aW8cZrBNwrNFwJCyeqm+tDLZ95k U/TUbIpJuqrbkJ0oVFMel9Nd9LgIRiEo2yMFbCEWwZBqYHCmzDzR3jnXpoHxrTPme59I SdKcFVe6t0xiJPhNTclaujbAU0F7PDhs5IlH3CbZG+APPFphfslmt7iM4PsQ1rZhYZ7i dw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3kskck03vy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 11 Nov 2022 01:43:48 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 11 Nov 2022 01:43:46 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 11 Nov 2022 01:43:46 -0800 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id B7B613F704D; Fri, 11 Nov 2022 01:43:44 -0800 (PST) From: Tomasz Duszynski <tduszynski@marvell.com> To: <dev@dpdk.org>, <tduszynski@marvell.com> CC: <thomas@monjalon.net>, <jerinj@marvell.com> Subject: [PATCH 0/4] add support for self monitoring Date: Fri, 11 Nov 2022 10:43:34 +0100 Message-ID: <20221111094338.2736065-1-tduszynski@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: tkbBHgwfnzcaZQUI1M-zD3iBKJEMAPvz X-Proofpoint-ORIG-GUID: tkbBHgwfnzcaZQUI1M-zD3iBKJEMAPvz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-11_05,2022-11-09_01,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Message
Tomasz Duszynski
Nov. 11, 2022, 9:43 a.m. UTC
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. 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. By design, all enabled events are grouped together and the same group is attached 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 events are not supported. Tomasz Duszynski (4): eal: add generic support for reading PMU events eal/arm: support reading ARM PMU events in runtime eal/x86: support reading Intel PMU events in runtime eal: add PMU support to tracing library app/test/meson.build | 1 + app/test/test_pmu.c | 47 ++ app/test/test_trace_perf.c | 4 + doc/guides/prog_guide/profile_app.rst | 13 + doc/guides/prog_guide/trace_lib.rst | 32 ++ lib/eal/arm/include/meson.build | 1 + lib/eal/arm/include/rte_pmu_pmc.h | 37 ++ lib/eal/arm/meson.build | 4 + lib/eal/arm/rte_pmu.c | 103 +++++ lib/eal/common/eal_common_trace_points.c | 3 + lib/eal/common/meson.build | 3 + lib/eal/common/pmu_private.h | 41 ++ lib/eal/common/rte_pmu.c | 518 +++++++++++++++++++++++ lib/eal/include/meson.build | 1 + lib/eal/include/rte_eal_trace.h | 11 + lib/eal/include/rte_pmu.h | 207 +++++++++ lib/eal/linux/eal.c | 4 + lib/eal/version.map | 4 + lib/eal/x86/include/meson.build | 1 + lib/eal/x86/include/rte_pmu_pmc.h | 32 ++ 20 files changed, 1067 insertions(+) create mode 100644 app/test/test_pmu.c create mode 100644 lib/eal/arm/include/rte_pmu_pmc.h create mode 100644 lib/eal/arm/rte_pmu.c create mode 100644 lib/eal/common/pmu_private.h create mode 100644 lib/eal/common/rte_pmu.c create mode 100644 lib/eal/include/rte_pmu.h create mode 100644 lib/eal/x86/include/rte_pmu_pmc.h -- 2.25.1