linux/include/trace/events
Daniel Bristot de Oliveira 78aebca2c9 printk, tracing: Avoiding unneeded blank lines
Printk messages often finish with '\n' to cause a new line.
But as each tracepoint is already printed in a new line,
printk messages that finish with '\n' ends up adding a blank
line to the trace output. For example:

     kworker/0:1-86    [000] d...    46.006949: console: [   46.006946] usb 1-3: USB disconnect, device number 3

     kworker/2:2-374   [002] d...    48.699342: console: [   48.699339] usb 1-3: new high-speed USB device number 4 using ehci-pci

     kworker/2:2-374   [002] d...    49.041450: console: [   49.041448] usb 1-3: New USB device found, idVendor=5986, idProduct=0

To avoid unneeded blank lines, this patch checks if the printk
message finishes with '\n', if so, it cut is off the '\n' to
avoid blank lines.

In a patched kernel, the same messages are printed without
extra blank lines. For example:

     kworker/0:4-185   [000] d...    23.641738: console: [   23.641736] usb 1-3: USB disconnect, device number 3
     kworker/0:4-185   [000] d...    24.918703: console: [   24.918700] usb 1-3: new high-speed USB device number 4 using ehci-pci
     kworker/0:4-185   [000] d...    25.228308: console: [   25.228306] usb 1-3: New USB device found, idVendor=5986, idProduct=02d5

