From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add device name to display tracepoints
Date: Fri, 13 Dec 2019 19:06:01 +0200 [thread overview]
Message-ID: <20191213170601.GB1208@intel.com> (raw)
In-Reply-To: <157625247338.7535.668231195608100084@skylake-alporthouse-com>
On Fri, Dec 13, 2019 at 03:54:33PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2019-12-13 15:28:23)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Include dev_name() in the tracpoints so one can filter based on
> > the device.
> >
> > Example:
> > echo 'dev=="0000:00:02.0"' > events/i915/intel_cpu_fifo_underrun/filter
> >
> > TODO: maybe don't both specifying the field name always and just
> > make it 'dev' (or whatever) always?
> > TODO: add for other tracpoints too if this is deemed good enough
> >
> > Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_trace.h | 96 +++++++++++++++++++++----------
> > 1 file changed, 65 insertions(+), 31 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
> > index 7ef7a1e1664c..8931b6756f44 100644
> > --- a/drivers/gpu/drm/i915/i915_trace.h
> > +++ b/drivers/gpu/drm/i915/i915_trace.h
> > @@ -20,11 +20,18 @@
> >
> > /* watermark/fifo updates */
> >
> > +#define __dev_name_i915(field, i915) __string(field, dev_name((i915)->drm.dev))
> > +#define __dev_name_crtc(field, crtc) __string(field, dev_name((crtc)->base.dev->dev))
> > +#define __assign_dev_name_i915(field, i915) __assign_str(field, dev_name((i915)->drm.dev))
> > +#define __assign_dev_name_crtc(field, crtc) __assign_str(field, dev_name((crtc)->base.dev->dev))
> > +#define __get_dev_name(field) __get_str(field)
>
> Storing the string is quite expensive, I thought. Can we stash the i915
> and stringify in the TP_printk? Or is stashing the string the secret for
> the dev== filter?
Last time I stashed a pointer in there people complained that it can
disappear before being consumed and cause a very theoretical oops.
But I guess we could stash just the pci devfn and whatnot.
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-12-13 20:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 15:28 [Intel-gfx] [PATCH] drm/i915: Add device name to display tracepoints Ville Syrjala
2019-12-13 15:54 ` Chris Wilson
2019-12-13 17:06 ` Ville Syrjälä [this message]
2019-12-13 17:17 ` Ville Syrjälä
2020-03-07 22:13 ` Chris Wilson
2020-03-09 14:21 ` Ville Syrjälä
2020-03-09 14:24 ` Chris Wilson
2019-12-13 21:19 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-12-13 22:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2019-12-14 19:19 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=20191213170601.GB1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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