Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1245788imm; Fri, 29 Jun 2018 14:15:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdHXdXWvdQdyyuMogUELTJZTwg97FKXJ/ymG4IKP6VzO7as8PnQIoQLIoLok+A1nYiGKKva X-Received: by 2002:a62:398c:: with SMTP id u12-v6mr1348442pfj.9.1530306951456; Fri, 29 Jun 2018 14:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530306951; cv=none; d=google.com; s=arc-20160816; b=v6UMcfnf7zkufAWKSyldDPT3X/NupYKPNQypJjjjft+B9lZ6HbQDZJ6xFi8IeCPR6a yOdgv0HmWeFg/qdqiFgoR1ldC8FsWmFhzr1Fwf5lKWcNKJgd8jBV8/Ns92l8BCM8qo2t z4G2CsyNFeNrbhHjUq40YRRkzoflMVxN2gtjsUmhK39ib2/+73r9HAxEcPjMQmrnlKbG x34MEuVaVBymO/6RWzQHoqySUNjNlmgHo68RoncWidh/gxeEpqcj67RSf9xcRU6COaTh xtGqds193jA+JzdOBLqIdu8QN45lLOhrFD8/H/L49MU2NmktLPg9ey7pZX2L1M6eatvZ pB0g== 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=EFSNRNDWH9CG5nIjkwg4VS5JphXzk1hyoQTOgPkSeO0=; b=QTijQgUshuf7okWYP1qsGts9s3mLfiIy4kbtRuEKK6lOSrioSJHIaP3AA3WY7VXO7X OS9E17QCgPF+v9iR51NyZ4ZGugFHh1oB2OGSuaHTZql+gjg/bER5q+DpfpaOxBbW3Fm3 ShdnbC83MNd4thGrkGIDfYQCUeSyCQ/x9ONOmAtjnx/E8wdFwfKGDdqJ0jY3Fuu7Kpsj pPhvW5MM4EC3KRJkHbKCuxbSYj1Au7FA3hhcHK4JSXTcxq95WfEAVg3V8DApINXwEiHt Faxv/xNlGnGZb6/+m5J0CXjLOmEkflVqt7KRbFREOTkmy3ma7jhawgyzjGN36TTkuZ/B RzvA== 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 p8-v6si9676451pfh.249.2018.06.29.14.15.37; Fri, 29 Jun 2018 14:15:51 -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 S965402AbeF2UBD (ORCPT + 99 others); Fri, 29 Jun 2018 16:01:03 -0400 Received: from mga11.intel.com ([192.55.52.93]:19117 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937102AbeF2UAs (ORCPT ); Fri, 29 Jun 2018 16:00:48 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2018 13:00:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,287,1526367600"; d="scan'208";a="241791995" Received: from unknown (HELO localhost.lm.intel.com) ([10.232.112.44]) by fmsmga006.fm.intel.com with ESMTP; 29 Jun 2018 13:00:47 -0700 From: Keith Busch To: Johannes Thumshirn , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Keith Busch Subject: [PATCHv3 3/4] nvme: add controller name to trace events Date: Fri, 29 Jun 2018 13:59:59 -0600 Message-Id: <20180629200000.16171-4-keith.busch@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180629200000.16171-1-keith.busch@intel.com> References: <20180629200000.16171-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 nvme trace buffer to distinguish which controller is dispatching and completing 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 67ca8d8e78e1..8058f1c9a33e 100644 --- a/drivers/nvme/host/trace.h +++ b/drivers/nvme/host/trace.h @@ -95,6 +95,7 @@ TRACE_EVENT(nvme_setup_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) @@ -105,6 +106,7 @@ TRACE_EVENT(nvme_setup_cmd, ), TP_fast_assign( __assign_nvme_qid(req, __entry->qid); + __entry->ctrl_id = nvme_req(req)->ctrl->instance; __entry->opcode = cmd->common.opcode; __entry->flags = cmd->common.flags; __entry->cid = cmd->common.command_id; @@ -113,9 +115,9 @@ TRACE_EVENT(nvme_setup_cmd, memcpy(__entry->cdw10, cmd->common.cdw10, sizeof(__entry->cdw10)); ), - TP_printk("qid=%d, cmdid=%u, nsid=%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, show_opcode_name(__entry->qid, __entry->opcode), parse_nvme_cmd(__entry->qid, __entry->opcode, __entry->cdw10)) ); @@ -124,6 +126,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) @@ -133,15 +136,17 @@ TRACE_EVENT(nvme_complete_rq, ), TP_fast_assign( __assign_nvme_qid(req, __entry->qid); + __entry->ctrl_id = nvme_req(req)->ctrl->instance; __entry->cid = req->tag; __entry->result = le64_to_cpu(nvme_req(req)->result.u64); __entry->retries = nvme_req(req)->retries; __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