Messages in this thread |  | | | Date | Mon, 2 Jun 2008 14:02:30 -0400 (EDT) | | From | Steven Rostedt <> | | Subject | Re: [PATCH 1/3] ftrace: prevent freeing of all failed updates |
| |
On Sun, 1 Jun 2008, Abhishek Sagar wrote: 5B> @@ -611,18 +612,33 @@ static int __ftrace_update_code(void *ignore) > > /* No locks needed, the machine is stopped! */ > for (i = 0; i < FTRACE_HASHSIZE; i++) { > - if (hlist_empty(&ftrace_hash[i])) > - continue; > + /* all CPUS are stopped, we are safe to modify code */ > + hlist_for_each_entry_safe(p, t, n, &ftrace_hash[i], node) { > + /* Skip over failed records which have not been > + * freed. */ > + if (p->flags & FTRACE_FL_FAILED) > + continue; > > - head = ftrace_hash[i]; > - INIT_HLIST_HEAD(&ftrace_hash[i]); > + /* Unconverted records are always at the head of the > + * hash bucket. Once we encounter a converted record, > + * simply skip over to the next bucket. Saves ftraced > + * some processor cycles (ftrace does its bid for > + * global warming :-p ). */ > + if (p->flags & (FTRACE_FL_CONVERTED)) > + break;
If we unload a module and reload it, will it ever get converted again?
-- Steve
|  |