public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: wakan tanka <wakatana@gmail.com>
Cc: systemtap@sourceware.org
Subject: Re: gettimeofday returns zero
Date: Wed, 30 Mar 2011 16:04:00 -0000	[thread overview]
Message-ID: <y0m7hbgoas8.fsf@fche.csb> (raw)
In-Reply-To: <AANLkTimyiBGOA==rj_p9UDhDT-_9WLXG3=gGM_aTE+U+@mail.gmail.com> (wakan tanka's message of "Sun, 27 Mar 2011 00:01:02 +0100")

wakan tanka <wakatana@gmail.com> writes:

> I have been told that I should write my problem to this mailing list.

Welcome & thank you.

> I am running systemtap in oracle virtualbox 3.2.10 and there is
> problem with gettimeofday_s() function which always returns 0. [...]

I don't know why that would be.  Maybe virtualbox does not provide a
useable TSC.  Consider a different virtualization engine such as KVM.

> http://www.linuxforums.org/forum/programming-scripting/176785-systemtap-returntimeofday_s-some-questions.html#post835714

As to your other questions in that post:


> I am trying to trace system calls per process with following code
> # stap -ve 'probe syscall.open {if (execname()=="ping") { [...]
> can be process tracd according to execname() + PATH containing binary
> - the equivalent of /proc/$PID/exe

You'd probably have to trap syscall.execve or kprocess.exec,
checking/storing the filename variable on a per-pid basis.


> Now, how to know which variables can be used in all library calls ?
> # stap -vL 'kernel.function("*")' > kernel.functions
> did not returns anything why?

That query returns thousands of lines for me.  Perhaps stap -vv will
give you more verbose explanation about what's wrong.


> Also can somebody explain those variables with $ (target variables)
> They are those which can be used in source code of app ?

Those represent variables in the kernel or userspace application code
that systemtap may be able to read and/or write at a particular probe.
They are the same ones that gdb should be able to access, were a
breakpoint placed at the analogous locations.  Systemtap also has some
special metavariables like $$vars, $$return, etc., listed in the
stapprobes man pages, plus pretty-printed $var$ options.


> where are described functions that can be used with stap ? Those in
> man stapfuncs ?  and tapsets are those in tapset refference ? 

The easiest way is to run "man -k 3stap".  That will list tapset
functions, so that later you can run

% man function::execname

on each one.

- FChE

      reply	other threads:[~2011-03-30 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26 23:01 wakan tanka
2011-03-30 16:04 ` Frank Ch. Eigler [this message]

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=y0m7hbgoas8.fsf@fche.csb \
    --to=fche@redhat.com \
    --cc=systemtap@sourceware.org \
    --cc=wakatana@gmail.com \
    /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).