This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Monitoring Modules


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]