mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: Need to remove char pointers from trace events
Date: Wed, 10 Jul 2019 11:59:47 -0400	[thread overview]
Message-ID: <20190710115947.1de86184@gandalf.local.home> (raw)
In-Reply-To: <20190710154524.GG5942@intel.com>

On Wed, 10 Jul 2019 18:45:24 +0300
Ville Syrjälä <ville.syrjala@linux.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.
> > 

      reply	other threads:[~2019-07-10 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10 15:25 Steven Rostedt
2019-07-10 15:45 ` Ville Syrjälä
2019-07-10 15:59   ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190710115947.1de86184@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®