Skip to content

Commit 892c505

Browse files
committed
tracing: Rename ftrace_output functions to trace_output
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The ftrace_output_*() and ftrace_raw_output_*() functions represent the trace_event code. Rename them to just trace_output or trace_raw_output. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent 3f795dc commit 892c505

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

‎include/linux/trace_events.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ const char *trace_print_array_seq(struct trace_seq *p,
5252
struct trace_iterator;
5353
struct trace_event;
5454

55-
int ftrace_raw_output_prep(struct trace_iterator *iter,
56-
struct trace_event *event);
55+
int trace_raw_output_prep(struct trace_iterator *iter,
56+
struct trace_event *event);
5757

5858
/*
5959
* The trace entry - the most basic unit of tracing. This is what
@@ -183,7 +183,7 @@ void trace_current_buffer_discard_commit(struct ring_buffer *buffer,
183183

184184
void tracing_record_cmdline(struct task_struct *tsk);
185185

186-
int ftrace_output_call(struct trace_iterator *iter, char *name, char *fmt, ...);
186+
int trace_output_call(struct trace_iterator *iter, char *name, char *fmt, ...);
187187

188188
struct event_filter;
189189

‎include/trace/perf.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
* }
5959
*
6060
* static struct trace_event ftrace_event_type_<call> = {
61-
* .trace = ftrace_raw_output_<call>, <-- stage 2
61+
* .trace = trace_raw_output_<call>, <-- stage 2
6262
* };
6363
*
6464
* static char print_fmt_<call>[] = <TP_printk>;

‎include/trace/trace_events.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ TRACE_MAKE_SYSTEM_STR();
203203
* Override the macros in <trace/trace_events.h> to include the following:
204204
*
205205
* enum print_line_t
206-
* ftrace_raw_output_<call>(struct trace_iterator *iter, int flags)
206+
* trace_raw_output_<call>(struct trace_iterator *iter, int flags)
207207
* {
208208
* struct trace_seq *s = &iter->seq;
209209
* struct ftrace_raw_<call> *field; <-- defined in stage 1
@@ -304,8 +304,8 @@ TRACE_MAKE_SYSTEM_STR();
304304
#undef DECLARE_EVENT_CLASS
305305
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
306306
static notrace enum print_line_t \
307-
ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \
308-
struct trace_event *trace_event) \
307+
trace_raw_output_##call(struct trace_iterator *iter, int flags, \
308+
struct trace_event *trace_event) \
309309
{ \
310310
struct trace_seq *s = &iter->seq; \
311311
struct trace_seq __maybe_unused *p = &iter->tmp_seq; \
@@ -314,7 +314,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \
314314
\
315315
field = (typeof(field))iter->ent; \
316316
\
317-
ret = ftrace_raw_output_prep(iter, trace_event); \
317+
ret = trace_raw_output_prep(iter, trace_event); \
318318
if (ret != TRACE_TYPE_HANDLED) \
319319
return ret; \
320320
\
@@ -323,13 +323,13 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \
323323
return trace_handle_return(s); \
324324
} \
325325
static struct trace_event_functions ftrace_event_type_funcs_##call = { \
326-
.trace = ftrace_raw_output_##call, \
326+
.trace = trace_raw_output_##call, \
327327
};
328328

329329
#undef DEFINE_EVENT_PRINT
330330
#define DEFINE_EVENT_PRINT(template, call, proto, args, print) \
331331
static notrace enum print_line_t \
332-
ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \
332+
trace_raw_output_##call(struct trace_iterator *iter, int flags, \
333333
struct trace_event *event) \
334334
{ \
335335
struct ftrace_raw_##template *field; \
@@ -346,10 +346,10 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \
346346
field = (typeof(field))entry; \
347347
\
348348
trace_seq_init(p); \
349-
return ftrace_output_call(iter, #call, print); \
349+
return trace_output_call(iter, #call, print); \
350350
} \
351351
static struct trace_event_functions ftrace_event_type_funcs_##call = { \
352-
.trace = ftrace_raw_output_##call, \
352+
.trace = trace_raw_output_##call, \
353353
};
354354

355355
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)

‎kernel/trace/trace_output.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ trace_print_array_seq(struct trace_seq *p, const void *buf, int count,
222222
}
223223
EXPORT_SYMBOL(trace_print_array_seq);
224224

225-
int ftrace_raw_output_prep(struct trace_iterator *iter,
226-
struct trace_event *trace_event)
225+
int trace_raw_output_prep(struct trace_iterator *iter,
226+
struct trace_event *trace_event)
227227
{
228228
struct trace_event_call *event;
229229
struct trace_seq *s = &iter->seq;
@@ -243,10 +243,10 @@ int ftrace_raw_output_prep(struct trace_iterator *iter,
243243

244244
return trace_handle_return(s);
245245
}
246-
EXPORT_SYMBOL(ftrace_raw_output_prep);
246+
EXPORT_SYMBOL(trace_raw_output_prep);
247247

248-
static int ftrace_output_raw(struct trace_iterator *iter, char *name,
249-
char *fmt, va_list ap)
248+
static int trace_output_raw(struct trace_iterator *iter, char *name,
249+
char *fmt, va_list ap)
250250
{
251251
struct trace_seq *s = &iter->seq;
252252

@@ -256,18 +256,18 @@ static int ftrace_output_raw(struct trace_iterator *iter, char *name,
256256
return trace_handle_return(s);
257257
}
258258

259-
int ftrace_output_call(struct trace_iterator *iter, char *name, char *fmt, ...)
259+
int trace_output_call(struct trace_iterator *iter, char *name, char *fmt, ...)
260260
{
261261
va_list ap;
262262
int ret;
263263

264264
va_start(ap, fmt);
265-
ret = ftrace_output_raw(iter, name, fmt, ap);
265+
ret = trace_output_raw(iter, name, fmt, ap);
266266
va_end(ap);
267267

268268
return ret;
269269
}
270-
EXPORT_SYMBOL_GPL(ftrace_output_call);
270+
EXPORT_SYMBOL_GPL(trace_output_call);
271271

272272
#ifdef CONFIG_KRETPROBES
273273
static inline const char *kretprobed(const char *name)

0 commit comments

Comments
 (0)