Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp26831imm; Thu, 28 Jun 2018 14:10:54 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK/St3PisEy7H0ulsCjjx090Rcc0rszA4oyFXwPQnjCUdW9DAwHRyrt3jXVc9BmW7SPsC0w X-Received: by 2002:a17:902:9344:: with SMTP id g4-v6mr12060487plp.10.1530220254490; Thu, 28 Jun 2018 14:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530220254; cv=none; d=google.com; s=arc-20160816; b=HSqnzgf8iiIMxCBU3BjDKhmmXSUVK/jhKqDtfB1G2NiVYrPsF/kNNuZ5JbjadXmE3q +xafHGxGEZOrOTWNM2QHXDlVEnqFFzpsH+t/MPFSHmN8bZx1ZynM2x8Xs83d6kTQZTtt UCYjPKnIcUyeNG4eZ+Nj0/ywlWVHbWCLitNOR2gXxbB5G9M5bjLz1arO5iQzeIPCK0T4 HtVNQaZjp8KjdKoWUV7pnerfuDel0k1f/FpDWtzy/gyRxrna4DqLbvyJq5+jxJPM5Vxd b18DTKqA2F2+IP6rkkTB5PV69gWyZoSi0KrpV1GceusKGKNCRqhURjRzzg0GTsbDQSAB JRqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=ONdKYj5kNrXDQK8cUK4dEY5s6+X0ToVKDnj/YYSjMF0=; b=rcTF6AKtaMkQQlQOkcg+vM4bcHCj8Ii0DDfiPH6KAEUW/JU1wyad7W4vi6ypfkUMyO 2lACaz8tdyv2e7/eoTH3/1INZ2BlMXN6B+0yvj38+DsvtrpjjfVPtoeRVIAuU5Lik9FD 4umhX+QBf2TPhbwWjX9IafSCTJuLnt8N2+DH+ZDyQDktgYjHkHFsjpg/JCkuSxBHYZGR IVzNsT7FAaviOMwZ55pO8THwiH+UtG1lUWyi3lma7uSGB68NICi2ow7WMf3xd5qWFB6s PUKIWkPInxjCj5Nx80KPCB1LEHCvPvz7r5fr6/4TbmhQ/g6QslC7URokFT/qLaD/fFo5 ZRQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12-v6si7391812plk.48.2018.06.28.14.10.40; Thu, 28 Jun 2018 14:10:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936093AbeF1U5g (ORCPT + 99 others); Thu, 28 Jun 2018 16:57:36 -0400 Received: from mga09.intel.com ([134.134.136.24]:31844 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935830AbeF1U5N (ORCPT ); Thu, 28 Jun 2018 16:57:13 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jun 2018 13:57:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,284,1526367600"; d="scan'208";a="50702328" Received: from unknown (HELO localhost.lm.intel.com) ([10.232.112.44]) by fmsmga007.fm.intel.com with ESMTP; 28 Jun 2018 13:56:57 -0700 From: Keith Busch To: Johannes Thumshirn , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Jens Axboe Cc: Keith Busch Subject: [PATCH 4/5] nvme: trace controller name Date: Thu, 28 Jun 2018 14:56:00 -0600 Message-Id: <20180628205601.13742-4-keith.busch@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180628205601.13742-1-keith.busch@intel.com> References: <20180628205601.13742-1-keith.busch@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This appends the controller instance to the trace buffer for nvme commands to distinguish what controller is dispatching a command. Signed-off-by: Keith Busch --- drivers/nvme/host/trace.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/nvme/host/trace.h b/drivers/nvme/host/trace.h index bca3451caa37..57344980af16 100644 --- a/drivers/nvme/host/trace.h +++ b/drivers/nvme/host/trace.h @@ -79,6 +79,7 @@ TRACE_EVENT(nvme_setup_nvm_cmd, TP_PROTO(struct request *req, struct nvme_command *cmd), TP_ARGS(req, cmd), TP_STRUCT__entry( + __field(int, ctrl_id) __field(int, qid) __field(u8, opcode) __field(u8, flags) @@ -88,6 +89,7 @@ TRACE_EVENT(nvme_setup_nvm_cmd, __array(u8, cdw10, 24) ), TP_fast_assign( + __entry->ctrl_id = nvme_req(req)->ctrl->instance; __entry->qid = blk_mq_request_hctx_idx(req) + !!req->rq_disk; __entry->opcode = cmd->common.opcode; __entry->flags = cmd->common.flags; @@ -97,9 +99,9 @@ TRACE_EVENT(nvme_setup_nvm_cmd, memcpy(__entry->cdw10, cmd->common.cdw10, sizeof(__entry->cdw10)); ), - TP_printk("qid=%d, nsid=%u, cmdid=%u, flags=0x%x, meta=0x%llx, cmd=(%s %s)", - __entry->qid, __entry->nsid, __entry->cid, - __entry->flags, __entry->metadata, + TP_printk("nvme%d: qid=%d, cmdid=%u, nsid=%u, flags=0x%x, meta=0x%llx, cmd=(%s %s)", + __entry->ctrl_id, __entry->qid, __entry->nsid, + __entry->cid, __entry->flags, __entry->metadata, __entry->qid ? show_opcode_name(__entry->opcode) : show_admin_opcode_name(__entry->opcode), @@ -112,6 +114,7 @@ TRACE_EVENT(nvme_complete_rq, TP_PROTO(struct request *req), TP_ARGS(req), TP_STRUCT__entry( + __field(int, ctrl_id) __field(int, qid) __field(int, cid) __field(u64, result) @@ -120,6 +123,7 @@ TRACE_EVENT(nvme_complete_rq, __field(u16, status) ), TP_fast_assign( + __entry->ctrl_id = nvme_req(req)->ctrl->instance; __entry->qid = blk_mq_request_hctx_idx(req) + !!req->rq_disk; __entry->cid = req->tag; __entry->result = le64_to_cpu(nvme_req(req)->result.u64); @@ -127,9 +131,10 @@ TRACE_EVENT(nvme_complete_rq, __entry->flags = nvme_req(req)->flags; __entry->status = nvme_req(req)->status; ), - TP_printk("qid=%d, cmdid=%u, res=%llu, retries=%u, flags=0x%x, status=%u", - __entry->qid, __entry->cid, __entry->result, - __entry->retries, __entry->flags, __entry->status) + TP_printk("nvme%d: qid=%d, cmdid=%u, res=%llu, retries=%u, flags=0x%x, status=%u", + __entry->ctrl_id, __entry->qid, __entry->cid, + __entry->result, __entry->retries, __entry->flags, + __entry->status) ); -- 2.14.3