Skip to content

Commit 3f795dc

Browse files
committed
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: Steven Rostedt <rostedt@goodmis.org>
1 parent 2425bcb commit 3f795dc

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎include/linux/trace_events.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ struct trace_event_class {
219219
extern int trace_event_reg(struct trace_event_call *event,
220220
enum trace_reg type, void *data);
221221

222-
struct ftrace_event_buffer {
222+
struct trace_event_buffer {
223223
struct ring_buffer *buffer;
224224
struct ring_buffer_event *event;
225225
struct trace_event_file *trace_file;
@@ -228,11 +228,11 @@ struct ftrace_event_buffer {
228228
int pc;
229229
};
230230

231-
void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer,
231+
void *trace_event_buffer_reserve(struct trace_event_buffer *fbuffer,
232232
struct trace_event_file *trace_file,
233233
unsigned long len);
234234

235-
void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer);
235+
void trace_event_buffer_commit(struct trace_event_buffer *fbuffer);
236236

237237
enum {
238238
TRACE_EVENT_FL_FILTERED_BIT,

‎include/trace/perf.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ ftrace_raw_event_##call(void *__data, proto) \
155155
{ \
156156
struct trace_event_file *trace_file = __data; \
157157
struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
158-
struct ftrace_event_buffer fbuffer; \
158+
struct trace_event_buffer fbuffer; \
159159
struct ftrace_raw_##call *entry; \
160160
int __data_size; \
161161
\
@@ -164,7 +164,7 @@ ftrace_raw_event_##call(void *__data, proto) \
164164
\
165165
__data_size = ftrace_get_offsets_##call(&__data_offsets, args); \
166166
\
167-
entry = ftrace_event_buffer_reserve(&fbuffer, trace_file, \
167+
entry = trace_event_buffer_reserve(&fbuffer, trace_file, \
168168
sizeof(*entry) + __data_size); \
169169
\
170170
if (!entry) \
@@ -174,7 +174,7 @@ ftrace_raw_event_##call(void *__data, proto) \
174174
\
175175
{ assign; } \
176176
\
177-
ftrace_event_buffer_commit(&fbuffer); \
177+
trace_event_buffer_commit(&fbuffer); \
178178
}
179179
/*
180180
* The ftrace_test_probe is compiled out, it is only here as a build time check

‎kernel/trace/trace_events.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ int trace_event_raw_init(struct trace_event_call *call)
190190
}
191191
EXPORT_SYMBOL_GPL(trace_event_raw_init);
192192

193-
void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer,
194-
struct trace_event_file *trace_file,
195-
unsigned long len)
193+
void *trace_event_buffer_reserve(struct trace_event_buffer *fbuffer,
194+
struct trace_event_file *trace_file,
195+
unsigned long len)
196196
{
197197
struct trace_event_call *event_call = trace_file->event_call;
198198

@@ -210,11 +210,11 @@ void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer,
210210
fbuffer->entry = ring_buffer_event_data(fbuffer->event);
211211
return fbuffer->entry;
212212
}
213-
EXPORT_SYMBOL_GPL(ftrace_event_buffer_reserve);
213+
EXPORT_SYMBOL_GPL(trace_event_buffer_reserve);
214214

215215
static DEFINE_SPINLOCK(tracepoint_iter_lock);
216216

217-
static void output_printk(struct ftrace_event_buffer *fbuffer)
217+
static void output_printk(struct trace_event_buffer *fbuffer)
218218
{
219219
struct trace_event_call *event_call;
220220
struct trace_event *event;
@@ -241,7 +241,7 @@ static void output_printk(struct ftrace_event_buffer *fbuffer)
241241
spin_unlock_irqrestore(&tracepoint_iter_lock, flags);
242242
}
243243

244-
void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer)
244+
void trace_event_buffer_commit(struct trace_event_buffer *fbuffer)
245245
{
246246
if (tracepoint_printk)
247247
output_printk(fbuffer);
@@ -250,7 +250,7 @@ void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer)
250250
fbuffer->event, fbuffer->entry,
251251
fbuffer->flags, fbuffer->pc);
252252
}
253-
EXPORT_SYMBOL_GPL(ftrace_event_buffer_commit);
253+
EXPORT_SYMBOL_GPL(trace_event_buffer_commit);
254254

255255
int trace_event_reg(struct trace_event_call *call,
256256
enum trace_reg type, void *data)

0 commit comments

Comments
 (0)