This change supports "always on" tracing, in the sense that every function entry/exit
will have the ability to turn on tracing for that functions entry, and/or some or all exits.
When 8l is invoked with the -pt switch, entry code looks like this:
entry: jmp .+5
call _tracein
<rest of function>
To enable tracing, path the +5 to +2
Exits look like this:
ret
call _traceout
ret
To enable exit tracing, patch the 1-byte ret to a nop.
Patching can be done at runtime or statically before boot.
If this patch is accepted, the next step is to submit the support code for the kernel
to allow it to be enabled at runtime. But, it will be also quite easy to have acid do the
needed patching before boot as well.
Ron
|