tracing: Rename (un)register_ftrace_event() to (un)register_trace_event()

The name "ftrace" really refers to the function hook infrastructure. It
is not about the trace_events. The functions (un)register_ftrace_event() is
really about trace_events, and the name should be register_trace_event()
instead.

Also renamed ftrace_event_reg() to trace_event_reg() for the same reason.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
Steven Rostedt (Red Hat) 2015-05-05 09:39:12 -04:00 коммит произвёл Steven Rostedt
Родитель 645df987f7
Коммит 9023c93090
10 изменённых файлов: 29 добавлений и 29 удалений

Просмотреть файл

@ -132,8 +132,8 @@ struct trace_event {
struct trace_event_functions *funcs;
};
extern int register_ftrace_event(struct trace_event *event);
extern int unregister_ftrace_event(struct trace_event *event);
extern int register_trace_event(struct trace_event *event);
extern int unregister_trace_event(struct trace_event *event);
/* Return values for print_line callback */
enum print_line_t {
@ -216,7 +216,7 @@ struct ftrace_event_class {
int (*raw_init)(struct ftrace_event_call *);
};
extern int ftrace_event_reg(struct ftrace_event_call *event,
extern int trace_event_reg(struct ftrace_event_call *event,
enum trace_reg type, void *data);
struct ftrace_event_buffer {

Просмотреть файл

@ -69,7 +69,7 @@
* .fields = LIST_HEAD_INIT(event_class_##call.fields),
* .raw_init = trace_event_raw_init,
* .probe = ftrace_raw_event_##call,
* .reg = ftrace_event_reg,
* .reg = trace_event_reg,
* };
*
* static struct ftrace_event_call event_<call> = {
@ -219,7 +219,7 @@ static struct ftrace_event_class __used __refdata event_class_##call = { \
.fields = LIST_HEAD_INIT(event_class_##call.fields),\
.raw_init = trace_event_raw_init, \
.probe = ftrace_raw_event_##call, \
.reg = ftrace_event_reg, \
.reg = trace_event_reg, \
_TRACE_PERF_INIT(call) \
};

Просмотреть файл

@ -1450,14 +1450,14 @@ static struct trace_event trace_blk_event = {
static int __init init_blk_tracer(void)
{
if (!register_ftrace_event(&trace_blk_event)) {
if (!register_trace_event(&trace_blk_event)) {
pr_warning("Warning: could not register block events\n");
return 1;
}
if (register_tracer(&blk_tracer) != 0) {
pr_warning("Warning: could not register the block tracer\n");
unregister_ftrace_event(&trace_blk_event);
unregister_trace_event(&trace_blk_event);
return 1;
}

Просмотреть файл

@ -191,7 +191,7 @@ __init static int init_branch_tracer(void)
{
int ret;
ret = register_ftrace_event(&trace_branch_event);
ret = register_trace_event(&trace_branch_event);
if (!ret) {
printk(KERN_WARNING "Warning: could not register "
"branch events\n");

Просмотреть файл

@ -182,7 +182,7 @@ int trace_event_raw_init(struct ftrace_event_call *call)
{
int id;
id = register_ftrace_event(&call->event);
id = register_trace_event(&call->event);
if (!id)
return -ENODEV;
@ -252,8 +252,8 @@ void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer)
}
EXPORT_SYMBOL_GPL(ftrace_event_buffer_commit);
int ftrace_event_reg(struct ftrace_event_call *call,
enum trace_reg type, void *data)
int trace_event_reg(struct ftrace_event_call *call,
enum trace_reg type, void *data)
{
struct ftrace_event_file *file = data;
@ -288,7 +288,7 @@ int ftrace_event_reg(struct ftrace_event_call *call,
}
return 0;
}
EXPORT_SYMBOL_GPL(ftrace_event_reg);
EXPORT_SYMBOL_GPL(trace_event_reg);
void trace_event_enable_cmd_record(bool enable)
{
@ -1673,7 +1673,7 @@ static void event_remove(struct ftrace_event_call *call)
} while_for_each_event_file();
if (call->event.funcs)
__unregister_ftrace_event(&call->event);
__unregister_trace_event(&call->event);
remove_event_from_tracers(call);
list_del(&call->list);
}

Просмотреть файл

@ -1454,12 +1454,12 @@ static __init int init_graph_trace(void)
{
max_bytes_for_cpu = snprintf(NULL, 0, "%d", nr_cpu_ids - 1);
if (!register_ftrace_event(&graph_trace_entry_event)) {
if (!register_trace_event(&graph_trace_entry_event)) {
pr_warning("Warning: could not register graph trace events\n");
return 1;
}
if (!register_ftrace_event(&graph_trace_ret_event)) {
if (!register_trace_event(&graph_trace_ret_event)) {
pr_warning("Warning: could not register graph trace events\n");
return 1;
}

Просмотреть файл

@ -1290,7 +1290,7 @@ static int register_kprobe_event(struct trace_kprobe *tk)
}
if (set_print_fmt(&tk->tp, trace_kprobe_is_return(tk)) < 0)
return -ENOMEM;
ret = register_ftrace_event(&call->event);
ret = register_trace_event(&call->event);
if (!ret) {
kfree(call->print_fmt);
return -ENODEV;
@ -1303,7 +1303,7 @@ static int register_kprobe_event(struct trace_kprobe *tk)
pr_info("Failed to register kprobe event: %s\n",
ftrace_event_name(call));
kfree(call->print_fmt);
unregister_ftrace_event(&call->event);
unregister_trace_event(&call->event);
}
return ret;
}

Просмотреть файл

@ -693,7 +693,7 @@ void trace_event_read_unlock(void)
}
/**
* register_ftrace_event - register output for an event type
* register_trace_event - register output for an event type
* @event: the event type to register
*
* Event types are stored in a hash and this hash is used to
@ -707,7 +707,7 @@ void trace_event_read_unlock(void)
*
* Returns the event type number or zero on error.
*/
int register_ftrace_event(struct trace_event *event)
int register_trace_event(struct trace_event *event)
{
unsigned key;
int ret = 0;
@ -771,12 +771,12 @@ int register_ftrace_event(struct trace_event *event)
return ret;
}
EXPORT_SYMBOL_GPL(register_ftrace_event);
EXPORT_SYMBOL_GPL(register_trace_event);
/*
* Used by module code with the trace_event_sem held for write.
*/
int __unregister_ftrace_event(struct trace_event *event)
int __unregister_trace_event(struct trace_event *event)
{
hlist_del(&event->node);
list_del(&event->list);
@ -784,18 +784,18 @@ int __unregister_ftrace_event(struct trace_event *event)
}
/**
* unregister_ftrace_event - remove a no longer used event
* unregister_trace_event - remove a no longer used event
* @event: the event to remove
*/
int unregister_ftrace_event(struct trace_event *event)
int unregister_trace_event(struct trace_event *event)
{
down_write(&trace_event_sem);
__unregister_ftrace_event(event);
__unregister_trace_event(event);
up_write(&trace_event_sem);
return 0;
}
EXPORT_SYMBOL_GPL(unregister_ftrace_event);
EXPORT_SYMBOL_GPL(unregister_trace_event);
/*
* Standard events
@ -1243,7 +1243,7 @@ __init static int init_events(void)
for (i = 0; events[i]; i++) {
event = events[i];
ret = register_ftrace_event(event);
ret = register_trace_event(event);
if (!ret) {
printk(KERN_WARNING "event %d failed to register\n",
event->type);

Просмотреть файл

@ -32,7 +32,7 @@ extern int
trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry);
/* used by module unregistering */
extern int __unregister_ftrace_event(struct trace_event *event);
extern int __unregister_trace_event(struct trace_event *event);
extern struct rw_semaphore trace_event_sem;
#define SEQ_PUT_FIELD(s, x) \

Просмотреть файл

@ -1283,7 +1283,7 @@ static int register_uprobe_event(struct trace_uprobe *tu)
if (set_print_fmt(&tu->tp, is_ret_probe(tu)) < 0)
return -ENOMEM;
ret = register_ftrace_event(&call->event);
ret = register_trace_event(&call->event);
if (!ret) {
kfree(call->print_fmt);
return -ENODEV;
@ -1297,7 +1297,7 @@ static int register_uprobe_event(struct trace_uprobe *tu)
pr_info("Failed to register uprobe event: %s\n",
ftrace_event_name(call));
kfree(call->print_fmt);
unregister_ftrace_event(&call->event);
unregister_trace_event(&call->event);
}
return ret;