public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: mglt.biz@gmail.com
Cc: systemtap@sourceware.org
Subject: Re: Monitoring Modules
Date: Thu, 19 May 2011 17:54:00 -0000	[thread overview]
Message-ID: <y0m7h9mzidd.fsf@fche.csb> (raw)
In-Reply-To: <4DD552F6.8010803@gmail.com> (Daniel Migault's message of "Thu, 19 May 2011 19:27:18 +0200")


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

  reply	other threads:[~2011-05-19 17:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 17:27 Daniel Migault
2011-05-19 17:54 ` Frank Ch. Eigler [this message]
2011-06-01  7:04   ` Daniel Migault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=y0m7h9mzidd.fsf@fche.csb \
    --to=fche@redhat.com \
    --cc=mglt.biz@gmail.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).