aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>2018-12-18 06:05:04 +0900
committerPetr Mladek <pmladek@suse.com>2018-12-18 10:53:14 +0100
commit15ff2069cb7f967dae6a8f8c176ba51447c75f00 (patch)
treeb3e4f0437c240668ad73e32b194d4e827669dbaa /tools/perf/scripts/python/net_dropmonitor.py
parentprintk: Remove print_prefix() calls with NULL buffer. (diff)
downloadlinux-15ff2069cb7f967dae6a8f8c176ba51447c75f00.tar.gz
linux-15ff2069cb7f967dae6a8f8c176ba51447c75f00.zip
printk: Add caller information to printk() output.
Sometimes we want to print a series of printk() messages to consoles without being disturbed by concurrent printk() from interrupts and/or other threads. But we can't enforce printk() callers to use their local buffers because we need to ask them to make too much changes. Also, even buffering up to one line inside printk() might cause failing to emit an important clue under critical situation. Therefore, instead of trying to help buffering, let's try to help reconstructing messages by saving caller information as of calling log_store() and adding it as "[T$thread_id]" or "[C$processor_id]" upon printing to consoles. Some examples for console output: [ 1.222773][ T1] x86: Booting SMP configuration: [ 2.779635][ T1] pci 0000:00:01.0: PCI bridge to [bus 01] [ 5.069193][ T268] Fusion MPT base driver 3.04.20 [ 9.316504][ C2] random: fast init done [ 13.413336][ T3355] Initialized host personality Some examples for /dev/kmsg output: 6,496,1222773,-,caller=T1;x86: Booting SMP configuration: 6,968,2779635,-,caller=T1;pci 0000:00:01.0: PCI bridge to [bus 01] SUBSYSTEM=pci DEVICE=+pci:0000:00:01.0 6,1353,5069193,-,caller=T268;Fusion MPT base driver 3.04.20 5,1526,9316504,-,caller=C2;random: fast init done 6,1575,13413336,-,caller=T3355;Initialized host personality Note that this patch changes max length of messages which can be printed by printk() or written to /dev/kmsg interface from 992 bytes to 976 bytes, based on an assumption that userspace won't try to write messages hitting that border line to /dev/kmsg interface. Link: http://lkml.kernel.org/r/93f19e57-5051-c67d-9af4-b17624062d44@i-love.sakura.ne.jp Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: LKML <linux-kernel@vger.kernel.org> Cc: syzkaller <syzkaller@googlegroups.com> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions
pan class='deletions'>-0/+1 2009-02-02virtio-pci: do not oops on config change if driver not loadedMark McLoughlin1-1/+1 2009-02-02modules: Use a better scheme for refcountingEric Dumazet2-19/+41 2009-02-02pxamci: enable DMA for write ops after CMD/RESPCliff Brake1-1/+15 2009-02-02pxamci: replace #ifdef CONFIG_PXA27x with if (cpu_is_pxa27x())Cliff Brake1-5/+4 2009-02-02ricoh_mmc: Use suspend_late/resume_earlyphilipl@overt.org1-4/+4 2009-02-02mmci: Add support for ST Micro derivateLinus Walleij2-4/+61 2009-02-02mmc: Add a MX2/MX3 specific SDHC driverSascha Hauer4-0/+927 2009-02-02icside: fix PCB version 6 support (v2)Bartlomiej Zolnierkiewicz1-1/+1 2009-02-02tx4939ide: typo fix and minor cleanupAtsushi Nemoto1-2/+2 2009-02-02ide: add CS5536 host driver (v3)Bartlomiej Zolnierkiewicz3-0/+319 2009-02-02ide: Force VIA IDE legacy interrupts for AmigaOne boardsGerhard Pircher1-0/+5 2009-02-02IDE: Unregister and disable devices if initialization fails.Ian Campbell1-1/+2 2009-02-02ide: fix ide_register_port() failure handlingBartlomiej Zolnierkiewicz1-8/+32 2009-02-02ide: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers1-1/+1 2009-02-02ide-cd: fix DMA for non bio-backed requestsBorislav Petkov2-3/+9