Commit 3f795dcf authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt

tracing: Rename ftrace_event_buffer to trace_event_buffer.

The name "ftrace" really refers to the function hook infrastructure. It
is not about the trace_events. The ftrace_event_buffer functions and data
structures are for trace_events and not for function hooks. Rename them
to trace_event_buffer*.
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 2425bcb9
...@@ -219,7 +219,7 @@ struct trace_event_class { ...@@ -219,7 +219,7 @@ struct trace_event_class {
extern int trace_event_reg(struct trace_event_call *event, extern int trace_event_reg(struct trace_event_call *event,
enum trace_reg type, void *data); enum trace_reg type, void *data);
struct ftrace_event_buffer { struct trace_event_buffer {
struct ring_buffer *buffer; struct ring_buffer *buffer;
struct ring_buffer_event *event; struct ring_buffer_event *event;
struct trace_event_file *trace_file; struct trace_event_file *trace_file;
...@@ -228,11 +228,11 @@ struct ftrace_event_buffer { ...@@ -228,11 +228,11 @@ struct ftrace_event_buffer {
int pc; int pc;
}; };
void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer, void *trace_event_buffer_reserve(struct trace_event_buffer *fbuffer,
struct trace_event_file *trace_file, struct trace_event_file *trace_file,
unsigned long len); unsigned long len);
void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer); void trace_event_buffer_commit(struct trace_event_buffer *fbuffer);
enum { enum {
TRACE_EVENT_FL_FILTERED_BIT, TRACE_EVENT_FL_FILTERED_BIT,
......
...@@ -155,7 +155,7 @@ ftrace_raw_event_##call(void *__data, proto) \ ...@@ -155,7 +155,7 @@ ftrace_raw_event_##call(void *__data, proto) \
{ \ { \
struct trace_event_file *trace_file = __data; \ struct trace_event_file *trace_file = __data; \
struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
struct ftrace_event_buffer fbuffer; \ struct trace_event_buffer fbuffer; \
struct ftrace_raw_##call *entry; \ struct ftrace_raw_##call *entry; \
int __data_size; \ int __data_size; \
\ \
...@@ -164,7 +164,7 @@ ftrace_raw_event_##call(void *__data, proto) \ ...@@ -164,7 +164,7 @@ ftrace_raw_event_##call(void *__data, proto) \
\ \
__data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \
\ \
entry = ftrace_event_buffer_reserve(&fbuffer, trace_file, \ entry = trace_event_buffer_reserve(&fbuffer, trace_file, \
sizeof(*entry) + __data_size); \ sizeof(*entry) + __data_size); \
\ \
if (!entry) \ if (!entry) \
...@@ -174,7 +174,7 @@ ftrace_raw_event_##call(void *__data, proto) \ ...@@ -174,7 +174,7 @@ ftrace_raw_event_##call(void *__data, proto) \
\ \
{ assign; } \ { assign; } \
\ \
ftrace_event_buffer_commit(&fbuffer); \ trace_event_buffer_commit(&fbuffer); \
} }
/* /*
* The ftrace_test_probe is compiled out, it is only here as a build time check * The ftrace_test_probe is compiled out, it is only here as a build time check
......
...@@ -190,7 +190,7 @@ int trace_event_raw_init(struct trace_event_call *call) ...@@ -190,7 +190,7 @@ int trace_event_raw_init(struct trace_event_call *call)
} }
EXPORT_SYMBOL_GPL(trace_event_raw_init); EXPORT_SYMBOL_GPL(trace_event_raw_init);
void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer, void *trace_event_buffer_reserve(struct trace_event_buffer *fbuffer,
struct trace_event_file *trace_file, struct trace_event_file *trace_file,
unsigned long len) unsigned long len)
{ {
...@@ -210,11 +210,11 @@ void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer, ...@@ -210,11 +210,11 @@ void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer,
fbuffer->entry = ring_buffer_event_data(fbuffer->event); fbuffer->entry = ring_buffer_event_data(fbuffer->event);
return fbuffer->entry; return fbuffer->entry;
} }
EXPORT_SYMBOL_GPL(ftrace_event_buffer_reserve); EXPORT_SYMBOL_GPL(trace_event_buffer_reserve);
static DEFINE_SPINLOCK(tracepoint_iter_lock); static DEFINE_SPINLOCK(tracepoint_iter_lock);
static void output_printk(struct ftrace_event_buffer *fbuffer) static void output_printk(struct trace_event_buffer *fbuffer)
{ {
struct trace_event_call *event_call; struct trace_event_call *event_call;
struct trace_event *event; struct trace_event *event;
...@@ -241,7 +241,7 @@ static void output_printk(struct ftrace_event_buffer *fbuffer) ...@@ -241,7 +241,7 @@ static void output_printk(struct ftrace_event_buffer *fbuffer)
spin_unlock_irqrestore(&tracepoint_iter_lock, flags); spin_unlock_irqrestore(&tracepoint_iter_lock, flags);
} }
void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer) void trace_event_buffer_commit(struct trace_event_buffer *fbuffer)
{ {
if (tracepoint_printk) if (tracepoint_printk)
output_printk(fbuffer); output_printk(fbuffer);
...@@ -250,7 +250,7 @@ void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer) ...@@ -250,7 +250,7 @@ void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer)
fbuffer->event, fbuffer->entry, fbuffer->event, fbuffer->entry,
fbuffer->flags, fbuffer->pc); fbuffer->flags, fbuffer->pc);
} }
EXPORT_SYMBOL_GPL(ftrace_event_buffer_commit); EXPORT_SYMBOL_GPL(trace_event_buffer_commit);
int trace_event_reg(struct trace_event_call *call, int trace_event_reg(struct trace_event_call *call,
enum trace_reg type, void *data) enum trace_reg type, void *data)
......
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