Re: [PATCH] LTT for 2.5.38 1/9: Core infrastructure

Ingo Molnar
2002-09-22T22:36:39Z

a number of suggestions to make the tracer truly lightweight:

- remove the 'event registration' and callback stuff. It just introduces
unnecessery runtime overhead. Use an include file as a registry of
events instead. This will simplify things greatly. Why do you need a
table of callbacks registered to an event? Nothing in your patches
actually uses it ... Just use one tracing function that copies the
arguments into a per-CPU ringbuffer. It's really just a few lines.

- do not disable interrupts when writing events. I used this method in
a tracer and it works well. Just get an irq-safe index to the trace
ring-buffer and fill it in. [eg. on x86 incl can be used for this
purpose.]

- get rid of p->trace_info and the pending_write_count - it's completely
unnecessery.

- drivers/trace/tracer.c is a complex mess of strange coding style and
#ifdefs, it's not proper Linux kernel code.

it's possible to have lightweight tracing - this patch clearly is not
achieving that goal yet.

Ingo