Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121144
b: refs/heads/master
c: 32f8574
h: refs/heads/master
v: v3
  • Loading branch information
Mathieu Desnoyers authored and Ingo Molnar committed Nov 16, 2008
1 parent aae4241 commit d767cd9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 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: 5f382671def7cb9c0f4b75d586dc5f60dca5e1c3
refs/heads/master: 32f85742778dfc2c74975cf0b9f5bdb13470cb32
5 changes: 0 additions & 5 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -2187,11 +2187,6 @@ static noinline struct module *load_module(void __user *umod,
debug = section_objs(hdr, sechdrs, secstrings, "__verbose",
sizeof(*debug), &num_debug);
dynamic_printk_setup(debug, num_debug);

#ifdef CONFIG_TRACEPOINTS
tracepoint_update_probe_range(mod->tracepoints,
mod->tracepoints + mod->num_tracepoints);
#endif
}

/* sechdrs[0].sh_size is always zero */
Expand Down
29 changes: 29 additions & 0 deletions trunk/kernel/tracepoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,3 +541,32 @@ void tracepoint_iter_reset(struct tracepoint_iter *iter)
iter->tracepoint = NULL;
}
EXPORT_SYMBOL_GPL(tracepoint_iter_reset);

int tracepoint_module_notify(struct notifier_block *self,
unsigned long val, void *data)
{
struct module *mod = data;

switch (val) {
case MODULE_STATE_COMING:
tracepoint_update_probe_range(mod->tracepoints,
mod->tracepoints + mod->num_tracepoints);
break;
case MODULE_STATE_GOING:
tracepoint_update_probe_range(mod->tracepoints,
mod->tracepoints + mod->num_tracepoints);
break;
}
return 0;
}

struct notifier_block tracepoint_module_nb = {
.notifier_call = tracepoint_module_notify,
.priority = 0,
};

static int init_tracepoints(void)
{
return register_module_notifier(&tracepoint_module_nb);
}
__initcall(init_tracepoints);

0 comments on commit d767cd9

Please sign in to comment.