From patchwork Thu Jul 14 05:34:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Jensen X-Patchwork-Id: 1656215 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=irrelevant.dk header.i=@irrelevant.dk header.a=rsa-sha256 header.s=fm2 header.b=Yk7H9z2c; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=ihLalliU; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lk3B12RJWz9s07 for ; Thu, 14 Jul 2022 15:35:52 +1000 (AEST) Received: from localhost ([::1]:54470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBrVt-0008OM-5m for incoming@patchwork.ozlabs.org; Thu, 14 Jul 2022 01:35:49 -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 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 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Jul 2022 01:34:46 -0400 (EDT) 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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 = cq->head != cq->tail; int ret; + 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 = container_of(e, NvmeCQueue, notifier); NvmeCtrl *n = cq->ctrl; + trace_pci_nvme_cq_notify(cq->cqid); + event_notifier_test_and_clear(&cq->notifier); nvme_update_cq_head(cq); @@ -4275,6 +4279,8 @@ static void nvme_sq_notifier(EventNotifier *e) { NvmeSQueue *sq = container_of(e, NvmeSQueue, notifier); + trace_pci_nvme_sq_notify(sq->sqid); + event_notifier_test_and_clear(&sq->notifier); nvme_process_sq(sq); @@ -6240,6 +6246,8 @@ static void nvme_process_sq(void *opaque) NvmeCtrl *n = sq->ctrl; NvmeCQueue *cq = n->cq[sq->cqid]; + 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=%"PRIu64", idx=%"PRIu32", all=%"PRIi32"" pci_nvme_close_zone(uint64_t slba, uint32_t zone_idx, int all) "close zone, slba=%"PRIu64", idx=%"PRIu32", all=%"PRIi32"" pci_nvme_finish_zone(uint64_t slba, uint32_t zone_idx, int all) "finish zone, slba=%"PRIu64", idx=%"PRIu32", all=%"PRIi32""