From nobody Mon Feb 9 09:08:41 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1657777031010328.25044187554045; Wed, 13 Jul 2022 22:37:11 -0700 (PDT) Received: from localhost ([::1]:55486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBrXA-0000ne-1Y for importer@patchew.org; Thu, 14 Jul 2022 01:37:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBrV0-0008GQ-BZ; Thu, 14 Jul 2022 01:34:55 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:40687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBrUy-0004N6-2J; Thu, 14 Jul 2022 01:34:54 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id DD1ED3200933; Thu, 14 Jul 2022 01:34:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 14 Jul 2022 01:34:49 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Jul 2022 01:34:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1657776888; x=1657863288; bh=BbJk4TzUiI wgalk12IjsiqtyA2WUKLVgzCtw4uwy0TY=; b=Yk7H9z2cKmbW37XeAeeUqb5J6J NmgeSwJZ+48EcglOndiM9N5SeHromVrTZuCTneOoW3KMfOyqsoxTnkzxdzX5NuUv fxy4HmuVUtBpTNZ6k6eHb1C1MLoqmvdoIYLcYzf0/SGPq87bSoa7WdXBSNrgGZJ6 i5eafYJZPpLNnMIplJJJk34U2WKPgQyePNYyg02eiHfiM8VRzGcLhWJaBzpHunLX BQt6wuVJyQKUddrtacBmtLR2rK2LtZ3Hq+ZJ2LVJQyF91nFTh9R8iMFiI6qrpcrh ueU8EvywUkJaOdncEAyoBrBF64suv9jStDGCZmZ+vfNLjRZHBptTlOOE6cxg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1657776888; x=1657863288; bh=BbJk4TzUiIwgalk12IjsiqtyA2WUKLVgzCt w4uwy0TY=; b=ihLalliUoRSWr+4cw+aAHwP6cGC1WJV1dLlnOUJkpr8Bv2+cUad J6+kR6pPXZ3QgMjeDdBZKx0XtcP2cTLy7fFHxldjUw6mHpV0SlvR4DB+xgrZDv5u 3eUEookLEVf5NPawtDNPFqRciU0nngBJmufxxgqxudiP1rSPQDzNPq8jpKfdu4oi zJb7wGJUWticjj+JUaZ7cL/pjBr2cJMahe5D6gFaxG/6G4qy4zW9JwXFYK7+T4Kh P7EbqK+iSKp7XB3vOEVtOZnWMv9dSQK5PR8bTUPWdtbkCKbe8gI4tcvTEs9ttz5R mo5BdvolbEvrFUXWs6fW628boLz4k0Lvozg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejkedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepmfhlrghushcu lfgvnhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrthhtvg hrnheptdeludfhgeelheelledtjefffeejtdeluedvgfetveffgeetvdevkeehieeikeet necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihhtsh esihhrrhgvlhgvvhgrnhhtrdgukh X-ME-Proxy: Feedback-ID: idc91472f:Fastmail From: Klaus Jensen To: qemu-devel@nongnu.org Cc: Jinhao Fan , qemu-block@nongnu.org, Keith Busch , Klaus Jensen , Klaus Jensen Subject: [PATCH] hw/nvme: add trace events for ioeventfd Date: Thu, 14 Jul 2022 07:34:44 +0200 Message-Id: <20220714053444.883737-1-its@irrelevant.dk> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=64.147.123.20; envelope-from=its@irrelevant.dk; helo=wout4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1657777033781100001 Content-Type: text/plain; charset="utf-8" From: Klaus Jensen While testing Jinhaos ioeventfd patch I found it useful with a couple of additional trace events since we no longer see the mmio events. Signed-off-by: Klaus Jensen Reviewed-by: Jinhao Fan --- hw/nvme/ctrl.c | 8 ++++++++ hw/nvme/trace-events | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 533ad14e7a61..09725ec49c5d 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -1346,6 +1346,8 @@ static void nvme_post_cqes(void *opaque) bool pending =3D cq->head !=3D cq->tail; int ret; =20 + trace_pci_nvme_post_cqes(cq->cqid); + QTAILQ_FOREACH_SAFE(req, &cq->req_list, entry, next) { NvmeSQueue *sq; hwaddr addr; @@ -4238,6 +4240,8 @@ static void nvme_cq_notifier(EventNotifier *e) NvmeCQueue *cq =3D container_of(e, NvmeCQueue, notifier); NvmeCtrl *n =3D cq->ctrl; =20 + trace_pci_nvme_cq_notify(cq->cqid); + event_notifier_test_and_clear(&cq->notifier); =20 nvme_update_cq_head(cq); @@ -4275,6 +4279,8 @@ static void nvme_sq_notifier(EventNotifier *e) { NvmeSQueue *sq =3D container_of(e, NvmeSQueue, notifier); =20 + trace_pci_nvme_sq_notify(sq->sqid); + event_notifier_test_and_clear(&sq->notifier); =20 nvme_process_sq(sq); @@ -6240,6 +6246,8 @@ static void nvme_process_sq(void *opaque) NvmeCtrl *n =3D sq->ctrl; NvmeCQueue *cq =3D n->cq[sq->cqid]; =20 + trace_pci_nvme_process_sq(sq->sqid); + uint16_t status; hwaddr addr; NvmeCmd cmd; diff --git a/hw/nvme/trace-events b/hw/nvme/trace-events index fccb79f48973..45dd708bd2fa 100644 --- a/hw/nvme/trace-events +++ b/hw/nvme/trace-events @@ -104,6 +104,10 @@ pci_nvme_mmio_shutdown_set(void) "shutdown bit set" pci_nvme_mmio_shutdown_cleared(void) "shutdown bit cleared" pci_nvme_shadow_doorbell_cq(uint16_t cqid, uint16_t new_shadow_doorbell) "= cqid %"PRIu16" new_shadow_doorbell %"PRIu16"" pci_nvme_shadow_doorbell_sq(uint16_t sqid, uint16_t new_shadow_doorbell) "= sqid %"PRIu16" new_shadow_doorbell %"PRIu16"" +pci_nvme_sq_notify(uint16_t sqid) "sqid %"PRIu16"" +pci_nvme_cq_notify(uint16_t cqid) "cqid %"PRIu16"" +pci_nvme_process_sq(uint16_t sqid) "sqid %"PRIu16"" +pci_nvme_post_cqes(uint16_t cqid) "cqid %"PRIu16"" pci_nvme_open_zone(uint64_t slba, uint32_t zone_idx, int all) "open zone, = slba=3D%"PRIu64", idx=3D%"PRIu32", all=3D%"PRIi32"" pci_nvme_close_zone(uint64_t slba, uint32_t zone_idx, int all) "close zone= , slba=3D%"PRIu64", idx=3D%"PRIu32", all=3D%"PRIi32"" pci_nvme_finish_zone(uint64_t slba, uint32_t zone_idx, int all) "finish zo= ne, slba=3D%"PRIu64", idx=3D%"PRIu32", all=3D%"PRIi32"" --=20 2.36.1