[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 12 Dec 2011 15:44:59 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Josef Bacik <josef@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: trace_printk is doing weird things with my arguments
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists