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: Newb: Probe My Application


Frank, thanks for your help! I setup CentOS 5.2 and compiled and
installed systemtap on it. I'm getting further along now but still being
stopped by an error at Pass 5:

# more aprobe.stp
probe process("a.out").function("*") {
  log($$parms)
}

# stap aprobe.stp -c ./a.out
Pass 1: parsed user script and 45 library script(s) in
100usr/200sys/338real ms.
Pass 2: analyzed script: 9 probe(s), 4 function(s), 0 embed(s), 0
global(s) in 10usr/10sys/18real ms.
Pass 3: using cached
/home/radwan/.systemtap/cache/ad/stap_ad195bef414096e2124bb78599d13e1f_3
407.c
Pass 4: using cached
/home/radwan/.systemtap/cache/ad/stap_ad195bef414096e2124bb78599d13e1f_3
407.ko
Pass 5: starting run.
ERROR: module release mismatch (2.6.18-92.1.13.el5 vs 2.6.18-92.el5)

Waiting for processes to exit
Pass 5: run completed in 0usr/60sys/96real ms.
# uname -r
2.6.18-92.el5

I had to update the uprobes runtime by running make in
/usr/local/share/systemtap/runtime/uprobes/ after getting an error
message from stap about uprobes being out of date.

Any help about how to resolve the "module release mismatch" error would
be greatly appreciated!

-----Original Message-----
From: Frank Ch. Eigler [mailto:fche@redhat.com] 
Sent: Thursday, October 09, 2008 11:08 AM
To: Hassan Radwan
Cc: systemtap@sourceware.org
Subject: Re: Newb: Probe My Application


"Hassan Radwan" <HassanR@avi.com> writes:

> [...]  I recently found out about systemtap and am still getting the
> hang of things. I'm interested in trying to use systemtap as an
> alternative to a debugger to probe my own program that I wrote. [...]

Great.

> [...] How do I tell systemtap that I'm interested in all methods
within
> that one executable? [...]

If by "all methods" you mean "all functions", this would work:

  probe process("a.out").function("*") { log ($$parms) }

as would .statement("foo@file.c:333") {} and so on.  In time, we hope
to have special syntax for C++ apps.

The big proviso is that this "user-space probing" support currently
only works against a version of the kernel-side utrace API that is
somewhat obsolete and is only present in RHEL5 / CentOS / older Fedora
type kernels.  This should be fixed soon.


- FChE


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