Merge tag 'trace-v5.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:
"Three minor tracing fixes:

- Fix missing prototypes in sample module for direct functions

- Fix check of valid buffer in get_trace_buf()

- Fix annotations of percpu pointers"

* tag 'trace-v5.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing: Tag trace_percpu_buffer as a percpu pointer
tracing: Fix check for trace_percpu_buffer validity in get_trace_buf()
ftrace/samples: Add missing prototypes direct functions

+14 -3
+3 -3
kernel/trace/trace.c
··· 3207 char buffer[4][TRACE_BUF_SIZE]; 3208 }; 3209 3210 - static struct trace_buffer_struct *trace_percpu_buffer; 3211 3212 /* 3213 * This allows for lockless recording. If we're nested too deeply, then ··· 3217 { 3218 struct trace_buffer_struct *buffer = this_cpu_ptr(trace_percpu_buffer); 3219 3220 - if (!buffer || buffer->nesting >= 4) 3221 return NULL; 3222 3223 buffer->nesting++; ··· 3236 3237 static int alloc_percpu_trace_buffer(void) 3238 { 3239 - struct trace_buffer_struct *buffers; 3240 3241 if (trace_percpu_buffer) 3242 return 0;
··· 3207 char buffer[4][TRACE_BUF_SIZE]; 3208 }; 3209 3210 + static struct trace_buffer_struct __percpu *trace_percpu_buffer; 3211 3212 /* 3213 * This allows for lockless recording. If we're nested too deeply, then ··· 3217 { 3218 struct trace_buffer_struct *buffer = this_cpu_ptr(trace_percpu_buffer); 3219 3220 + if (!trace_percpu_buffer || buffer->nesting >= 4) 3221 return NULL; 3222 3223 buffer->nesting++; ··· 3236 3237 static int alloc_percpu_trace_buffer(void) 3238 { 3239 + struct trace_buffer_struct __percpu *buffers; 3240 3241 if (trace_percpu_buffer) 3242 return 0;
+3
samples/ftrace/ftrace-direct-modify.c
··· 4 #include <linux/ftrace.h> 5 #include <asm/asm-offsets.h> 6 7 void my_direct_func1(void) 8 { 9 trace_printk("my direct func1\n");
··· 4 #include <linux/ftrace.h> 5 #include <asm/asm-offsets.h> 6 7 + extern void my_direct_func1(void); 8 + extern void my_direct_func2(void); 9 + 10 void my_direct_func1(void) 11 { 12 trace_printk("my direct func1\n");
+3
samples/ftrace/ftrace-direct-multi-modify.c
··· 4 #include <linux/ftrace.h> 5 #include <asm/asm-offsets.h> 6 7 void my_direct_func1(unsigned long ip) 8 { 9 trace_printk("my direct func1 ip %lx\n", ip);
··· 4 #include <linux/ftrace.h> 5 #include <asm/asm-offsets.h> 6 7 + extern void my_direct_func1(unsigned long ip); 8 + extern void my_direct_func2(unsigned long ip); 9 + 10 void my_direct_func1(unsigned long ip) 11 { 12 trace_printk("my direct func1 ip %lx\n", ip);
+3
samples/ftrace/ftrace-direct-too.c
··· 5 #include <linux/ftrace.h> 6 #include <asm/asm-offsets.h> 7 8 void my_direct_func(struct vm_area_struct *vma, 9 unsigned long address, unsigned int flags) 10 {
··· 5 #include <linux/ftrace.h> 6 #include <asm/asm-offsets.h> 7 8 + extern void my_direct_func(struct vm_area_struct *vma, 9 + unsigned long address, unsigned int flags); 10 + 11 void my_direct_func(struct vm_area_struct *vma, 12 unsigned long address, unsigned int flags) 13 {
+2
samples/ftrace/ftrace-direct.c
··· 5 #include <linux/ftrace.h> 6 #include <asm/asm-offsets.h> 7 8 void my_direct_func(struct task_struct *p) 9 { 10 trace_printk("waking up %s-%d\n", p->comm, p->pid);
··· 5 #include <linux/ftrace.h> 6 #include <asm/asm-offsets.h> 7 8 + extern void my_direct_func(struct task_struct *p); 9 + 10 void my_direct_func(struct task_struct *p) 11 { 12 trace_printk("waking up %s-%d\n", p->comm, p->pid);