Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140954
b: refs/heads/master
c: e94142a
h: refs/heads/master
v: v3
  • Loading branch information
Lai Jiangshan authored and Ingo Molnar committed Mar 13, 2009
1 parent 5cf92a6 commit a42135a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 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: 850a80cfaa5aec3e626eb3736eff890a80e4fa77
refs/heads/master: e94142a67f8bad494c593f0a07c9fc2fbec98c0e
1 change: 0 additions & 1 deletion trunk/include/linux/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ enum {
};

struct dyn_ftrace {
struct list_head list;
unsigned long ip; /* address of mcount call-site */
unsigned long flags;
struct dyn_arch_ftrace arch;
Expand Down
14 changes: 8 additions & 6 deletions trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ enum {

static int ftrace_filtered;

static LIST_HEAD(ftrace_new_addrs);
static struct dyn_ftrace *ftrace_new_addrs;

static DEFINE_MUTEX(ftrace_regex_lock);

Expand Down Expand Up @@ -409,8 +409,8 @@ ftrace_record_ip(unsigned long ip)
return NULL;

rec->ip = ip;

list_add(&rec->list, &ftrace_new_addrs);
rec->flags = (unsigned long)ftrace_new_addrs;
ftrace_new_addrs = rec;

return rec;
}
Expand Down Expand Up @@ -716,19 +716,21 @@ unsigned long ftrace_update_tot_cnt;

static int ftrace_update_code(struct module *mod)
{
struct dyn_ftrace *p, *t;
struct dyn_ftrace *p;
cycle_t start, stop;

start = ftrace_now(raw_smp_processor_id());
ftrace_update_cnt = 0;

list_for_each_entry_safe(p, t, &ftrace_new_addrs, list) {
while (ftrace_new_addrs) {

/* If something went wrong, bail without enabling anything */
if (unlikely(ftrace_disabled))
return -1;

list_del_init(&p->list);
p = ftrace_new_addrs;
ftrace_new_addrs = (struct dyn_ftrace *)p->flags;
p->flags = 0L;

/* convert record (i.e, patch mcount-call with NOP) */
if (ftrace_code_disable(mod, p)) {
Expand Down

0 comments on commit a42135a

Please sign in to comment.