public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* gettimeofday returns zero
@ 2011-03-26 23:01 wakan tanka
  2011-03-30 16:04 ` Frank Ch. Eigler
  0 siblings, 1 reply; 2+ messages in thread
From: wakan tanka @ 2011-03-26 23:01 UTC (permalink / raw)
  To: systemtap

I have been told that I should write my problem to this mailing list.
I am running systemtap in oracle virtualbox 3.2.10 and there is
problem with gettimeofday_s() function which always returns 0.
This thread describes my problem with further more details. Thanks a
lot for any help.

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

[root@fedora tapset]# /usr/bin/stap-report
== stap -V ==
SystemTap translator/driver (version 1.3/0.151 non-git sources)
Copyright (C) 2005-2010 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBRPM LIBSQLITE3 NSS BOOST_SHARED_PTR TR1_UNORDERED_MAP
== which stap ==
/usr/bin/stap
== locate --regex '/stap(run)?$' | xargs ls -ald ==
sh: locate: command not found
drwxr-xr-x. 8 root root 4096 Mar 26 14:42 .
== printenv | egrep '^PATH=|^LD_LIBRARY_PATH=|^SYSTEMTAP_.*=' ==
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
== gcc -v ==
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.5.1/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto
--enable-plugin --enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)
== uname -a ==
Linux fedora 2.6.35.11-83.fc14.i686 #1 SMP Mon Feb 7 07:04:18 UTC 2011
i686 i686 i386 GNU/Linux
== dmesg | egrep 'stap|systemtap' | tail -n 10 ==
[  464.661111] stap_749a6572d58e8ebfd98f7fb51fe1109a_28569: systemtap:
1.3/0.151, base: d1359000, memory: 186data/17text/1ctx/13net/8alloc
kb, probes: 162
[  582.756137] stap_d02f09da14f62c5fa37f29e8364eb8a4_582: systemtap:
1.3/0.151, base: d15d7000, memory: 7data/10text/0ctx/13net/8alloc kb,
probes: 1
[  603.061056] stap_360cedd9b8540cb503248f533ae7c200_622: systemtap:
1.3/0.151, base: d1825000, memory: 7data/10text/0ctx/13net/8alloc kb,
probes: 1
[  756.442074] stap_ddeb9b82cff724cccd91efe4c5e49b2f_1292: systemtap:
1.3/0.151, base: d1a7a000, memory: 12data/14text/1ctx/13net/8alloc kb,
probes: 2
[ 1443.017059] stap_304dbdd26934fe7f8f9a9e081c4006a3_1098: systemtap:
1.3/0.151, base: d1cd1000, memory: 7data/11text/1ctx/13net/8alloc kb,
probes: 1
[ 3929.576047] stap_abe13e06eb9cdfadfdc6d579f113cedb_17905: systemtap:
1.3/0.151, base: d1f2c000, memory: 14data/18text/4ctx/13net/8alloc kb,
probes: 1
[14685.350910] stap_2dc6c01499ea6631cdbd6fd986e16223_1059: systemtap:
1.3/0.151, base: d2182000, memory: 7data/12text/0ctx/13net/8alloc kb,
probes: 1
== cat /proc/cpuinfo | egrep 'processor|vendor_id|model name' ==
processor       : 0
vendor_id       : GenuineIntel
model name      : Intel(R) Pentium(R) M processor 1.70GHz
== rpm -qa --qf '%{name}-%{version} %{release}.%{arch}\n' | egrep
'systemtap|elfutils|kernel|gcc' | sort ==
elfutils-libelf-0.151 1.fc14.i686
elfutils-libs-0.151 1.fc14.i686
gcc-4.5.1 4.fc14.i686
gcc-c++-4.5.1 4.fc14.i686
kernel-2.6.35.11 83.fc14.i686
kernel-2.6.35.6 45.fc14.i686
kernel-debuginfo-2.6.35.11 83.fc14.i686
kernel-debuginfo-common-i686-2.6.35.11 83.fc14.i686
kernel-devel-2.6.35.11 83.fc14.i686
kernel-headers-2.6.35.11 83.fc14.i686
libgcc-4.5.1 4.fc14.i686
systemtap-1.3 3.fc14.i686
systemtap-runtime-1.3 3.fc14.i686
== egrep 'PROBE|TRACE|MARKER|_DEBUG_'
/lib/modules/2.6.35.11-83.fc14.i686/build/.config | grep -v not.set |
sort | fmt -w 80 ==
CONFIG_AIC79XX_DEBUG_MASK=0 CONFIG_AIC7XXX_DEBUG_MASK=0
CONFIG_ARCH_CPU_PROBE_RELEASE=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_BLK_DEV_IO_TRACE=y CONFIG_CAN_PM_TRACE=y
CONFIG_CB710_DEBUG_ASSUMPTIONS=y CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_DEBUG_BOOT_PARAMS=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_DEVRES=y
CONFIG_DEBUG_FS=y CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_LIST=y CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_DEBUG_NMI_TIMEOUT=5 CONFIG_DEBUG_NX_TEST=m CONFIG_DEBUG_RODATA_TEST=y
CONFIG_DEBUG_RODATA=y CONFIG_DEBUG_SHIRQ=y CONFIG_DEBUG_SPINLOCK_SLEEP=y
CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DYNAMIC_FTRACE=y
CONFIG_FTRACE_MCOUNT_RECORD=y CONFIG_FTRACE_NMI_ENTER=y
CONFIG_FTRACE_SYSCALLS=y CONFIG_FTRACE=y CONFIG_FUNCTION_TRACER=y
CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_TRACER=y CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_FTRACE_NMI_ENTER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_MMIOTRACE_SUPPORT=y
CONFIG_HAVE_OPTPROBES=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_KEYS_DEBUG_PROC_KEYS=y
CONFIG_KMEMTRACE=y CONFIG_KPROBE_EVENT=y CONFIG_KPROBES=y CONFIG_KRETPROBES=y
CONFIG_KSYM_TRACER=y CONFIG_MTD_GEN_PROBE=m CONFIG_MTD_JEDECPROBE=m
CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 CONFIG_MTD_QINFO_PROBE=m
CONFIG_NET_DCCPPROBE=m CONFIG_NETFILTER_XT_TARGET_TRACE=m
CONFIG_NET_SCTPPROBE=m CONFIG_NOP_TRACER=y CONFIG_OPTPROBES=y
CONFIG_PCMCIA_PROBE=y CONFIG_PM_TRACE_RTC=y CONFIG_PM_TRACE=y
CONFIG_PROFILE_KSYM_TRACER=y CONFIG_SCHED_TRACER=y CONFIG_STACK_TRACER=y
CONFIG_STACKTRACE_SUPPORT=y CONFIG_STACKTRACE=y CONFIG_SYSPROF_TRACER=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_TRACEPOINTS=y CONFIG_TRACER_MAX_TRACE=y
CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_UTRACE=y CONFIG_WIMAX_DEBUG_LEVEL=8
CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 CONFIG_WORKQUEUE_TRACER=y

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

* Re: gettimeofday returns zero
  2011-03-26 23:01 gettimeofday returns zero wakan tanka
@ 2011-03-30 16:04 ` Frank Ch. Eigler
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2011-03-30 16:04 UTC (permalink / raw)
  To: wakan tanka; +Cc: systemtap

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

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

end of thread, other threads:[~2011-03-30 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-26 23:01 gettimeofday returns zero wakan tanka
2011-03-30 16:04 ` Frank Ch. Eigler

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).