Re: trace_printk is doing weird things with my arguments
From: Steven Rostedt
Date: Mon Dec 12 2011 - 15:45:06 EST
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
--
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/