Skip to content

Commit 7acfa2c

Browse files
committed
Merge tag 'trace-ringbuffer-v7.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull ring-buffer fixes from Steven Rostedt: - Fix reporting MISSED EVENTS in trace iterator When the "trace" file is read with tracing enabled, if the writer were to pass the iterator reader, it resets, sets a "missed_events" flag and continues. The tracing output checks for missed events and if there are some, it prints out "[LOST EVENTS]" to let the user know events were dropped. But the clearing of the missed_events happened when the tracing system queried the ring buffer iterator about missed events. This was premature as the ring buffer is per CPU, and the tracing code reads all the CPU buffers and checks for missed events when it is read. If the CPU iterator that had missed events isn't printed next, the output for the LOST EVENTS is lost. Clear the missed_events flag when the iterator moves to the next event and not when the missed_events flag is queried. Also clear it on reset. - Flush and stop the persistent ring buffer on panic On panic the persistent ring buffer is used to debug what caused the panic. But on some architectures, it requires flushing the memory from cache, otherwise, the ring buffer persistent memory may not have the last events and this could also cause the ring buffer to be corrupted on the next boot. - Fix nr_subbufs initialization in simple_ring_buffer_init_mm The remote simple ring buffer meta data nr_subbufs is initialized too early and gets cleared later on, making it zero and not reflect the actual number of sub-buffers. - Fix unload_page for simple_ring_buffer init rollback On error, the pages loaded need to be unloaded. To unload a page it is expected that: page = load_page(va); -> unload_page(page). But the code was doing: unload_page(va) and not unload_page(page). - Create output file from cmd_check_undefined The check for undefined symbols checks if the file *.o.checked exists and if so it skips doing the work. But the *.o.checked file never was created making every build do the work even when it was already done previously. * tag 'trace-ringbuffer-v7.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Create output file from cmd_check_undefined tracing: Fix unload_page for simple_ring_buffer init rollback tracing: Fix nr_subbufs initialization in simple_ring_buffer_init_mm() ring-buffer: Flush and stop persistent ring buffer on panic ring-buffer: Fix reporting of missed events in iterator
2 parents 758c807 + 057caac commit 7acfa2c

25 files changed

Lines changed: 72 additions & 8 deletions

File tree

arch/alpha/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ generic-y += agp.h
55
generic-y += asm-offsets.h
66
generic-y += kvm_para.h
77
generic-y += mcs_spinlock.h
8+
generic-y += ring_buffer.h
89
generic-y += text-patching.h

arch/arc/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ generic-y += extable.h
55
generic-y += kvm_para.h
66
generic-y += mcs_spinlock.h
77
generic-y += parport.h
8+
generic-y += ring_buffer.h
89
generic-y += user.h
910
generic-y += text-patching.h

arch/arm/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ generic-y += early_ioremap.h
33
generic-y += extable.h
44
generic-y += flat.h
55
generic-y += parport.h
6+
generic-y += ring_buffer.h
67

78
generated-y += mach-types.h
89
generated-y += unistd-nr.h
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
#ifndef _ASM_ARM64_RING_BUFFER_H
3+
#define _ASM_ARM64_RING_BUFFER_H
4+
5+
#include <asm/cacheflush.h>
6+
7+
/* Flush D-cache on persistent ring buffer */
8+
#define arch_ring_buffer_flush_range(start, end) dcache_clean_pop(start, end)
9+
10+
#endif /* _ASM_ARM64_RING_BUFFER_H */

arch/csky/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ generic-y += qrwlock.h
99
generic-y += qrwlock_types.h
1010
generic-y += qspinlock.h
1111
generic-y += parport.h
12+
generic-y += ring_buffer.h
1213
generic-y += user.h
1314
generic-y += vmlinux.lds.h
1415
generic-y += text-patching.h

arch/hexagon/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ generic-y += extable.h
55
generic-y += iomap.h
66
generic-y += kvm_para.h
77
generic-y += mcs_spinlock.h
8+
generic-y += ring_buffer.h
89
generic-y += text-patching.h

arch/loongarch/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ generic-y += qrwlock.h
1010
generic-y += user.h
1111
generic-y += ioctl.h
1212
generic-y += mmzone.h
13+
generic-y += ring_buffer.h
1314
generic-y += statfs.h
1415
generic-y += text-patching.h

arch/m68k/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ generated-y += syscall_table.h
33
generic-y += extable.h
44
generic-y += kvm_para.h
55
generic-y += mcs_spinlock.h
6+
generic-y += ring_buffer.h
67
generic-y += spinlock.h
78
generic-y += text-patching.h

arch/microblaze/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ generic-y += extable.h
55
generic-y += kvm_para.h
66
generic-y += mcs_spinlock.h
77
generic-y += parport.h
8+
generic-y += ring_buffer.h
89
generic-y += syscalls.h
910
generic-y += tlb.h
1011
generic-y += user.h

arch/mips/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ generic-y += mcs_spinlock.h
1212
generic-y += parport.h
1313
generic-y += qrwlock.h
1414
generic-y += qspinlock.h
15+
generic-y += ring_buffer.h
1516
generic-y += user.h
1617
generic-y += text-patching.h

0 commit comments

Comments
 (0)