Link: http://lkml.kernel.org/r/c350fb2521baaf681a1b4d67981ca0e900108e8e.1467407618.git.bristot@redhat.com

Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>
Cc: Ingo Molnar <mingo@redhat.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-07-15 15:52:41 -04:00
..
9p.h net/9p/tracing: Export enums in tracepoints to userspace 2015-04-08 09:39:59 -04:00
asoc.h ASoC: trace: fix printing jack name 2016-02-26 10:52:48 +09:00
bcache.h bcache: fix crash in bcache_btree_node_alloc_fail tracepoint 2014-08-04 15:23:03 -07:00
block.h blktrace: fix accounting of partially completed requests 2014-03-05 16:11:21 -07:00
btrfs.h Merge branch 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2016-04-09 10:41:34 -07:00
clk.h clk: Add tracepoints for hardware operations 2015-03-12 12:18:51 -07:00
cma.h mm: cma: add trace events for CMA allocations and freeings 2015-04-15 16:35:19 -07:00
compaction.h mm, compaction: distinguish between full and partial COMPACT_COMPLETE 2016-05-20 17:58:30 -07:00
context_tracking.h
cpuhp.h cpu/hotplug: Add tracepoints 2016-03-01 20:36:54 +01:00
ext4.h don't bother with ->d_inode->i_sb - it's always equal to ->d_sb 2016-04-10 17:11:51 -04:00
f2fs.h f2fs: use percpu_counter for page counters 2016-05-18 13:57:27 -07:00
fence.h tracing/dma-buf/fence: Fix timeline str value on fence_annotate_wait_on 2016-01-25 11:03:17 -05:00
fib6.h ipv6, trace: fix tos reporting on fib6_table_lookup 2016-03-20 13:44:34 -04:00
fib.h net: Make table id type u32 2015-09-01 14:32:44 -07:00
filelock.h locks: sprinkle some tracepoints around the file locking code 2016-01-08 11:38:13 -05:00
filemap.h tracing, mm: Record pfn instead of pointer to struct page 2015-04-13 11:44:52 -03:00
gpio.h tracing: gpio: Add Kconfig option for enabling/disabling trace events 2015-10-20 21:56:10 -04:00
host1x.h gpu: host1x: Use struct host1x_bo pointers in traces 2014-11-13 16:11:32 +01:00
hswadsp.h Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2014-03-12 23:04:35 +00:00
huge_memory.h mm, tracing: unify mm flags handling in tracepoints and printk 2016-03-15 16:55:16 -07:00
i2c.h i2c: Add message transfer tracepoints for SMBUS [ver #2] 2014-03-13 22:15:07 +01:00
intel-sst.h tracing: Add TRACE_SYSTEM_VAR to intel-sst 2015-04-07 12:31:12 -04:00
iommu.h iommu: Change trace unmap api to report unmapped size 2015-01-19 15:19:31 +01:00
ipi.h tracepoint: add generic tracepoint definitions for IPI tracing 2014-08-07 20:40:40 -04:00
irq.h irq_poll: make blk-iopoll available outside the block layer 2015-12-11 11:52:24 -08:00
jbd2.h
kmem.h Nothing major this round. Mostly small clean ups and fixes. 2016-03-24 10:52:25 -07:00
kvm.h KVM: Unify traced vector format 2016-05-24 12:11:06 +02:00
libata.h libata: Implement ZBC OUT translation 2016-05-09 12:36:46 -04:00
lock.h
mce.h
migrate.h mm: tracing: Export enums in tracepoints to user space 2015-04-08 09:40:01 -04:00
mmc.h mmc: core: Provide tracepoints for request processing 2016-05-02 10:33:11 +02:00
mmflags.h mm, tracing: refresh __def_vmaflag_names 2016-03-17 15:09:34 -07:00
module.h tracing: %pF is only for function pointers 2015-03-25 08:57:22 -04:00
napi.h
net.h net: rename vlan_tx_* helpers since "tx" is misleading there 2015-01-13 17:51:08 -05:00
nilfs2.h nilfs2: add tracepoints for analyzing reading and writing metadata files 2015-11-06 17:50:42 -08:00
nmi.h
oom.h
page_isolation.h mm/page_isolation: fix tracepoint to mirror check function behavior 2016-04-01 17:03:37 -05:00
page_ref.h mm/page_ref: add tracepoint to track down page reference manipulation 2016-03-17 15:09:34 -07:00
pagemap.h mm: pagemap: avoid unnecessary overhead when tracepoints are deactivated 2014-08-06 18:01:20 -07:00
power_cpu_migrate.h ARM: bL_switcher/trace: Add trace trigger for trace bootstrapping 2013-09-23 18:47:30 -04:00
power.h cpufreq: powernv/tracing: Add powernv_throttle tracepoint 2016-02-05 02:38:02 +01:00
printk.h printk, tracing: Avoiding unneeded blank lines 2016-07-15 15:52:41 -04:00
random.h tracing: %pF is only for function pointers 2015-03-25 08:57:22 -04:00
rcu.h rcu: Enforce expedited-GP fairness via funnel wait queue 2016-03-31 13:34:08 -07:00
regulator.h
rpm.h
sched.h sched/core: Fix trace_sched_switch() 2015-10-06 17:08:15 +02:00
scsi.h scsi-trace: define ZBC_IN and ZBC_OUT 2016-04-11 16:57:09 -04:00
signal.h
skb.h
sock.h
spi.h spi: Provide common spi_message processing loop 2013-10-11 20:09:50 +01:00
spmi.h spmi: add command tracepoints for SPMI 2015-08-05 12:27:09 -07:00
sunrpc.h net: sunrpc: fix tracepoint Warning: unknown op '->' 2015-08-31 16:32:15 -04:00
sunvnet.h sunvnet: Add support for perf LDC event tracing 2016-02-07 14:13:05 -05:00
swiotlb.h tracing/events: Add bounce tracing to swiotbl 2013-10-02 12:53:26 -04:00
syscalls.h tracepoint: Fix sparse warnings in tracepoint.c 2014-04-09 10:12:11 -04:00
target.h target: Minimize SCSI header #include directives 2015-06-02 08:03:25 -07:00
task.h tracing: Don't make assumptions about length of string on task rename 2015-08-31 10:47:14 -04:00
thermal_power_allocator.h thermal: consistently use int for temperatures 2015-08-03 23:15:50 +08:00
thermal.h thermal: trace: migrating thermal traces to use TRACE_DEFINE_ENUM() macros 2016-03-15 07:51:40 +08:00
thp.h powerpc/thp: Add tracepoints to track hugepage invalidate 2014-08-13 18:20:42 +10:00
timer.h nohz: Use enum code for tick stop failure tracing message 2016-03-02 16:42:15 +01:00
tlb.h tracing: Remove duplicate checks for online CPUs 2016-03-08 11:19:28 -05:00
udp.h
v4l2.h [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
vb2.h [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
vmscan.h mm, tracing: unify mm flags handling in tracepoints and printk 2016-03-15 16:55:16 -07:00
workqueue.h
writeback.h tracing, writeback: Replace cgroup path to cgroup ino 2016-03-08 11:19:37 -05:00
xen.h x86: expose number of page table levels on Kconfig level 2015-04-14 16:49:02 -07:00