Commit fc914faa authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Damien Le Moal

ata: libata: add qc_prep tracepoint

Convert the existing ata_qc_issue() tracepoint into a template,
and add tracepoints for ata_qc_prep() and ata_qc_issue() based
on that template.
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
parent f8ec26d0
...@@ -4892,6 +4892,7 @@ void ata_qc_issue(struct ata_queued_cmd *qc) ...@@ -4892,6 +4892,7 @@ void ata_qc_issue(struct ata_queued_cmd *qc)
return; return;
} }
trace_ata_qc_prep(qc);
qc->err_mask |= ap->ops->qc_prep(qc); qc->err_mask |= ap->ops->qc_prep(qc);
if (unlikely(qc->err_mask)) if (unlikely(qc->err_mask))
goto err; goto err;
......
...@@ -164,7 +164,7 @@ const char *libata_trace_parse_subcmd(struct trace_seq *, unsigned char, ...@@ -164,7 +164,7 @@ const char *libata_trace_parse_subcmd(struct trace_seq *, unsigned char,
unsigned char, unsigned char); unsigned char, unsigned char);
#define __parse_subcmd(c,f,h) libata_trace_parse_subcmd(p, c, f, h) #define __parse_subcmd(c,f,h) libata_trace_parse_subcmd(p, c, f, h)
TRACE_EVENT(ata_qc_issue, DECLARE_EVENT_CLASS(ata_qc_issue_template,
TP_PROTO(struct ata_queued_cmd *qc), TP_PROTO(struct ata_queued_cmd *qc),
...@@ -223,6 +223,14 @@ TRACE_EVENT(ata_qc_issue, ...@@ -223,6 +223,14 @@ TRACE_EVENT(ata_qc_issue,
__entry->dev) __entry->dev)
); );
DEFINE_EVENT(ata_qc_issue_template, ata_qc_prep,
TP_PROTO(struct ata_queued_cmd *qc),
TP_ARGS(qc));
DEFINE_EVENT(ata_qc_issue_template, ata_qc_issue,
TP_PROTO(struct ata_queued_cmd *qc),
TP_ARGS(qc));
DECLARE_EVENT_CLASS(ata_qc_complete_template, DECLARE_EVENT_CLASS(ata_qc_complete_template,
TP_PROTO(struct ata_queued_cmd *qc), TP_PROTO(struct ata_queued_cmd *qc),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment