[Intel-gfx] [PATCH] drm/i915: Add aub debug support for kernel
Chris Wilson
chris at chris-wilson.co.uk
Sun Nov 7 17:03:17 CET 2010
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! ;)]
That would seem to do the trick. The alternative would be to override the
use of trace_event_raw_init in the include/trace/ftrace.h macros. In light
of that the above seems much simpler.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list