Skip to content

tty core debug patches

Peter Hurley linux-serial lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7tty: core: Improve debug message contentdrivers/tty/tty_io.c+16 -130 replies
2/7tty: core: Add tty_debug() for printk(KERN_DEBUG) messagesdrivers/tty/tty_io.c include/linux/tty.h+23 -247 replies
3/7tty: Replace #ifdef TTY_DEBUG_HANGUP with tty_debug_hangup()drivers/tty/tty_io.c+18 -290 replies
4/7tty: Use tty_debug() for tty_ldisc_debug()drivers/tty/tty_ldisc.c+1 -30 replies
5/7tty: Replace inline #ifdef TTY_DEBUG_WAIT_UNTIL_SENTdrivers/tty/tty_ioctl.c+8 -30 replies
6/7tty: core: Improve ldisc debug messagesdrivers/tty/tty_ldisc.c+6 -50 replies
7/7pty: Add debug message for ptmx opendrivers/tty/pty.c+8 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] tty core debug patches

Hi Greg,

This patchset replaces the printk(KERN_DEBUG) uses in the tty core with a common tty_debug(tty, ...) base macro, folding in the common elements of tty name and function name.

The many inline #ifdef TTY_SOME_DEBUG_FLAG printk's are replaced with macro equivalents which reduce to tty_debug().

Several important improvements include:
* patch 1/7 adds the tty count to the tty_open() message
* patch 6/7 improve the ldisc messages to aid in state debugging
* patch 7/7 adds pmtx open (which helps clarify when the master was opened)

An important outcome of a single tty_debug() macro is that it can be trivially changed to use a different debug facility than console; for example, for some of my torture tests using the ftrace facility is much less intrusive. I would expect that to remain a local change though.

Regards,

Peter Hurley (7):
tty: core: Improve debug message content
tty: core: Add tty_debug() for printk(KERN_DEBUG) messages
tty: Replace #ifdef TTY_DEBUG_HANGUP with tty_debug_hangup()
tty: Use tty_debug() for tty_ldisc_debug()
tty: Replace inline #ifdef TTY_DEBUG_WAIT_UNTIL_SENT
tty: core: Improve ldisc debug messages
pty: Add debug message for ptmx open

 drivers/tty/pty.c       |  8 ++++++
 drivers/tty/tty_io.c    | 67 +++++++++++++++++++------------------------------
 drivers/tty/tty_ioctl.c | 11 +++++---
 drivers/tty/tty_ldisc.c | 15 ++++++-----
 include/linux/tty.h     |  6 +++++
 5 files changed, 55 insertions(+), 52 deletions(-)
Signature · 1 line
2.4.5