lkml.org 
[lkml]   [2009]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2009-03-18 03:53    [W:0.046 / U:3.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site