Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158426
b: refs/heads/master
c: f744bd5
h: refs/heads/master
v: v3
  • Loading branch information
Jason Baron authored and Frederic Weisbecker committed Aug 11, 2009
1 parent 65ab912 commit 30105e1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9daa77e2e9a6b8b859660d5e24d0f8cd77c2af39
refs/heads/master: f744bd576a827c5b02e756b81fc2578edf8179b8
29 changes: 19 additions & 10 deletions trunk/kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,15 +925,6 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
if (strcmp(call->system, TRACE_SYSTEM) != 0)
d_events = event_subsystem_dir(call->system, d_events);

if (call->raw_init) {
ret = call->raw_init();
if (ret < 0) {
pr_warning("Could not initialize trace point"
" events/%s\n", call->name);
return ret;
}
}

call->dir = debugfs_create_dir(call->name, d_events);
if (!call->dir) {
pr_warning("Could not create debugfs "
Expand Down Expand Up @@ -1058,6 +1049,7 @@ static void trace_module_add_events(struct module *mod)
struct ftrace_module_file_ops *file_ops = NULL;
struct ftrace_event_call *call, *start, *end;
struct dentry *d_events;
int ret;

start = mod->trace_events;
end = mod->trace_events + mod->num_trace_events;
Expand All @@ -1073,7 +1065,15 @@ static void trace_module_add_events(struct module *mod)
/* The linker may leave blanks */
if (!call->name)
continue;

if (call->raw_init) {
ret = call->raw_init();
if (ret < 0) {
if (ret != -ENOSYS)
pr_warning("Could not initialize trace "
"point events/%s\n", call->name);
continue;
}
}
/*
* This module has events, create file ops for this module
* if not already done.
Expand Down Expand Up @@ -1225,6 +1225,15 @@ static __init int event_trace_init(void)
/* The linker may leave blanks */
if (!call->name)
continue;
if (call->raw_init) {
ret = call->raw_init();
if (ret < 0) {
if (ret != -ENOSYS)
pr_warning("Could not initialize trace "
"point events/%s\n", call->name);
continue;
}
}
list_add(&call->list, &ftrace_events);
event_create_dir(call, d_events, &ftrace_event_id_fops,
&ftrace_enable_fops, &ftrace_event_filter_fops,
Expand Down

0 comments on commit 30105e1

Please sign in to comment.