From: Steven Rostedt on
On Tue, 2010-03-23 at 08:27 -0400, Mathieu Desnoyers wrote:
> * Ingo Molnar (mingo(a)elte.hu) wrote:
> >

>
> We're in complete agreement here. When I considered if it was worth it to create
> such a per-tracepoint group compile-time disabling in the first place, I decided
> not to do it precisely due to the added-value that comes with the availability
> of system-wide tracepoints. And I think with the static jump patching, we are
> now at a point where the overhead is stunningly low.
>
> Now, space-wise, the one thing I would consider appropriate as a compromise for
> small embedded systems would be to allow the TRACE_EVENT probes to be compiled
> as modules.

Yeah, I agree here. Hmm, I wonder if we could automate this. That is, we
could now, create a module per trace system if it is so configured. It
would move the functions that create, record and output the trace points
in TRACE_EVENT() into a separate module. Then you just need to load the
modules you want to trace (grouped by system).

We can make add kobjects to /sys so that udev loads them automatically
for distros.

-- Steve



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Jan Kara on
On Tue 23-03-10 02:04:21, Frederic Weisbecker wrote:
> On Tue, Mar 23, 2010 at 01:32:02AM +0100, Jan Kara wrote:
> >
> > Hi,
> >
> > currently, when one tracer is selected, most of tracepoints for other
> > tracers also gets pulled into the kernel. So for example it's not possible
> > to enable BLK_DEV_IO_TRACE without polluting slab allocation paths with
> > tracepoint checks (see changelog of patch 01). This patch set adds a
> > possibility for each set of trace points to be compile-enabled separately.
> > The first patch contains the necessary magic in linux/tracepoint.h. Other
> > patches just tell tracing framework about correspoding config options
> > and possibly introduce them if they did not exist before.
> > The patches in this patch set are actually completely independent so
> > they can be merged via respective subsystem trees. But changes are rather
> > tiny so I don't expect much conflicts...
> >
> > Honza
>
> (Adding more people in Cc)
>
> I don't know. Yeah this first looks like a good idea but once
> CONFIG_EVENT_TRACING is enabled, each tracepoint is a lightweight
> thing and induce a tiny overhead, probably hard to notice, and
> this is going to be even more the case after the jmp label
> optimization patches.
Sorry for replying late, I was on vacation. My motivation was that we
wanted BLK_DEV_IO_TRACE enabled in all our distro kernels but there is
a concern that this could have some impact on performance especially
in SLAB allocator due to more icache pressure or so. This is not completely
bogus concern if you look at bloat-o-meter output. For example:
function old new delta
kmem_cache_alloc 542 768 +226

But looking at the disassembly now, I can see that the difference in
inline code is actually only ~40 bytes (on x86_64) - so that's about 7%.
Not a huge deal but still noticeable.

> I liked the fact we had a general tracing kernel once the above
> config is selected. And we don't bother telling people that to
> use tool X you need CONFIG_EVENT_Y, and you need to rebuild your
> kernel, etc...
OK, I understand this. I guess I should go and measure whether disabling
tracepoints really makes some performance difference or not.

Honza
--
Jan Kara <jack(a)suse.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/