Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/122954/?format=api
http://patchwork.dpdk.org/api/patches/122954/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230202124951.2915770-4-tduszynski@marvell.com/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20230202124951.2915770-4-tduszynski@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230202124951.2915770-4-tduszynski@marvell.com", "date": "2023-02-02T12:49:50", "name": "[v9,3/4] pmu: support reading Intel x86_64 PMU events in runtime", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f8af0fece42cb680a27f0a3b771ed995119138b8", "submitter": { "id": 2215, "url": "http://patchwork.dpdk.org/api/people/2215/?format=api", "name": "Tomasz Duszynski", "email": "tduszynski@marvell.com" }, "delegate": { "id": 24651, "url": "http://patchwork.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230202124951.2915770-4-tduszynski@marvell.com/mbox/", "series": [ { "id": 26761, "url": "http://patchwork.dpdk.org/api/series/26761/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=26761", "date": "2023-02-02T12:49:47", "name": "add support for self monitoring", "version": 9, "mbox": "http://patchwork.dpdk.org/series/26761/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/122954/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/122954/checks/", "tags": {}, "related": [], "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 4D39641BAE;\n\tThu, 2 Feb 2023 13:50:22 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A504C42F96;\n\tThu, 2 Feb 2023 13:50:14 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 2157C42F9A\n for <dev@dpdk.org>; Thu, 2 Feb 2023 13:50:13 +0100 (CET)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 3127RWqE030478; Thu, 2 Feb 2023 04:50:10 -0800", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nfjrj8335-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 02 Feb 2023 04:50:10 -0800", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.42;\n Thu, 2 Feb 2023 04:50:08 -0800", "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.42 via Frontend\n Transport; Thu, 2 Feb 2023 04:50:08 -0800", "from cavium-DT10.. (unknown [10.28.34.39])\n by maili.marvell.com (Postfix) with ESMTP id 2B0865B6926;\n Thu, 2 Feb 2023 04:50:04 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-type : content-transfer-encoding; s=pfpt0220;\n bh=+Jf+rjLqsk7CtmWTduDirWVGEh+QD0JRZyhswJOA4wY=;\n b=UZMO0IVlwqV5+Tqar5J274GrxJE3rhfkqIpmWs6/targz4bc7Vt9GtKSKY39TL/CC97a\n LMONKS8t/Qos24PHfVbKgHMCiuyrvcaJkbOADAfe/kaLW1pVFjb9YL2RI7DUgvupcgrV\n h7xDJNs8YU7vi0Lx17XsiAS52KtBREZe/coOfOGIprjDKnuo+Bs5sEYsHtgj/yF0Cd2O\n KuVBeD+gNlfu87stfZegB2fu2ph6wUsvEqSPjTx2ZGdcpkGiIiNhSrHD+PQ+V2gVQL6V\n BluwC0XKjIsrp5JjCbMz16gYcWN4czeI1oFqi7CYGvrcZG/ZBR10KOJf/FqgtLSPx2yJ RQ==", "From": "Tomasz Duszynski <tduszynski@marvell.com>", "To": "<dev@dpdk.org>, Tomasz Duszynski <tduszynski@marvell.com>", "CC": "<roretzla@linux.microsoft.com>, <Ruifeng.Wang@arm.com>,\n <bruce.richardson@intel.com>, <jerinj@marvell.com>,\n <mattias.ronnblom@ericsson.com>, <mb@smartsharesystems.com>,\n <thomas@monjalon.net>, <zhoumin@loongson.cn>", "Subject": "[PATCH v9 3/4] pmu: support reading Intel x86_64 PMU events in\n runtime", "Date": "Thu, 2 Feb 2023 13:49:50 +0100", "Message-ID": "<20230202124951.2915770-4-tduszynski@marvell.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20230202124951.2915770-1-tduszynski@marvell.com>", "References": "<20230202094358.2838758-1-tduszynski@marvell.com>\n <20230202124951.2915770-1-tduszynski@marvell.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"UTF-8\"", "Content-Transfer-Encoding": "8bit", "X-Proofpoint-ORIG-GUID": "B4wLO_Zjp2jYgrjUivv20CWv_TpVPo3j", "X-Proofpoint-GUID": "B4wLO_Zjp2jYgrjUivv20CWv_TpVPo3j", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1\n definitions=2023-02-02_04,2023-02-02_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>,\n <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>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Add support for reading Intel x86_64 PMU events in runtime.\n\nSigned-off-by: Tomasz Duszynski <tduszynski@marvell.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\n---\n app/test/test_pmu.c | 2 ++\n lib/pmu/meson.build | 1 +\n lib/pmu/rte_pmu.h | 2 ++\n lib/pmu/rte_pmu_pmc_x86_64.h | 24 ++++++++++++++++++++++++\n 4 files changed, 29 insertions(+)\n create mode 100644 lib/pmu/rte_pmu_pmc_x86_64.h", "diff": "diff --git a/app/test/test_pmu.c b/app/test/test_pmu.c\nindex 623e04b691..614395482f 100644\n--- a/app/test/test_pmu.c\n+++ b/app/test/test_pmu.c\n@@ -28,6 +28,8 @@ test_pmu_read(void)\n \n #if defined(RTE_ARCH_ARM64)\n \tevent = rte_pmu_add_event(\"cpu_cycles\");\n+#elif defined(RTE_ARCH_X86_64)\n+\tevent = rte_pmu_add_event(\"cpu-cycles\");\n #endif\n \n \twhile (tries--)\ndiff --git a/lib/pmu/meson.build b/lib/pmu/meson.build\nindex e857681137..5b92e5c4e3 100644\n--- a/lib/pmu/meson.build\n+++ b/lib/pmu/meson.build\n@@ -13,6 +13,7 @@ sources = files('rte_pmu.c')\n headers = files('rte_pmu.h')\n indirect_headers += files(\n 'rte_pmu_pmc_arm64.h',\n+ 'rte_pmu_pmc_x86_64.h',\n )\n \n if dpdk_conf.has('RTE_ARCH_ARM64')\ndiff --git a/lib/pmu/rte_pmu.h b/lib/pmu/rte_pmu.h\nindex b18938dab1..0f7004c31c 100644\n--- a/lib/pmu/rte_pmu.h\n+++ b/lib/pmu/rte_pmu.h\n@@ -28,6 +28,8 @@ extern \"C\" {\n \n #if defined(RTE_ARCH_ARM64)\n #include \"rte_pmu_pmc_arm64.h\"\n+#elif defined(RTE_ARCH_X86_64)\n+#include \"rte_pmu_pmc_x86_64.h\"\n #endif\n \n /** Maximum number of events in a group */\ndiff --git a/lib/pmu/rte_pmu_pmc_x86_64.h b/lib/pmu/rte_pmu_pmc_x86_64.h\nnew file mode 100644\nindex 0000000000..7b67466960\n--- /dev/null\n+++ b/lib/pmu/rte_pmu_pmc_x86_64.h\n@@ -0,0 +1,24 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2023 Marvell.\n+ */\n+#ifndef _RTE_PMU_PMC_X86_64_H_\n+#define _RTE_PMU_PMC_X86_64_H_\n+\n+#include <rte_common.h>\n+\n+static __rte_always_inline uint64_t\n+rte_pmu_pmc_read(int index)\n+{\n+\tuint64_t low, high;\n+\n+\tasm volatile(\n+\t\t\"rdpmc\\n\"\n+\t\t: \"=a\" (low), \"=d\" (high)\n+\t\t: \"c\" (index)\n+\t);\n+\n+\treturn low | (high << 32);\n+}\n+#define rte_pmu_pmc_read rte_pmu_pmc_read\n+\n+#endif /* _RTE_PMU_PMC_X86_64_H_ */\n", "prefixes": [ "v9", "3/4" ] }{ "id": 122954, "url": "