Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108

Ingo Molnar
2006-09-14T23:52:48Z

* Roman Zippel <zippel@linux-m68k.org> wrote:

> > While with SystemTap the coupling is alot smaller.
>
> What guarantees we don't have similiar problems with dynamic
> tracepoints? As soon as any tracing is merged, users will have some
> kind of expectation [...]

because users rely on the functionality, not on the implementation
details. As i outlined it before: with dynamic tracers, static
tracepoints _are not a necessity_. With static tracers, _static
tracepoints are the only game in town_.

i outlined one such specific "removal of static tracepoint" example
already: static trace points at the head/prologue of functions (half of
the existing tracepoints are such). The sock_sendmsg() example i quoted
before is such a case. Those trace points can be replaced with a simple
GCC function attribute, which would cause a 5-byte (or whatever
necessary) NOP to be inserted at the function prologue. The attribute
would be alot less invasive than an explicit tracepoint (and thus easier
to maintain):

int __trace function(char arg1, char arg2)
{
}

where kprobes can be used to attach a lightweight tracepoint that does a
call, not a break (INT3) instruction. With static tracers we couldnt do
this so we'd have to stick with the static tracepoints forever! It's
always hard to remove features, so we have to make sure we add the
feature that we know is the best long-term solution.

Ingo