From: Linyu Yuan <quic_linyyuan@quicinc.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Chunfeng Yun <chunfeng.yun@mediatek.com>, Bin Liu <b-liu@ti.com>,
Peter Chen <peter.chen@kernel.org>,
Pawel Laszczak <pawell@cadence.com>,
Roger Quadros <rogerq@kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
Masami Hiramatsu <mhiramat@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-usb@vger.kernel.org>, <linux-trace-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event
Date: Fri, 15 Sep 2023 10:25:18 +0800 [thread overview]
Message-ID: <24a6305d-2d47-7502-e26e-75a4e08e47b1@quicinc.com> (raw)
In-Reply-To: <20230914221644.6f4517b3@rorschach.local.home>
On 9/15/2023 10:16 AM, Steven Rostedt wrote:
> On Fri, 15 Sep 2023 09:11:06 +0800
> Linyu Yuan <quic_linyyuan@quicinc.com> wrote:
>
>>>> + snprintf(__s, 9, "ep%d%s", te.address, \
>>>> + (te.caps.dir_in && te.caps.dir_out) ? "" : \
>>>> + te.caps.dir_in ? "in" : "out");
>>> Note, there's a temp buffer trace_seq 'p' available for use as well. See
>>> both include/trace/events/libata.h and include/trace/events/scsi.h:
>>>
>>> const char *libata_trace_parse_status(struct trace_seq*, unsigned char);
>>> #define __parse_status(s) libata_trace_parse_status(p, s)
>>>
>>> I think that can be used instead of adding this TP_printk_init().
>>
>> the reason add TP_printk_init() because when i first design some macro
>> which not
>>
>> related to tracepoint, it use too much stack.
>>
> Not sure what you mean about 'uses too much stack'. This is called by
> the reading code and not some arbitrary location, and the above macros
> are done in the same location as your "init" call, so I'm not sure how
> that makes a difference on the stack.
>
>> but i think TP_printk_init() is good as it following most common way
>> to print.
>>
> I really do not want to add more versions of TRACE_EVENT() that I need
> to maintain unless there is a really good reason to do so.
>
> And I really don't want to encourage the use of a "TP_printk_init()"
> because that just encourages more use cases that will make it hard for
> user space to parse the TP_printk().
that's true, it is difficult to understand, when i add this new, it
report build issue.
will consider other way for this case without new tracepoint macro.
>
> -- Steve
next prev parent reply other threads:[~2023-09-15 2:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 10:02 [PATCH 0/8] usb: gadget: reduce usb gadget trace event buffer usage Linyu Yuan
2023-09-14 10:02 ` [PATCH 1/8] trace: add new DECLARE_EVENT_CLASS_PRINT_INIT class type Linyu Yuan
2023-09-14 14:29 ` kernel test robot
2023-09-14 10:02 ` [PATCH 2/8] usb: gadget: add anonymous definition in some struct for trace purpose Linyu Yuan
2023-09-14 14:54 ` Alan Stern
2023-09-15 1:02 ` Linyu Yuan
2023-09-15 1:51 ` Alan Stern
2023-09-15 1:56 ` Linyu Yuan
2023-09-14 10:02 ` [PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event Linyu Yuan
2023-09-14 16:54 ` Steven Rostedt
2023-09-15 1:11 ` Linyu Yuan
2023-09-15 2:16 ` Steven Rostedt
2023-09-15 2:25 ` Linyu Yuan [this message]
2023-09-14 10:02 ` [PATCH 4/8] usb: cdns3: " Linyu Yuan
2023-09-14 10:02 ` [PATCH 5/8] usb: dwc3: " Linyu Yuan
2023-09-14 10:03 ` [PATCH 6/8] usb: cdns2: " Linyu Yuan
2023-09-14 10:03 ` [PATCH 7/8] usb: mtu3: " Linyu Yuan
2023-09-14 10:03 ` [PATCH 8/8] usb: musb: " Linyu Yuan
2023-09-14 16:42 ` [PATCH 0/8] usb: gadget: reduce usb gadget trace event buffer usage Steven Rostedt
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=24a6305d-2d47-7502-e26e-75a4e08e47b1@quicinc.com \
--to=quic_linyyuan@quicinc.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=b-liu@ti.com \
--cc=chunfeng.yun@mediatek.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=pawell@cadence.com \
--cc=peter.chen@kernel.org \
--cc=rogerq@kernel.org \
--cc=rostedt@goodmis.org \
--cc=stern@rowland.harvard.edu \
/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