Re: [PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
On 9/15/2023 10:16 AM, Steven Rostedt wrote: On Fri, 15 Sep 2023 09:11:06 +0800 Linyu Yuan wrote: + snprintf(__s, 9, "ep%d%s", te.address, \ + (te.caps.dir_in && te.caps.dir_out) ? "" : \ + te.caps.dir_in ? "in" : "out"); Note,

Re: [PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event

2023-09-14 Thread Steven Rostedt
On Fri, 15 Sep 2023 09:11:06 +0800 Linyu Yuan 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

Re: [PATCH 2/8] usb: gadget: add anonymous definition in some struct for trace purpose

2023-09-14 Thread Linyu Yuan
On 9/15/2023 9:51 AM, Alan Stern wrote: On Fri, Sep 15, 2023 at 09:02:48AM +0800, Linyu Yuan wrote: On 9/14/2023 10:54 PM, Alan Stern wrote: You didn't include the version number in the Subject: line. Undoubtedly Greg's automatic error checker will warn you about this. Unless the version

Re: [PATCH 2/8] usb: gadget: add anonymous definition in some struct for trace purpose

2023-09-14 Thread Alan Stern
On Fri, Sep 15, 2023 at 09:02:48AM +0800, Linyu Yuan wrote: > > On 9/14/2023 10:54 PM, Alan Stern wrote: > > You didn't include the version number in the Subject: line. Undoubtedly > > Greg's automatic error checker will warn you about this. Unless the > > version number is clearly marked for

Re: [PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
On 9/15/2023 12:54 AM, Steven Rostedt wrote: On Thu, 14 Sep 2023 18:02:57 +0800 Linyu Yuan wrote: Save u32 members into trace event ring buffer and parse it for possible bit fields. Use new DECLARE_EVENT_CLASS_PRINT_INIT() class macro for output stage. Signed-off-by: Linyu Yuan ---

Re: [PATCH 2/8] usb: gadget: add anonymous definition in some struct for trace purpose

2023-09-14 Thread Linyu Yuan
On 9/14/2023 10:54 PM, Alan Stern wrote: You didn't include the version number in the Subject: line. Undoubtedly Greg's automatic error checker will warn you about this. Unless the version number is clearly marked for each patch, it's difficult for his programs to tell which email message

Re: [PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event

2023-09-14 Thread Steven Rostedt
On Thu, 14 Sep 2023 18:02:57 +0800 Linyu Yuan wrote: > Save u32 members into trace event ring buffer and parse it for possible > bit fields. > > Use new DECLARE_EVENT_CLASS_PRINT_INIT() class macro for output stage. > > Signed-off-by: Linyu Yuan > --- > drivers/usb/gadget/udc/trace.h | 154

Re: [PATCH 0/8] usb: gadget: reduce usb gadget trace event buffer usage

2023-09-14 Thread Steven Rostedt
On Thu, 14 Sep 2023 18:02:54 +0800 Linyu Yuan wrote: > some trace event use an interger to to save a bit field info of gadget, > also some trace save endpoint name in string forat, it all can be > chagned to other way at trace event store phase. > > bit field can be replace with a union

Re: [PATCH 2/8] usb: gadget: add anonymous definition in some struct for trace purpose

2023-09-14 Thread Alan Stern
You didn't include the version number in the Subject: line. Undoubtedly Greg's automatic error checker will warn you about this. Unless the version number is clearly marked for each patch, it's difficult for his programs to tell which email message contains the most recent version. On Thu,

Re: [PATCH 1/8] trace: add new DECLARE_EVENT_CLASS_PRINT_INIT class type

2023-09-14 Thread kernel test robot
Hi Linyu, kernel test robot noticed the following build warnings: [auto build test WARNING on usb/usb-testing] [also build test WARNING on usb/usb-next usb/usb-linus linus/master v6.6-rc1 next-20230914] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

[PATCH 2/8] usb: gadget: add anonymous definition in some struct for trace purpose

2023-09-14 Thread Linyu Yuan
Some UDC trace event will save usb udc information, but it use one int size buffer to save one bit information of usb udc, it is wast trace buffer. Add anonymous union which have one u32 member can be used by trace event during fast assign stage to save more entries with same trace ring buffer

[PATCH 8/8] usb: musb: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 member into trace event ring buffer and parse it for possible bit information. Use DECLARE_EVENT_CLASS_PRINT_INIT() related macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/musb/musb_trace.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-)

[PATCH 7/8] usb: mtu3: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 members into trace event ring buffer and parse it for possible bit information. Use DECLARE_EVENT_CLASS_PRINT_INIT() related macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/mtu3/mtu3_trace.h | 76 +++ 1 file changed, 50 insertions(+),

[PATCH 6/8] usb: cdns2: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 members into trace event ring buffer and parse it for possible bit information. Use DECLARE_EVENT_CLASS_PRINT_INIT() related macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/gadget/udc/cdns2/cdns2-trace.h | 175 ++--- 1 file changed, 121 insertions(+),

[PATCH 5/8] usb: dwc3: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 members into trace event ring buffer and parse it for possible bit information. Use DECLARE_EVENT_CLASS_PRINT_INIT() related macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/dwc3/trace.h | 99 +--- 1 file changed, 63 insertions(+),

[PATCH 4/8] usb: cdns3: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 members into trace event ring buffer and parse it for possible bit information. Use DECLARE_EVENT_CLASS_PRINT_INIT() related macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/cdns3/cdns3-trace.h | 201 ++-- drivers/usb/cdns3/cdnsp-trace.h |

[PATCH 3/8] usb: udc: trace: reduce buffer usage of trace event

2023-09-14 Thread Linyu Yuan
Save u32 members into trace event ring buffer and parse it for possible bit fields. Use new DECLARE_EVENT_CLASS_PRINT_INIT() class macro for output stage. Signed-off-by: Linyu Yuan --- drivers/usb/gadget/udc/trace.h | 154 +++-- 1 file changed, 69 insertions(+), 85

[PATCH 0/8] usb: gadget: reduce usb gadget trace event buffer usage

2023-09-14 Thread Linyu Yuan
some trace event use an interger to to save a bit field info of gadget, also some trace save endpoint name in string forat, it all can be chagned to other way at trace event store phase. bit field can be replace with a union interger member which include multiple bit fields. ep name stringe can

[PATCH 1/8] trace: add new DECLARE_EVENT_CLASS_PRINT_INIT class type

2023-09-14 Thread Linyu Yuan
This class almost same as DECLARE_EVENT_CLASS, it allow user add some init operation before print at output stage. Add a new macro TP_printk_init(), user can add operation in it. Also add a new TRACE_EVENT_PRINT_INIT() macro. Signed-off-by: Linyu Yuan --- include/linux/tracepoint.h