Skip to content

Commit

Permalink
ata: libata: add qc_prep tracepoint
Browse files Browse the repository at this point in the history
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: Hannes Reinecke <hare@suse.de>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
  • Loading branch information
Hannes Reinecke authored and Damien Le Moal committed Jan 4, 2022
1 parent f8ec26d commit fc914fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4892,6 +4892,7 @@ void ata_qc_issue(struct ata_queued_cmd *qc)
return;
}

trace_ata_qc_prep(qc);
qc->err_mask |= ap->ops->qc_prep(qc);
if (unlikely(qc->err_mask))
goto err;
Expand Down
10 changes: 9 additions & 1 deletion include/trace/events/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const char *libata_trace_parse_subcmd(struct trace_seq *, unsigned char,
unsigned char, unsigned char);
#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),

Expand Down Expand Up @@ -223,6 +223,14 @@ TRACE_EVENT(ata_qc_issue,
__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,

TP_PROTO(struct ata_queued_cmd *qc),
Expand Down

0 comments on commit fc914fa

Please sign in to comment.