From: Steven Rostedt <rostedt@goodmis.org>
To: Praveen Talari <praveen.talari@oss.qualcomm.com>
Cc: konrad.dybcio@oss.qualcomm.com,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
chandana.chiluveru@oss.qualcomm.com,
mukesh.savaliya@oss.qualcomm.com, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org
Subject: Re: [PATCH 1/3] dmaengine: qcom: gpi: trace: Add trace events header for Qualcomm GPI DMA
Date: Mon, 31 Aug 2026 13:24:37 -0400 [thread overview]
Message-ID: <20260831132437.2477e920@gandalf.local.home> (raw)
In-Reply-To: <20260831-add-trace-support-gpio-v1-1-7b0fd0d0ddb3@oss.qualcomm.com>
On Mon, 31 Aug 2026 22:06:35 +0530
Praveen Talari <praveen.talari@oss.qualcomm.com> wrote:
> +TRACE_EVENT(gpi_ev_process,
> + TP_PROTO(struct device *dev, u32 chid, u32 ev_type, u8 code,
> + u16 status, u32 length),
> + TP_ARGS(dev, chid, ev_type, code, status, length),
> +
> + TP_STRUCT__entry(__string(name, dev_name(dev))
> + __field(u32, chid)
> + __field(u32, ev_type)
> + __field(u8, code)
> + __field(u16, status)
> + __field(u32, length)
I would swap the above a little to have the u8 code at the end to remove
any holes. It may have a hole at the end of the event, but you don't want
holes in the middle.
__field(u32, chid)
__field(u32, ev_type)
__field(u32, length)
__field(u16, status)
__field(u8, code)
> + ),
> +
> + TP_fast_assign(__assign_str(name);
> + __entry->chid = chid;
> + __entry->ev_type = ev_type;
> + __entry->code = code;
> + __entry->status = status;
> + __entry->length = length;
> + ),
> +
> + TP_printk("%s: chid=%u ev_type=0x%02x code=%u status=%u length=%u",
> + __get_str(name), __entry->chid, __entry->ev_type,
> + __entry->code, __entry->status, __entry->length)
> +);
> +
>
> +TRACE_EVENT(gpi_alloc_ring,
> + TP_PROTO(struct device *dev, u32 elements, u32 el_size,
> + u32 req_len, u64 len, size_t alloc_size),
> + TP_ARGS(dev, elements, el_size, req_len, len, alloc_size),
> +
> + TP_STRUCT__entry(__string(name, dev_name(dev))
> + __field(u32, elements)
> + __field(u32, el_size)
> + __field(u32, req_len)
> + __field(u64, len)
> + __field(size_t, alloc_size)
Same here. I would move the 64 and size to the beginning and the other 4
byte fields to the end:
TP_STRUCT__entry(__field(u64, len)
__field(size_t, alloc_size)
__string(name, dev_name(dev))
__field(u32, elements)
__field(u32, el_size)
__field(u32, req_len)
And yes, the __string() is a 4 byte meta-data and should be treated as 4
bytes.
> + ),
> +
> + TP_fast_assign(__assign_str(name);
> + __entry->elements = elements;
> + __entry->el_size = el_size;
> + __entry->req_len = req_len;
> + __entry->len = len;
> + __entry->alloc_size = alloc_size;
> + ),
> +
> + TP_printk("%s: elements=%u el_size=%u req_len=%u len=%llu alloc_size=%zu",
> + __get_str(name), __entry->elements, __entry->el_size,
> + __entry->req_len, __entry->len, __entry->alloc_size)
> +);
> +
> +TRACE_EVENT(gpi_ring_info,
> + TP_PROTO(struct device *dev, dma_addr_t dma_handle, phys_addr_t phys_addr,
> + u32 len, u32 el_size, u32 elements),
> + TP_ARGS(dev, dma_handle, phys_addr, len, el_size, elements),
> +
> + TP_STRUCT__entry(__string(name, dev_name(dev))
Move the __string() to after phys_addr.
> + __field(u64, dma_handle)
> + __field(u64, phys_addr)
> + __field(u32, len)
> + __field(u32, el_size)
> + __field(u32, elements)
> + ),
> +
> + TP_fast_assign(__assign_str(name);
> + __entry->dma_handle = dma_handle;
> + __entry->phys_addr = phys_addr;
> + __entry->len = len;
> + __entry->el_size = el_size;
> + __entry->elements = elements;
> + ),
> +
> + TP_printk("%s: dma_handle=%llx phys_addr=%llx len=%u el_size=%u elements=%u",
> + __get_str(name), __entry->dma_handle, __entry->phys_addr,
> + __entry->len, __entry->el_size, __entry->elements)
> +);
> +
-- Steve
next prev parent reply other threads:[~2026-08-31 17:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 16:36 [PATCH 0/3] dmaengine: qcom: gpi: Add trace event support Praveen Talari
2026-08-31 16:36 ` [PATCH 1/3] dmaengine: qcom: gpi: trace: Add trace events header for Qualcomm GPI DMA Praveen Talari
2026-08-31 17:24 ` Steven Rostedt [this message]
2026-08-31 19:05 ` sashiko-bot
2026-08-31 16:36 ` [PATCH 2/3] dmaengine: qcom: gpi: Add trace event support Praveen Talari
2026-08-31 19:19 ` sashiko-bot
2026-08-31 16:36 ` [PATCH 3/3] dmaengine: qcom: gpi: Convert dev_dbg() calls to tracepoints Praveen Talari
2026-08-31 19:32 ` sashiko-bot
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=20260831132437.2477e920@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=Frank.Li@kernel.org \
--cc=chandana.chiluveru@oss.qualcomm.com \
--cc=dmaengine@vger.kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mukesh.savaliya@oss.qualcomm.com \
--cc=praveen.talari@oss.qualcomm.com \
--cc=vkoul@kernel.org \
/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