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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to