Messages in this thread | | | Date | Wed, 18 Mar 2009 10:50:01 +0800 | From | Lai Jiangshan <> | Subject | Re: [tip:tracing/ftrace] ftrace: remove struct list_head from struct dyn_ftrace |
| |
Frederic Weisbecker wrote: > > > May be I'm wrong. May be I misunderstood this patch. > But I don't understand how flags can be used at the same time as a pointer > and as a flag value. >
When a new dyn_ftrace is added to ftrace_new_addrs list, the flag is 0, it's always 0 until this dyn_ftrace is removed from the list, so we can reuse the flag field. As Steven's suggest, using an union is better.
ftrace_convert_nops() ftrace_record_ip() // allocate dyn_ftrace, and add it // to ftrace_new_addrs list ftrace_update_code() // remove it from ftrace_new_addrs.
Lai.
| |