[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190710115947.1de86184@gandalf.local.home>
Date: Wed, 10 Jul 2019 11:59:47 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: Need to remove char pointers from trace events
On Wed, 10 Jul 2019 18:45:24 +0300
Ville Syrjälä <ville.syrjala@...ux.intel.com> wrote:
> > TP_printk("pipe %c, plane %s, frame=%u, scanline=%u",
> > pipe_name(__entry->pipe), __entry->name,
> > __entry->frame, __entry->scanline)
> >
> >
> > The issue here is that you record a pointer address to "plane->name"
> > and then sometime in the distant future access that same address.
> > There's usually no guarantee that the contents at that address will
> > exist when the buffer is read.
>
> The only way those can disappear is if the device goes away. But I have
> no problem going with your patch. Want to provide a proper commit message
> for it?
Sure, but does that mean the trace data will go away with the device?
If not, then you still have the issue.
Also note that perf and trace-cmd will not know how to read that data
either, so adding it to the ring buffer gives them access.
I'll send a patch next, thanks!
-- Steve
>
> >
> > The proper way to record strings, is to record the string into the ring
> > buffer itself, and not rely on it existing hours or days later.
> >
Powered by blists - more mailing lists