Renaming struct trace_buffer to struct array_buffer
Subsystems (4)
PATCH 1/1 Renaming struct trace_buffer to struct array_buffer
As part of renaming perf's and ftrace's ring buffers, to avoid collision with new name for ftrace buffer.
perf's ring_buffer -> perf_buffer
ftrace's ring_buffer -> trace_buffer
Signed-off-by Jiri Olsa <[email protected]>
--- include/linux/trace_events.h | 2 +- kernel/trace/trace.c | 42 +++++++++++++++++------------------ kernel/trace/trace.h | 8 +++---- kernel/trace/trace_selftest.c | 4 ++-- 4 files changed, 28 insertions(+), 28 deletions(-)
include/linux/trace_events.h +1 -1
@@ -79,7 +79,7 @@ struct trace_entry {struct trace_iterator {struct trace_array *tr;struct tracer *trace; -struct trace_buffer *trace_buffer; +struct array_buffer *trace_buffer;void *private;int cpu_file;struct mutex mutex;
kernel/trace/trace.c +21 -21
144 lines not on this page · raw message
kernel/trace/trace.h +4 -4
@@ -176,7 +176,7 @@ struct trace_array_cpu {struct tracer ;struct trace_option_dentry ; -struct trace_buffer { +struct array_buffer {struct trace_array *tr;struct ring_buffer *buffer;struct trace_array_cpu __percpu *data;
@@ -249,7 +249,7 @@ struct cond_snapshot {struct trace_array {struct list_head list;char *name; -struct trace_buffer trace_buffer; +struct array_buffer trace_buffer;#ifdef CONFIG_TRACER_MAX_TRACE /* * The max_buffer is used to snapshot the trace when a maximum
@@ -262,7 +262,7 @@ struct trace_array {* with the buffer of the trace_buffer and the buffers are reset for * the trace_buffer so the tracing can continue. */ -struct trace_buffer max_buffer; +struct array_buffer max_buffer;bool allocated_snapshot;#endif #if defined(CONFIG_TRACER_MAX_TRACE ) || defined(CONFIG_HWLAT_TRACER )
@@ -685,7 +685,7 @@ trace_buffer_iter(struct trace_iterator *iter, int cpu)int tracer_init (struct tracer *t,struct trace_array *tr);int tracing_is_enabled (void ); -void tracing_reset_online_cpus (struct trace_buffer *buf); +void tracing_reset_online_cpus (struct array_buffer *buf);void tracing_reset_current (int cpu);void tracing_reset_all_online_cpus (void );int tracing_open_generic (struct inode *inode,struct file *filp);
kernel/trace/trace_selftest.c +2 -2
@@ -23,7 +23,7 @@ static inline int trace_valid_entry(struct trace_entry *entry)return 0 ; } -static int trace_test_buffer_cpu (struct trace_buffer *buf,int cpu) +static int trace_test_buffer_cpu (struct array_buffer *buf,int cpu) {struct ring_buffer_event *event;struct trace_entry *entry;
@@ -60,7 +60,7 @@ static int trace_test_buffer_cpu(struct trace_buffer *buf, int cpu)* Test the trace buffer to see if all the elements * are still sane. */ -static int __maybe_unused trace_test_buffer (struct trace_buffer *buf,unsigned long *count) +static int __maybe_unused trace_test_buffer (struct array_buffer *buf,unsigned long *count) {unsigned long flags, cnt =0 ;int cpu, ret =0 ;
Signature · 1 line
2.24.1