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: gettimeofday returns zero


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


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