Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: jthumshirn@suse.de (Johannes Thumshirn)
Subject: [PATCH] nvme-core: add async event trace helper
Date: Wed, 29 Aug 2018 10:34:25 +0200	[thread overview]
Message-ID: <20180829083425.GB4124@linux-x5ow.site> (raw)
In-Reply-To: <20180829043720.8545-1-chaitanya.kulkarni@wdc.com>

On Tue, Aug 28, 2018@09:37:20PM -0700, Chaitanya Kulkarni wrote:
> This patch adds a new event for nvme async event notification.
> We print the async event in the decoded format when we recognize the
> event otherwise we just dump the result.
> 
> This tracing event is needed to observe/log the different NVMe
> Asynchronous Event from different types of controllers NVMe PCIe or
> NVMeOF.
> 

[...]

> +TRACE_EVENT(nvme_async_event,
> +		TP_PROTO(struct nvme_ctrl *ctrl, u32 result),
> +		TP_ARGS(ctrl, result),
> +		TP_STRUCT__entry(
> +			__field(int, ctrl_id)
> +			__field(u32, result)
> +			),
> +		TP_fast_assign(
> +			__entry->ctrl_id = ctrl->instance;
> +			__entry->result = result;
> +			),
> +		TP_printk("nvme%d: NVME_AEN=%#08x",
> +			__entry->ctrl_id, __entry->result)
> +
> +	   );
> +

Cool thanks, but can you add maybe also print a __stringify()ed
version of the AEN? So we get "nvme0: NVME_AEN_CFG_ANA_CHANGE" instead
of "nvme0: NVME_AEN=0x00000800".

-- 
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  reply	other threads:[~2018-08-29  8:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29  4:37 [PATCH] nvme-core: add async event trace helper Chaitanya Kulkarni
2018-08-29  8:34 ` Johannes Thumshirn [this message]
2018-08-29 22:20   ` Chaitanya Kulkarni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180829083425.GB4124@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox