Re: [PATCH v3] tty/serial: create debugfs interface for UART register tracing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 24, 2023 at 02:59:01PM -0600, Dan Raymond wrote:
> Implement a UART register tracing facility using the debugfs.  This can be
> used as a "serial port sniffer" to monitor UART traffic and line settings
> with timestamps at microsecond granularity.  This can be useful for general
> serial port debugging or to debug the UART driver itself.
> 
> Signed-off-by: Dan Raymond <draymond@xxxxxxxxxxxxx>
> ---
> V1 -> V2:
>   - add Kconfig option to disable SERIAL_8250_DEBUG feature
>   - limit comments to 80 columns
>   - add defaults to documentation for debugfs files
>   - convert documentation to kernel-doc and link to Documentation/trace/index.rst
>   - switch user types (uint32_t) to kernel types (u32)
>   - reorganize reg_queue structure to prevent memory holes
>   - embed spinlock inside structure it protects
>   - reduce size of line[] buffer to avoid wasted memory
>   - use min_t() macro to select minimum of two integers
>   - simplify return statement from buffer_read()
>   - move comment for "round down to nearest power of 2"
>   - split double assignment of pointers into two lines
>   - use SZ_4K instead of 4096
> 
> V2 -> V3:
>   - change formatting of timestamp from "hh:mm:ss.mmmuuu" to "ssssssss.mmmuuu"
>   - create a new field in 'struct uart_port' instead of using 'private_data'

Better!  But please, look into using the tracing infrastructure and
functionality first.  Only if that is somehow not workable at all should
we regress into using stuff like debugfs for this.

thanks,

greg k-h



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux