Re: [PATCH] Tracing: do export trace_set_clr_event
From: Chris Wilson
Date: Mon Nov 08 2010 - 05:14:31 EST
On Mon, 8 Nov 2010 04:56:10 -0500, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> On Mon, Nov 08, 2010 at 02:05:12PM +0800, Yuanhan Liu wrote:
> > Trace event belongs to a module does exist only when the module is
> > loaded. Well, we can use trace_set_clr_event funtion to enable some
> > trace event at the module init routine, so that we will not miss
> > something while loading then module.
> >
> > So, Export the trace_set_clr_event function so that module can use it.
>
> Which module?
drm/i915. The scenario is that we want to enable a tracepoint to record
(selected) register writes both at runtime and module-load time. mmiotrace
is not quite sufficient for our needs, since we want to be enable
recording around a troublesome application from within X (i.e. without
having to ask the user to reload the module after enabling mmiotrace). We
also want to exclude the bit-banging registers from being traced since
they generate voluminous noise. So we settled on adding a tracepoint to
the our register read/write routines.
The question then became how to enable register tracing upon module load?
This was the simpler proposal, add a module parameter to enable the
tracepoints - hence the exporting of this routine. The alternative that we
are mulling over is whether it is possible for ftrace to parse a trace= on
every module load to manipulate the tracepoints within that module.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/