corrected: tapset/script information template
Frank Ch. Eigler
fche@redhat.com
Fri Apr 29 20:10:00 GMT 2005
Hi -
wcohen wrote:
> I have attempted to write up a description for dynamic callgraph
> instrumentation based on the template.
Excellent, thank you. I committed a copy to CVS (under src/tapsets)
> [...]
> $dynamic_call_graph = 1; // turn on tracing of calls for thread
> $dynamic_call_graph = 0; // turn off tracing of calls for thread
Do you imagine that just setting those variables in some other probe
handler should activate this kind of tracing? It could be partially
implemented using a script-level construct like this (also committed):
global $dynamic_call_graph
probe kernel.perfctr.call(1) {
if ($dynamic_call_graph) trace_sym ($pc);
}
probe kernel.perfctr.return(1) {
if ($dynamic_call_graph) trace_sym ($pc);
}
Boy, that looks *expensive*.
This reminds me of an oprofile-related issue we've probably discussed
before: whether these events should be signalled with the NMI versus
an ordinary interrupt. We'd have to prevent reentrancy (nested probe
handler execution) somehow. With an NMI, it'd have to be explicit
code that tracks the current processor's handler-active state,
dropping the event with an early-return. With a maskable interrupt,
it could defer the hit until interrupts get unmasked, at which point
the collectable data may not be accurate.
- FChE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20050429/f055fe35/attachment.sig>
More information about the Systemtap
mailing list