Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167092
b: refs/heads/master
c: e7247a1
h: refs/heads/master
v: v3
  • Loading branch information
jolsa@redhat.com authored and Steven Rostedt committed Oct 7, 2009
1 parent b96d1f9 commit eef3e77
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 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: 829b876dfc94ea8be3a47e200d06f1f217bb104f
refs/heads/master: e7247a15ff3bbdab0a8b402dffa1171e5c05a8e0
2 changes: 1 addition & 1 deletion trunk/include/linux/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ extern void ftrace_enable_daemon(void);
# define ftrace_set_filter(buf, len, reset) do { } while (0)
# define ftrace_disable_daemon() do { } while (0)
# define ftrace_enable_daemon() do { } while (0)
static inline void ftrace_release(void *start, unsigned long size) { }
static inline void ftrace_release_mod(struct module *mod) {}
static inline int register_ftrace_command(struct ftrace_func_command *cmd)
{
return -EINVAL;
Expand Down
12 changes: 4 additions & 8 deletions trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2658,19 +2658,17 @@ static int ftrace_convert_nops(struct module *mod,
}

#ifdef CONFIG_MODULES
void ftrace_release(void *start, void *end)
void ftrace_release_mod(struct module *mod)
{
struct dyn_ftrace *rec;
struct ftrace_page *pg;
unsigned long s = (unsigned long)start;
unsigned long e = (unsigned long)end;

if (ftrace_disabled || !start || start == end)
if (ftrace_disabled)
return;

mutex_lock(&ftrace_lock);
do_for_each_ftrace_rec(pg, rec) {
if ((rec->ip >= s) && (rec->ip < e)) {
if (within_module_core(rec->ip, mod)) {
/*
* rec->ip is changed in ftrace_free_rec()
* It should not between s and e if record was freed.
Expand Down Expand Up @@ -2702,9 +2700,7 @@ static int ftrace_module_notify(struct notifier_block *self,
mod->num_ftrace_callsites);
break;
case MODULE_STATE_GOING:
ftrace_release(mod->ftrace_callsites,
mod->ftrace_callsites +
mod->num_ftrace_callsites);
ftrace_release_mod(mod);
break;
}

Expand Down

0 comments on commit eef3e77

Please sign in to comment.