All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Yuanhan Liu <yuanhan.liu@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Add aub debug support for kernel
Date: Mon, 08 Nov 2010 09:55:23 +0000	[thread overview]
Message-ID: <0d30dc$k40epi@orsmga001.jf.intel.com> (raw)
In-Reply-To: <1289208208.31912.81.camel@snb-beast.sh.intel.com>

On Mon, 08 Nov 2010 17:23:28 +0800, Yuanhan Liu <yuanhan.liu@intel.com> wrote:
> I just send two patches out, without trace on load patch for
> now(explained at below).
> 
> On Mon, 2010-11-08 at 00:03 +0800, Chris Wilson wrote:
> > Oh my, this turns out to be quite hacky indeed...
> > 
> > if (i915_trace_on_load) {
> > 	const struct ftrace_event_call enable_list[] = {
> > #define EVENT(name) event_call_##name
> > 		&EVENT(i915_reg),
> > 		NULL,
> > 	}, *call = enable_list;
> > 	do {
> > 		if ((*call)->class->reg(*call, TRACE_REG_REGISTER) == 0)
> > 			(*call)->flags |= TRACE_EVENT_FL_ENABLED;
> > 		else
> > 			DRM_DEBUG("failed to enable tracepoint '%s'\n",
> > 				(*call)->name);
> > 	} while (*++call);
> > }
> > 
> > [Not even compile tested! ;)]
> 
> Sorry, it can't compile for not being able to find the event_call_*. 
> 
> While, that doesn't matter. As you may know, I send a patch to upstream 
> to export trace_set_clr_event function. Then we can simply add the 
> following line in i915_init():
> 
> trace_set_clr_event("i915", "i915_reg_rw", 1)
> 
> then the i915:i915_reg_rw event is enabled at the load time.

Much neater. I missed that when scanning trace/ for a hook in the event
system.

> While, I am not saying I am waiting upstream to receive that patch. I 
> mean we can hold on for a while: I think the trace-event can export 
> some more friendly interface for enabling specified event at module 
> load time. (I might make some patches if I have time).

So long as you can enable it locally to develop the debug tools that will
do for the time being.  You'll want to send the
EXPORT_SYMBOL_GPL(trace_set_clr_event) upstream and cc Steven Rostedt with
an outline of why we want it, he may be able to show us the best way of
integrating an module hook to parse tracing options.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2010-11-08  9:55 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
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 [this message]
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='0d30dc$k40epi@orsmga001.jf.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.