Messages in this thread | | | Subject | Re: trace_printk is doing weird things with my arguments | From | Steven Rostedt <> | Date | Mon, 12 Dec 2011 15:44:59 -0500 |
| |
On Mon, 2011-12-12 at 15:32 -0500, Josef Bacik wrote: > > That worked perfectly. So will I have this problem when I got to turn these > things into tracepoints or will those work out right? Thanks,
The TP_fast_assign() is exactly how things are copied into the ring buffer. If you have all the necessary data copied then, and don't dereference it in TP_printk(), then you are fine.
IOW,
TP_fast_assign( entry->id = ptr->id), TP_printk ("id: %lx", entry->id)
will work, but
TP_fast_assign(entry->ptr = ptr), TP_printk("id: %lx", entry->ptr->id)
will not.
-- Steve
| |