and that's exactly what was tripped upon in sched.o and analyzed.
Furthermore, the suggestion of doing this exclusively within the DWARF2
space - besides the not particularly minor complication of it not being
implemented yet - is:
- quite substantially complex on its own
- would make Linux instrumentation dependent on all sorts of DWARF2
details which we had our 'fun' with before. (I proffer that that's
more fragile than any code patching can ever be.)
- if done self-sufficiently (i.e. if a kernel image can be used to
trace things, which i believe any usable kernel tracer must offer),
it would, with the current debug info format, enlargen the kernel RAM
image with quite a substantial amount of unswappable kernel memory.
But i would not mind such a scheme at all (it is in essence SystemTap
integrated into the core kernel) - in fact if your scheme gets
implemented then the current marker facilities could be ported to that
scheme transparently.
So i dont see how it can be a loss to stick with the current markers for
the time being. If the super-optimized runtime patching in this thread
is deemed too fragile we simply wont do that and live with the (small)
runtime overhead that current markers have.
This is a sane plan IMO, basically all the instrumentation folks agree
with it (SystemTap, LTTNG, kprobes, ftrace), the scheduler folks agree
with it as well and we'd like to move on.
Ingo
--