Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121136
b: refs/heads/master
c: a419246
h: refs/heads/master
v: v3
  • Loading branch information
Mathieu Desnoyers authored and Ingo Molnar committed Nov 16, 2008
1 parent 45a1491 commit 917e042
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 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: 021aeb057fc48af03fe5f37d3dda366c0d97aaf3
refs/heads/master: a419246ac7c2d9282dfd843103702895bb3f3fd7
29 changes: 29 additions & 0 deletions trunk/kernel/marker.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,3 +846,32 @@ void *marker_get_private_data(const char *name, marker_probe_func *probe,
return ERR_PTR(-ENOENT);
}
EXPORT_SYMBOL_GPL(marker_get_private_data);

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

switch (val) {
case MODULE_STATE_COMING:
marker_update_probe_range(mod->markers,
mod->markers + mod->num_markers);
break;
case MODULE_STATE_GOING:
marker_update_probe_range(mod->markers,
mod->markers + mod->num_markers);
break;
}
return 0;
}

struct notifier_block marker_module_nb = {
.notifier_call = marker_module_notify,
.priority = 0,
};

static int init_markers(void)
{
return register_module_notifier(&marker_module_nb);
}
__initcall(init_markers);
4 changes: 0 additions & 4 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -2184,10 +2184,6 @@ static noinline struct module *load_module(void __user *umod,
struct mod_debug *debug;
unsigned int num_debug;

#ifdef CONFIG_MARKERS
marker_update_probe_range(mod->markers,
mod->markers + mod->num_markers);
#endif
debug = section_objs(hdr, sechdrs, secstrings, "__verbose",
sizeof(*debug), &num_debug);
dynamic_printk_setup(debug, num_debug);
Expand Down

0 comments on commit 917e042

Please sign in to comment.