All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Liu Yuanhan <yuanhan.liu@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Add aub debug support for kernel
Date: Thu, 04 Nov 2010 09:30:52 +0000	[thread overview]
Message-ID: <c6d829$pega7u@fmsmga001.fm.intel.com> (raw)
In-Reply-To: <F26D193E20BBDC42A43B611D1BDEDE7121C0635DD4@shsmsx502.ccr.corp.intel.com>

On Thu, 4 Nov 2010 11:44:39 +0800, "Liu, Yuanhan" <yuanhan.liu@intel.com> wrote:
> 
> On Tue, 2010-11-02 at 22:55 +0800, Liu Aleaxander wrote:
> >
> > > Being able to trace the register writes using ftrace is good... In fact we
> > > can remove our own printks and just use mmiotrace. So is it possible to
> > > post-process mmiotrace into .aub?
> > 
> > As I found mmiotrace can handle the operation(read or write), the
> > register address
> > and the value's size, yes, it is(I guess).  I will do more
> > investigation tomorrow.
> > 
> > Hi,
> 
> One should do this 'echo mmiotrace > /sys/kernel/debug/tracing' to enable 
> mmio trace. And this should be done before calling ioremap function, AKA, 
> before loading a module. So, first, user should have to stop i915 modules 
> from loading at the boot time. Then enable mmiotrace like said above, then 
> modprobe i915 by hand.

Ok, that is tricky for userland debugging.

> And yes, all the register data are recorded. But just 
> a while, I get a data file about 1G(Since it recorded everything, and some 
> register write and read too often).

Painful, but we could pipe the output from ftrace through a filter to
eliminate those.

> So, I'm not sure this good for debug. One great advantage of aub file is that 
> user can gave an aub file to us, then we may know what was going wrong, 
> just like we often ask user for something like dmesg log. As it's a bit hard for 
> user to generate an aub file, then it's not good for us to debug.
> 
> So, ideas and comments? (And feel free to correct me if I'm wrong)

I'm not going to give up on tracepoints just yet since they solve the
complex issue of exporting the data to userspace. The alternative is to
instrument I915_READ/I915_WRITE with a pair of our own tracepoints (so we
can selectively choose to record reads or writes) and introduce
I915_WRITE_UNTRACED/I915_READ_UNTRACED for the raw variants to be used in
GPIO.

Still requires post-processing to add the aub headers, but this will allow
runtime enabling of the capture. How does this sound?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  parent reply	other threads:[~2010-11-04  9:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02  9:11 [PATCH] drm/i915: Add aub debug support for kernel Yuanhan Liu
2010-11-02 10:02 ` Chris Wilson
2010-11-02 14:55   ` Liu Aleaxander
2010-11-04  3:44     ` Liu, Yuanhan
2010-11-04  3:51       ` Liu, Yuanhan
2010-11-04  9:30       ` Chris Wilson [this message]
2010-11-05 16:43         ` Liu Aleaxander
2010-11-05 17:11           ` Chris Wilson
2010-11-05 17:39             ` Liu Aleaxander
2010-11-07 14:08             ` Liu Aleaxander
2010-11-07 14:23               ` Chris Wilson
2010-11-07 15:04                 ` Liu Aleaxander
2010-11-07 15:33                   ` Chris Wilson
2010-11-07 15:48                     ` Liu Aleaxander
2010-11-07 16:03                     ` Chris Wilson
2010-11-08  9:23                       ` Yuanhan Liu
2010-11-08  9:55                         ` Chris Wilson
2010-11-09  1:55                           ` Yuanhan Liu

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='c6d829$pega7u@fmsmga001.fm.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=yuanhan.liu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.