Re: [tip:tracing/ftrace] ftrace: remove struct list_head from structdyn_ftrace
From: Lai Jiangshan
Date: Tue Mar 17 2009 - 22:51:39 EST
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/