public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Monitoring Modules
@ 2011-05-19 17:27 Daniel Migault
  2011-05-19 17:54 ` Frank Ch. Eigler
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Migault @ 2011-05-19 17:27 UTC (permalink / raw)
  To: systemtap

Hi,

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?

We would appreciate any suggestions. This is our code based on 
thread-times.stp

[...]
tid=tid(); e=execname()
if (!user_mode()) {
      module=probemod()
      kticks[e,tid] <<< 1
    } else {
      module="u_space"
      uticks[e,tid] <<< 1
    }
[..]

Regards,
Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Monitoring Modules
  2011-05-19 17:27 Monitoring Modules Daniel Migault
@ 2011-05-19 17:54 ` Frank Ch. Eigler
  2011-06-01  7:04   ` Daniel Migault
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2011-05-19 17:54 UTC (permalink / raw)
  To: mglt.biz; +Cc: systemtap


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Monitoring Modules
  2011-05-19 17:54 ` Frank Ch. Eigler
@ 2011-06-01  7:04   ` Daniel Migault
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Migault @ 2011-06-01  7:04 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap

Hi Frank,

Thank you for your answer. We ran it on fedora with version 1.4 with the 
addr() function specified in  our script and comment it version 1.6.

Actually we could get the names of the function only by running it on 
fedora, with Ubuntu 11.04, we could only get the address. I suppose 
standard kernel miss some debug info option to get bindings between 
names and addresses?

I will post my different comments and questions in different threads on 
the mailing list.

Thanks again,
Daniel


On 05/19/11 19:54, Frank Ch. Eigler wrote:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-01  7:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 17:27 Monitoring Modules Daniel Migault
2011-05-19 17:54 ` Frank Ch. Eigler
2011-06-01  7:04   ` Daniel Migault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).