tracing: Make struct ring_buffer less ambiguous

As there's two struct ring_buffers in the kernel, it causes some confusion.
The other one being the perf ring buffer. It was agreed upon that as neither
of the ring buffers are generic enough to be used globally, they should be
renamed as:

   perf's ring_buffer -> perf_buffer
   ftrace's ring_buffer -> trace_buffer

This implements the changes to the ring buffer that ftrace uses.

Link: https://lore.kernel.org/r/20191213140531.116b3200@gandalf.local.homeSigned-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 1c5eb448
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#define OP_BUFFER_FLAGS 0 #define OP_BUFFER_FLAGS 0
static struct ring_buffer *op_ring_buffer; static struct trace_buffer *op_ring_buffer;
DEFINE_PER_CPU(struct oprofile_cpu_buffer, op_cpu_buffer); DEFINE_PER_CPU(struct oprofile_cpu_buffer, op_cpu_buffer);
static void wq_sync_buffer(struct work_struct *work); static void wq_sync_buffer(struct work_struct *work);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/poll.h> #include <linux/poll.h>
struct ring_buffer; struct trace_buffer;
struct ring_buffer_iter; struct ring_buffer_iter;
/* /*
...@@ -77,13 +77,13 @@ u64 ring_buffer_event_time_stamp(struct ring_buffer_event *event); ...@@ -77,13 +77,13 @@ u64 ring_buffer_event_time_stamp(struct ring_buffer_event *event);
* else * else
* ring_buffer_unlock_commit(buffer, event); * ring_buffer_unlock_commit(buffer, event);
*/ */
void ring_buffer_discard_commit(struct ring_buffer *buffer, void ring_buffer_discard_commit(struct trace_buffer *buffer,
struct ring_buffer_event *event); struct ring_buffer_event *event);
/* /*
* size is in bytes for each per CPU buffer. * size is in bytes for each per CPU buffer.
*/ */
struct ring_buffer * struct trace_buffer *
__ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *key); __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *key);
/* /*
...@@ -97,38 +97,38 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k ...@@ -97,38 +97,38 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k
__ring_buffer_alloc((size), (flags), &__key); \ __ring_buffer_alloc((size), (flags), &__key); \
}) })
int ring_buffer_wait(struct ring_buffer *buffer, int cpu, int full); int ring_buffer_wait(struct trace_buffer *buffer, int cpu, int full);
__poll_t ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, __poll_t ring_buffer_poll_wait(struct trace_buffer *buffer, int cpu,
struct file *filp, poll_table *poll_table); struct file *filp, poll_table *poll_table);
#define RING_BUFFER_ALL_CPUS -1 #define RING_BUFFER_ALL_CPUS -1
void ring_buffer_free(struct ring_buffer *buffer); void ring_buffer_free(struct trace_buffer *buffer);
int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size, int cpu); int ring_buffer_resize(struct trace_buffer *buffer, unsigned long size, int cpu);
void ring_buffer_change_overwrite(struct ring_buffer *buffer, int val); void ring_buffer_change_overwrite(struct trace_buffer *buffer, int val);
struct ring_buffer_event *ring_buffer_lock_reserve(struct ring_buffer *buffer, struct ring_buffer_event *ring_buffer_lock_reserve(struct trace_buffer *buffer,
unsigned long length); unsigned long length);
int ring_buffer_unlock_commit(struct ring_buffer *buffer, int ring_buffer_unlock_commit(struct trace_buffer *buffer,
struct ring_buffer_event *event); struct ring_buffer_event *event);
int ring_buffer_write(struct ring_buffer *buffer, int ring_buffer_write(struct trace_buffer *buffer,
unsigned long length, void *data); unsigned long length, void *data);
void ring_buffer_nest_start(struct ring_buffer *buffer); void ring_buffer_nest_start(struct trace_buffer *buffer);
void ring_buffer_nest_end(struct ring_buffer *buffer); void ring_buffer_nest_end(struct trace_buffer *buffer);
struct ring_buffer_event * struct ring_buffer_event *
ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts, ring_buffer_peek(struct trace_buffer *buffer, int cpu, u64 *ts,
unsigned long *lost_events); unsigned long *lost_events);
struct ring_buffer_event * struct ring_buffer_event *
ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts, ring_buffer_consume(struct trace_buffer *buffer, int cpu, u64 *ts,
unsigned long *lost_events); unsigned long *lost_events);
struct ring_buffer_iter * struct ring_buffer_iter *
ring_buffer_read_prepare(struct ring_buffer *buffer, int cpu, gfp_t flags); ring_buffer_read_prepare(struct trace_buffer *buffer, int cpu, gfp_t flags);
void ring_buffer_read_prepare_sync(void); void ring_buffer_read_prepare_sync(void);
void ring_buffer_read_start(struct ring_buffer_iter *iter); void ring_buffer_read_start(struct ring_buffer_iter *iter);
void ring_buffer_read_finish(struct ring_buffer_iter *iter); void ring_buffer_read_finish(struct ring_buffer_iter *iter);
...@@ -140,59 +140,59 @@ ring_buffer_read(struct ring_buffer_iter *iter, u64 *ts); ...@@ -140,59 +140,59 @@ ring_buffer_read(struct ring_buffer_iter *iter, u64 *ts);
void ring_buffer_iter_reset(struct ring_buffer_iter *iter); void ring_buffer_iter_reset(struct ring_buffer_iter *iter);
int ring_buffer_iter_empty(struct ring_buffer_iter *iter); int ring_buffer_iter_empty(struct ring_buffer_iter *iter);
unsigned long ring_buffer_size(struct ring_buffer *buffer, int cpu); unsigned long ring_buffer_size(struct trace_buffer *buffer, int cpu);
void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu); void ring_buffer_reset_cpu(struct trace_buffer *buffer, int cpu);
void ring_buffer_reset(struct ring_buffer *buffer); void ring_buffer_reset(struct trace_buffer *buffer);
#ifdef CONFIG_RING_BUFFER_ALLOW_SWAP #ifdef CONFIG_RING_BUFFER_ALLOW_SWAP
int ring_buffer_swap_cpu(struct ring_buffer *buffer_a, int ring_buffer_swap_cpu(struct trace_buffer *buffer_a,
struct ring_buffer *buffer_b, int cpu); struct trace_buffer *buffer_b, int cpu);
#else #else
static inline int static inline int
ring_buffer_swap_cpu(struct ring_buffer *buffer_a, ring_buffer_swap_cpu(struct trace_buffer *buffer_a,
struct ring_buffer *buffer_b, int cpu) struct trace_buffer *buffer_b, int cpu)
{ {
return -ENODEV; return -ENODEV;
} }
#endif #endif
bool ring_buffer_empty(struct ring_buffer *buffer); bool ring_buffer_empty(struct trace_buffer *buffer);
bool ring_buffer_empty_cpu(struct ring_buffer *buffer, int cpu); bool ring_buffer_empty_cpu(struct trace_buffer *buffer, int cpu);
void ring_buffer_record_disable(struct ring_buffer *buffer); void ring_buffer_record_disable(struct trace_buffer *buffer);
void ring_buffer_record_enable(struct ring_buffer *buffer); void ring_buffer_record_enable(struct trace_buffer *buffer);
void ring_buffer_record_off(struct ring_buffer *buffer); void ring_buffer_record_off(struct trace_buffer *buffer);
void ring_buffer_record_on(struct ring_buffer *buffer); void ring_buffer_record_on(struct trace_buffer *buffer);
bool ring_buffer_record_is_on(struct ring_buffer *buffer); bool ring_buffer_record_is_on(struct trace_buffer *buffer);
bool ring_buffer_record_is_set_on(struct ring_buffer *buffer); bool ring_buffer_record_is_set_on(struct trace_buffer *buffer);
void ring_buffer_record_disable_cpu(struct ring_buffer *buffer, int cpu); void ring_buffer_record_disable_cpu(struct trace_buffer *buffer, int cpu);
void ring_buffer_record_enable_cpu(struct ring_buffer *buffer, int cpu); void ring_buffer_record_enable_cpu(struct trace_buffer *buffer, int cpu);
u64 ring_buffer_oldest_event_ts(struct ring_buffer *buffer, int cpu); u64 ring_buffer_oldest_event_ts(struct trace_buffer *buffer, int cpu);
unsigned long ring_buffer_bytes_cpu(struct ring_buffer *buffer, int cpu); unsigned long ring_buffer_bytes_cpu(struct trace_buffer *buffer, int cpu);
unsigned long ring_buffer_entries(struct ring_buffer *buffer); unsigned long ring_buffer_entries(struct trace_buffer *buffer);
unsigned long ring_buffer_overruns(struct ring_buffer *buffer); unsigned long ring_buffer_overruns(struct trace_buffer *buffer);
unsigned long ring_buffer_entries_cpu(struct ring_buffer *buffer, int cpu); unsigned long ring_buffer_entries_cpu(struct trace_buffer *buffer, int cpu);
unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu); unsigned long ring_buffer_overrun_cpu(struct trace_buffer *buffer, int cpu);
unsigned long ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu); unsigned long ring_buffer_commit_overrun_cpu(struct trace_buffer *buffer, int cpu);
unsigned long ring_buffer_dropped_events_cpu(struct ring_buffer *buffer, int cpu); unsigned long ring_buffer_dropped_events_cpu(struct trace_buffer *buffer, int cpu);
unsigned long ring_buffer_read_events_cpu(struct ring_buffer *buffer, int cpu); unsigned long ring_buffer_read_events_cpu(struct trace_buffer *buffer, int cpu);
u64 ring_buffer_time_stamp(struct ring_buffer *buffer, int cpu); u64 ring_buffer_time_stamp(struct trace_buffer *buffer, int cpu);
void ring_buffer_normalize_time_stamp(struct ring_buffer *buffer, void ring_buffer_normalize_time_stamp(struct trace_buffer *buffer,
int cpu, u64 *ts); int cpu, u64 *ts);
void ring_buffer_set_clock(struct ring_buffer *buffer, void ring_buffer_set_clock(struct trace_buffer *buffer,
u64 (*clock)(void)); u64 (*clock)(void));
void ring_buffer_set_time_stamp_abs(struct ring_buffer *buffer, bool abs); void ring_buffer_set_time_stamp_abs(struct trace_buffer *buffer, bool abs);
bool ring_buffer_time_stamp_abs(struct ring_buffer *buffer); bool ring_buffer_time_stamp_abs(struct trace_buffer *buffer);
size_t ring_buffer_nr_pages(struct ring_buffer *buffer, int cpu); size_t ring_buffer_nr_pages(struct trace_buffer *buffer, int cpu);
size_t ring_buffer_nr_dirty_pages(struct ring_buffer *buffer, int cpu); size_t ring_buffer_nr_dirty_pages(struct trace_buffer *buffer, int cpu);
void *ring_buffer_alloc_read_page(struct ring_buffer *buffer, int cpu); void *ring_buffer_alloc_read_page(struct trace_buffer *buffer, int cpu);
void ring_buffer_free_read_page(struct ring_buffer *buffer, int cpu, void *data); void ring_buffer_free_read_page(struct trace_buffer *buffer, int cpu, void *data);
int ring_buffer_read_page(struct ring_buffer *buffer, void **data_page, int ring_buffer_read_page(struct trace_buffer *buffer, void **data_page,
size_t len, int cpu, int full); size_t len, int cpu, int full);
struct trace_seq; struct trace_seq;
......
...@@ -153,7 +153,7 @@ void tracing_generic_entry_update(struct trace_entry *entry, ...@@ -153,7 +153,7 @@ void tracing_generic_entry_update(struct trace_entry *entry,
struct trace_event_file; struct trace_event_file;
struct ring_buffer_event * struct ring_buffer_event *
trace_event_buffer_lock_reserve(struct ring_buffer **current_buffer, trace_event_buffer_lock_reserve(struct trace_buffer **current_buffer,
struct trace_event_file *trace_file, struct trace_event_file *trace_file,
int type, unsigned long len, int type, unsigned long len,
unsigned long flags, int pc); unsigned long flags, int pc);
...@@ -210,7 +210,7 @@ extern int trace_event_reg(struct trace_event_call *event, ...@@ -210,7 +210,7 @@ extern int trace_event_reg(struct trace_event_call *event,
enum trace_reg type, void *data); enum trace_reg type, void *data);
struct trace_event_buffer { struct trace_event_buffer {
struct ring_buffer *buffer; struct trace_buffer *buffer;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct trace_event_file *trace_file; struct trace_event_file *trace_file;
void *entry; void *entry;
......
...@@ -570,7 +570,7 @@ static inline notrace int trace_event_get_offsets_##call( \ ...@@ -570,7 +570,7 @@ static inline notrace int trace_event_get_offsets_##call( \
* enum event_trigger_type __tt = ETT_NONE; * enum event_trigger_type __tt = ETT_NONE;
* struct ring_buffer_event *event; * struct ring_buffer_event *event;
* struct trace_event_raw_<call> *entry; <-- defined in stage 1 * struct trace_event_raw_<call> *entry; <-- defined in stage 1
* struct ring_buffer *buffer; * struct trace_buffer *buffer;
* unsigned long irq_flags; * unsigned long irq_flags;
* int __data_size; * int __data_size;
* int pc; * int pc;
......
...@@ -68,7 +68,7 @@ static void trace_note(struct blk_trace *bt, pid_t pid, int action, ...@@ -68,7 +68,7 @@ static void trace_note(struct blk_trace *bt, pid_t pid, int action,
{ {
struct blk_io_trace *t; struct blk_io_trace *t;
struct ring_buffer_event *event = NULL; struct ring_buffer_event *event = NULL;
struct ring_buffer *buffer = NULL; struct trace_buffer *buffer = NULL;
int pc = 0; int pc = 0;
int cpu = smp_processor_id(); int cpu = smp_processor_id();
bool blk_tracer = blk_tracer_enabled; bool blk_tracer = blk_tracer_enabled;
...@@ -215,7 +215,7 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes, ...@@ -215,7 +215,7 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
{ {
struct task_struct *tsk = current; struct task_struct *tsk = current;
struct ring_buffer_event *event = NULL; struct ring_buffer_event *event = NULL;
struct ring_buffer *buffer = NULL; struct trace_buffer *buffer = NULL;
struct blk_io_trace *t; struct blk_io_trace *t;
unsigned long flags = 0; unsigned long flags = 0;
unsigned long *sequence; unsigned long *sequence;
......
This diff is collapsed.
...@@ -29,7 +29,7 @@ static int reader_finish; ...@@ -29,7 +29,7 @@ static int reader_finish;
static DECLARE_COMPLETION(read_start); static DECLARE_COMPLETION(read_start);
static DECLARE_COMPLETION(read_done); static DECLARE_COMPLETION(read_done);
static struct ring_buffer *buffer; static struct trace_buffer *buffer;
static struct task_struct *producer; static struct task_struct *producer;
static struct task_struct *consumer; static struct task_struct *consumer;
static unsigned long read; static unsigned long read;
......
This diff is collapsed.
...@@ -178,7 +178,7 @@ struct trace_option_dentry; ...@@ -178,7 +178,7 @@ struct trace_option_dentry;
struct array_buffer { struct array_buffer {
struct trace_array *tr; struct trace_array *tr;
struct ring_buffer *buffer; struct trace_buffer *buffer;
struct trace_array_cpu __percpu *data; struct trace_array_cpu __percpu *data;
u64 time_start; u64 time_start;
int cpu; int cpu;
...@@ -705,7 +705,7 @@ struct dentry *tracing_init_dentry(void); ...@@ -705,7 +705,7 @@ struct dentry *tracing_init_dentry(void);
struct ring_buffer_event; struct ring_buffer_event;
struct ring_buffer_event * struct ring_buffer_event *
trace_buffer_lock_reserve(struct ring_buffer *buffer, trace_buffer_lock_reserve(struct trace_buffer *buffer,
int type, int type,
unsigned long len, unsigned long len,
unsigned long flags, unsigned long flags,
...@@ -717,7 +717,7 @@ struct trace_entry *tracing_get_trace_entry(struct trace_array *tr, ...@@ -717,7 +717,7 @@ struct trace_entry *tracing_get_trace_entry(struct trace_array *tr,
struct trace_entry *trace_find_next_entry(struct trace_iterator *iter, struct trace_entry *trace_find_next_entry(struct trace_iterator *iter,
int *ent_cpu, u64 *ent_ts); int *ent_cpu, u64 *ent_ts);
void trace_buffer_unlock_commit_nostack(struct ring_buffer *buffer, void trace_buffer_unlock_commit_nostack(struct trace_buffer *buffer,
struct ring_buffer_event *event); struct ring_buffer_event *event);
int trace_empty(struct trace_iterator *iter); int trace_empty(struct trace_iterator *iter);
...@@ -873,7 +873,7 @@ trace_vprintk(unsigned long ip, const char *fmt, va_list args); ...@@ -873,7 +873,7 @@ trace_vprintk(unsigned long ip, const char *fmt, va_list args);
extern int extern int
trace_array_vprintk(struct trace_array *tr, trace_array_vprintk(struct trace_array *tr,
unsigned long ip, const char *fmt, va_list args); unsigned long ip, const char *fmt, va_list args);
int trace_array_printk_buf(struct ring_buffer *buffer, int trace_array_printk_buf(struct trace_buffer *buffer,
unsigned long ip, const char *fmt, ...); unsigned long ip, const char *fmt, ...);
void trace_printk_seq(struct trace_seq *s); void trace_printk_seq(struct trace_seq *s);
enum print_line_t print_trace_line(struct trace_iterator *iter); enum print_line_t print_trace_line(struct trace_iterator *iter);
...@@ -1367,17 +1367,17 @@ struct trace_subsystem_dir { ...@@ -1367,17 +1367,17 @@ struct trace_subsystem_dir {
}; };
extern int call_filter_check_discard(struct trace_event_call *call, void *rec, extern int call_filter_check_discard(struct trace_event_call *call, void *rec,
struct ring_buffer *buffer, struct trace_buffer *buffer,
struct ring_buffer_event *event); struct ring_buffer_event *event);
void trace_buffer_unlock_commit_regs(struct trace_array *tr, void trace_buffer_unlock_commit_regs(struct trace_array *tr,
struct ring_buffer *buffer, struct trace_buffer *buffer,
struct ring_buffer_event *event, struct ring_buffer_event *event,
unsigned long flags, int pc, unsigned long flags, int pc,
struct pt_regs *regs); struct pt_regs *regs);
static inline void trace_buffer_unlock_commit(struct trace_array *tr, static inline void trace_buffer_unlock_commit(struct trace_array *tr,
struct ring_buffer *buffer, struct trace_buffer *buffer,
struct ring_buffer_event *event, struct ring_buffer_event *event,
unsigned long flags, int pc) unsigned long flags, int pc)
{ {
...@@ -1390,7 +1390,7 @@ void trace_buffered_event_disable(void); ...@@ -1390,7 +1390,7 @@ void trace_buffered_event_disable(void);
void trace_buffered_event_enable(void); void trace_buffered_event_enable(void);
static inline void static inline void
__trace_event_discard_commit(struct ring_buffer *buffer, __trace_event_discard_commit(struct trace_buffer *buffer,
struct ring_buffer_event *event) struct ring_buffer_event *event)
{ {
if (this_cpu_read(trace_buffered_event) == event) { if (this_cpu_read(trace_buffered_event) == event) {
...@@ -1416,7 +1416,7 @@ __trace_event_discard_commit(struct ring_buffer *buffer, ...@@ -1416,7 +1416,7 @@ __trace_event_discard_commit(struct ring_buffer *buffer,
*/ */
static inline bool static inline bool
__event_trigger_test_discard(struct trace_event_file *file, __event_trigger_test_discard(struct trace_event_file *file,
struct ring_buffer *buffer, struct trace_buffer *buffer,
struct ring_buffer_event *event, struct ring_buffer_event *event,
void *entry, void *entry,
enum event_trigger_type *tt) enum event_trigger_type *tt)
...@@ -1451,7 +1451,7 @@ __event_trigger_test_discard(struct trace_event_file *file, ...@@ -1451,7 +1451,7 @@ __event_trigger_test_discard(struct trace_event_file *file,
*/ */
static inline void static inline void
event_trigger_unlock_commit(struct trace_event_file *file, event_trigger_unlock_commit(struct trace_event_file *file,
struct ring_buffer *buffer, struct trace_buffer *buffer,
struct ring_buffer_event *event, struct ring_buffer_event *event,
void *entry, unsigned long irq_flags, int pc) void *entry, unsigned long irq_flags, int pc)
{ {
...@@ -1482,7 +1482,7 @@ event_trigger_unlock_commit(struct trace_event_file *file, ...@@ -1482,7 +1482,7 @@ event_trigger_unlock_commit(struct trace_event_file *file,
*/ */
static inline void static inline void
event_trigger_unlock_commit_regs(struct trace_event_file *file, event_trigger_unlock_commit_regs(struct trace_event_file *file,
struct ring_buffer *buffer, struct trace_buffer *buffer,
struct ring_buffer_event *event, struct ring_buffer_event *event,
void *entry, unsigned long irq_flags, int pc, void *entry, unsigned long irq_flags, int pc,
struct pt_regs *regs) struct pt_regs *regs)
......
...@@ -32,10 +32,10 @@ probe_likely_condition(struct ftrace_likely_data *f, int val, int expect) ...@@ -32,10 +32,10 @@ probe_likely_condition(struct ftrace_likely_data *f, int val, int expect)
{ {
struct trace_event_call *call = &event_branch; struct trace_event_call *call = &event_branch;
struct trace_array *tr = branch_tracer; struct trace_array *tr = branch_tracer;
struct trace_buffer *buffer;
struct trace_array_cpu *data; struct trace_array_cpu *data;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct trace_branch *entry; struct trace_branch *entry;
struct ring_buffer *buffer;
unsigned long flags; unsigned long flags;
int pc; int pc;
const char *p; const char *p;
......
...@@ -3391,8 +3391,8 @@ static void __init ...@@ -3391,8 +3391,8 @@ static void __init
function_test_events_call(unsigned long ip, unsigned long parent_ip, function_test_events_call(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *op, struct pt_regs *pt_regs) struct ftrace_ops *op, struct pt_regs *pt_regs)
{ {
struct trace_buffer *buffer;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct ring_buffer *buffer;
struct ftrace_entry *entry; struct ftrace_entry *entry;
unsigned long flags; unsigned long flags;
long disabled; long disabled;
......
...@@ -879,7 +879,7 @@ static notrace void trace_event_raw_event_synth(void *__data, ...@@ -879,7 +879,7 @@ static notrace void trace_event_raw_event_synth(void *__data,
struct trace_event_file *trace_file = __data; struct trace_event_file *trace_file = __data;
struct synth_trace_event *entry; struct synth_trace_event *entry;
struct trace_event_buffer fbuffer; struct trace_event_buffer fbuffer;
struct ring_buffer *buffer; struct trace_buffer *buffer;
struct synth_event *event; struct synth_event *event;
unsigned int i, n_u64; unsigned int i, n_u64;
int fields_size = 0; int fields_size = 0;
......
...@@ -101,7 +101,7 @@ int __trace_graph_entry(struct trace_array *tr, ...@@ -101,7 +101,7 @@ int __trace_graph_entry(struct trace_array *tr,
{ {
struct trace_event_call *call = &event_funcgraph_entry; struct trace_event_call *call = &event_funcgraph_entry;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct ring_buffer *buffer = tr->array_buffer.buffer; struct trace_buffer *buffer = tr->array_buffer.buffer;
struct ftrace_graph_ent_entry *entry; struct ftrace_graph_ent_entry *entry;
event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_ENT, event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_ENT,
...@@ -221,7 +221,7 @@ void __trace_graph_return(struct trace_array *tr, ...@@ -221,7 +221,7 @@ void __trace_graph_return(struct trace_array *tr,
{ {
struct trace_event_call *call = &event_funcgraph_exit; struct trace_event_call *call = &event_funcgraph_exit;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct ring_buffer *buffer = tr->array_buffer.buffer; struct trace_buffer *buffer = tr->array_buffer.buffer;
struct ftrace_graph_ret_entry *entry; struct ftrace_graph_ret_entry *entry;
event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_RET, event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_RET,
......
...@@ -104,7 +104,7 @@ static void trace_hwlat_sample(struct hwlat_sample *sample) ...@@ -104,7 +104,7 @@ static void trace_hwlat_sample(struct hwlat_sample *sample)
{ {
struct trace_array *tr = hwlat_trace; struct trace_array *tr = hwlat_trace;
struct trace_event_call *call = &event_hwlat; struct trace_event_call *call = &event_hwlat;
struct ring_buffer *buffer = tr->array_buffer.buffer; struct trace_buffer *buffer = tr->array_buffer.buffer;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct hwlat_entry *entry; struct hwlat_entry *entry;
unsigned long flags; unsigned long flags;
......
...@@ -1175,8 +1175,8 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs, ...@@ -1175,8 +1175,8 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,
struct trace_event_file *trace_file) struct trace_event_file *trace_file)
{ {
struct kprobe_trace_entry_head *entry; struct kprobe_trace_entry_head *entry;
struct trace_buffer *buffer;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct ring_buffer *buffer;
int size, dsize, pc; int size, dsize, pc;
unsigned long irq_flags; unsigned long irq_flags;
struct trace_event_call *call = trace_probe_event_call(&tk->tp); struct trace_event_call *call = trace_probe_event_call(&tk->tp);
...@@ -1223,8 +1223,8 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri, ...@@ -1223,8 +1223,8 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,
struct trace_event_file *trace_file) struct trace_event_file *trace_file)
{ {
struct kretprobe_trace_entry_head *entry; struct kretprobe_trace_entry_head *entry;
struct trace_buffer *buffer;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct ring_buffer *buffer;
int size, pc, dsize; int size, pc, dsize;
unsigned long irq_flags; unsigned long irq_flags;
struct trace_event_call *call = trace_probe_event_call(&tk->tp); struct trace_event_call *call = trace_probe_event_call(&tk->tp);
......
...@@ -297,7 +297,7 @@ static void __trace_mmiotrace_rw(struct trace_array *tr, ...@@ -297,7 +297,7 @@ static void __trace_mmiotrace_rw(struct trace_array *tr,
struct mmiotrace_rw *rw) struct mmiotrace_rw *rw)
{ {
struct trace_event_call *call = &event_mmiotrace_rw; struct trace_event_call *call = &event_mmiotrace_rw;
struct ring_buffer *buffer = tr->array_buffer.buffer; struct trace_buffer *buffer = tr->array_buffer.buffer;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct trace_mmiotrace_rw *entry; struct trace_mmiotrace_rw *entry;
int pc = preempt_count(); int pc = preempt_count();
...@@ -327,7 +327,7 @@ static void __trace_mmiotrace_map(struct trace_array *tr, ...@@ -327,7 +327,7 @@ static void __trace_mmiotrace_map(struct trace_array *tr,
struct mmiotrace_map *map) struct mmiotrace_map *map)
{ {
struct trace_event_call *call = &event_mmiotrace_map; struct trace_event_call *call = &event_mmiotrace_map;
struct ring_buffer *buffer = tr->array_buffer.buffer; struct trace_buffer *buffer = tr->array_buffer.buffer;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct trace_mmiotrace_map *entry; struct trace_mmiotrace_map *entry;
int pc = preempt_count(); int pc = preempt_count();
......
...@@ -378,7 +378,7 @@ tracing_sched_switch_trace(struct trace_array *tr, ...@@ -378,7 +378,7 @@ tracing_sched_switch_trace(struct trace_array *tr,
unsigned long flags, int pc) unsigned long flags, int pc)
{ {
struct trace_event_call *call = &event_context_switch; struct trace_event_call *call = &event_context_switch;
struct ring_buffer *buffer = tr->array_buffer.buffer; struct trace_buffer *buffer = tr->array_buffer.buffer;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct ctx_switch_entry *entry; struct ctx_switch_entry *entry;
...@@ -408,7 +408,7 @@ tracing_sched_wakeup_trace(struct trace_array *tr, ...@@ -408,7 +408,7 @@ tracing_sched_wakeup_trace(struct trace_array *tr,
struct trace_event_call *call = &event_wakeup; struct trace_event_call *call = &event_wakeup;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct ctx_switch_entry *entry; struct ctx_switch_entry *entry;
struct ring_buffer *buffer = tr->array_buffer.buffer; struct trace_buffer *buffer = tr->array_buffer.buffer;
event = trace_buffer_lock_reserve(buffer, TRACE_WAKE, event = trace_buffer_lock_reserve(buffer, TRACE_WAKE,
sizeof(*entry), flags, pc); sizeof(*entry), flags, pc);
......
...@@ -317,7 +317,7 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id) ...@@ -317,7 +317,7 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)
struct syscall_trace_enter *entry; struct syscall_trace_enter *entry;
struct syscall_metadata *sys_data; struct syscall_metadata *sys_data;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct ring_buffer *buffer; struct trace_buffer *buffer;
unsigned long irq_flags; unsigned long irq_flags;
unsigned long args[6]; unsigned long args[6];
int pc; int pc;
...@@ -367,7 +367,7 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret) ...@@ -367,7 +367,7 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)
struct syscall_trace_exit *entry; struct syscall_trace_exit *entry;
struct syscall_metadata *sys_data; struct syscall_metadata *sys_data;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct ring_buffer *buffer; struct trace_buffer *buffer;
unsigned long irq_flags; unsigned long irq_flags;
int pc; int pc;
int syscall_nr; int syscall_nr;
......
...@@ -938,8 +938,8 @@ static void __uprobe_trace_func(struct trace_uprobe *tu, ...@@ -938,8 +938,8 @@ static void __uprobe_trace_func(struct trace_uprobe *tu,
struct trace_event_file *trace_file) struct trace_event_file *trace_file)
{ {
struct uprobe_trace_entry_head *entry; struct uprobe_trace_entry_head *entry;
struct trace_buffer *buffer;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct ring_buffer *buffer;
void *data; void *data;
int size, esize; int size, esize;
struct trace_event_call *call = trace_probe_event_call(&tu->tp); struct trace_event_call *call = trace_probe_event_call(&tu->tp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment