Message ID | 20211208163255.114660-23-hare@suse.de |
---|---|
State | New |
Headers | show |
Series | libata: rework logging, take II | expand |
On 08.12.2021 19:32, Hannes Reinecke wrote: > Add tracepoint for ata_qc_prep(). You're also adding a tracepoint for ata_qc_issue... > Signed-off-by: Hannes Reinecke <hare@suse.de> > --- > drivers/ata/libata-core.c | 1 + > include/trace/events/libata.h | 10 +++++++++- > 2 files changed, 10 insertions(+), 1 deletion(-) [...] > diff --git a/include/trace/events/libata.h b/include/trace/events/libata.h > index 7d48e804b889..360f99980b44 100644 > --- a/include/trace/events/libata.h > +++ b/include/trace/events/libata.h [...] > @@ -235,6 +235,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), MBR, Sergey
On 12/9/21 9:42 AM, Sergei Shtylyov wrote: > On 08.12.2021 19:32, Hannes Reinecke wrote: > >> Add tracepoint for ata_qc_prep(). > > You're also adding a tracepoint for ata_qc_issue... > Actually, no. I'm converting the existing tracepoint for ata_qc_issue into a template, and then adding tracepoints for ata_qc_prep and ata_qc_issue based on that template. But I can make a note of this in the patch description. Cheers, Hannes
On 09.12.2021 14:14, Hannes Reinecke wrote: [...] >>> Add tracepoint for ata_qc_prep(). >> >> You're also adding a tracepoint for ata_qc_issue... >> > Actually, no. > > I'm converting the existing tracepoint for ata_qc_issue into a template, > and then adding tracepoints for ata_qc_prep and ata_qc_issue based on > that template. > > But I can make a note of this in the patch description. Please do. :-) > Cheers, > > Hannes MBR, Sergei
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index de5f4bf1c90c..a538840c652a 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4931,6 +4931,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; diff --git a/include/trace/events/libata.h b/include/trace/events/libata.h index 7d48e804b889..360f99980b44 100644 --- a/include/trace/events/libata.h +++ b/include/trace/events/libata.h @@ -176,7 +176,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), @@ -235,6 +235,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),
Add tracepoint for ata_qc_prep(). Signed-off-by: Hannes Reinecke <hare@suse.de> --- drivers/ata/libata-core.c | 1 + include/trace/events/libata.h | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-)