From: Lukasz Luba <lukasz.luba@arm.com>
To: Jim Quinlan <james.quinlan@broadcom.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, mingo@redhat.com,
rostedt@goodmis.org, sudeep.holla@arm.com
Subject: Re: [PATCH 1/2] include: trace: Add SCMI header with trace events
Date: Tue, 17 Dec 2019 10:05:28 +0000 [thread overview]
Message-ID: <99cea477-d776-1723-162b-f12ca64fce6e@arm.com> (raw)
In-Reply-To: <20191216161650.21844-1-lukasz.luba@arm.com>
Hello Jim,
On 12/16/19 10:15 PM, Jim Quinlan wrote:
> From: Lukasz Luba <lukasz.luba@arm.com>
>
> +
> +TRACE_EVENT(scmi_xfer_begin,
> + TP_PROTO(u8 id, u8 protocol_id, u16 seq, bool poll),
> + TP_ARGS(id, protocol_id, seq, poll),
> +
> + TP_STRUCT__entry(
> + __field(u8, id)
> + __field(u8, protocol_id)
> + __field(u16, seq)
> + __field(bool, poll)
> + ),
> +
> + TP_fast_assign(
> + __entry->id = id;
> + __entry->protocol_id = protocol_id;
> + __entry->seq = seq;
> + __entry->poll = poll;
> + ),
> +
> + TP_printk("id=%u protocol_id=%u seq=%u poll=%u", __entry->id,
> + __entry->protocol_id, __entry->seq, __entry->poll)
> +);
> +
> +TRACE_EVENT(scmi_xfer_end,
> + TP_PROTO(u8 id, u8 protocol_id, u16 seq, u32 status),
> + TP_ARGS(id, protocol_id, seq, status),
> +
> + TP_STRUCT__entry(
> + __field(u8, id)
> + __field(u8, protocol_id)
> + __field(u16, seq)
> + __field(u32, status)
> + ),
> +
> + TP_fast_assign(
> + __entry->id = id;
> + __entry->protocol_id = protocol_id;
> + __entry->seq = seq;
> + __entry->status = status;
> + ),
> +
> + TP_printk("id=%u protocol_id=%u seq=%u status=%u", __entry->id,
> + __entry->protocol_id, __entry->seq, __entry->status)
> +);
>
> Hello,
>
> When there are multiple messages in the mbox queue, I've found it
> a chore matching up the 'begin' event with the 'end' event for each
> SCMI msg. The id (command) may not be unique, the proto_id may not be
> unique, and the seq may not be unique. The combination of the three
> may not be unique. Would it make sense to assign a monotonically
> increasing ID to each msg so that one can easily match the two events
> for each msg? This id could be the result of an atomic increment and
> could be stored in the xfer structure. Of course, it would be one of
> the values printed out in the events.
Hmmm, an atomic variable in this code might be too heavy, especially in
case of fast_switch from cpufreq. Let me think about it and experiment.
>
> Also, would you consider a third event, right after the
> scmi_fetch_response() invocation in scmi_rx_callback()? I've found
> this to be insightful in situations where we were debugging a timeout.
Yes, of course. It would be really useful. Thank you for the
suggestion.
>
> I'm fine if you elect not to do the above; I just wanted to post
> this for your consideration.
Thant's a valuable feedback. I will definitely consider it.
Regards,
Lukasz
>
> Thanks,
> Jim Quinlan
> Broadcom
>
next prev parent reply other threads:[~2019-12-17 10:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 16:16 [PATCH 1/2] include: trace: Add SCMI header with trace events lukasz.luba
2019-12-16 16:16 ` [PATCH 2/2] drivers: firmware: scmi: Extend SCMI transport layer by " lukasz.luba
2019-12-16 22:15 ` [PATCH 1/2] include: trace: Add SCMI header with " Jim Quinlan
2019-12-17 10:05 ` Lukasz Luba [this message]
2019-12-18 12:09 ` Sudeep Holla
2019-12-18 16:37 ` Jim Quinlan
2019-12-19 16:32 ` Jim Quinlan
2019-12-20 9:20 ` Lukasz Luba
2019-12-20 16:24 ` Jim Quinlan
2019-12-23 15:39 ` Lukasz Luba
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=99cea477-d776-1723-162b-f12ca64fce6e@arm.com \
--to=lukasz.luba@arm.com \
--cc=james.quinlan@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=sudeep.holla@arm.com \
/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;
as well as URLs for NNTP newsgroup(s).