This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Monitoring Modules
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: mglt dot biz at gmail dot com
- Cc: systemtap at sourceware dot org
- Date: Thu, 19 May 2011 13:54:06 -0400
- Subject: Re: Monitoring Modules
- References: <4DD552F6.8010803@gmail.com>
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