Monitoring Modules
Frank Ch. Eigler
fche@redhat.com
Thu May 19 17:54:00 GMT 2011
Hi, Daniel -
> To measure how IPsec influences the performances of our system, we
> would like to record the module of the current task. We use the
> probemod() function but it only returns " <unknown> ".
> Do you know how could we get the module's name performing the task?
> [probe timer.profile ... ]
> if (!user_mode()) {
> module=probemod()
> kticks[e,tid] <<< 1
probemod(), like probefunc(), work by parsing probe point strings,
which is not that helpful - as you've discovered. Sorry about that.
The symdata() function gives you module names for an arbitrary PC
address, but also gives you extra stuff (symbol + offset) that you'd
have to parse away with tokenize() or somesuch.
To get the PC address at the timer.profile interrupt site, stap 1.5
will have this tapset function added; you can transcribe it into your
script for the moment:
function addr:long ()
%{ /* pure */
THIS->__retvalue = (intptr_t)(CONTEXT->regs ? REG_IP(CONTEXT->regs) : 0);
%}
- FChE
More information about the Systemtap
mailing list