public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* @defined in schedtimes.stp
@ 2010-11-03  9:30 Joachim Worringen
  2010-11-03 10:02 ` Mark Wielaard
  0 siblings, 1 reply; 6+ messages in thread
From: Joachim Worringen @ 2010-11-03  9:30 UTC (permalink / raw)
  To: systemtap

Greetings,

I want to use schedtimes.stp 
(http://sourceware.org/systemtap/examples/process/schedtimes.stp) and it 
fails on my CentOS 5.5 box:

[root@x8dth-1 systemtap]# stap schedtimes.stp
parse error: unknown statistic operator @defined
	saw: identifier '@defined' at schedtimes.stp:58:13
      source:         if (@defined($rq) && (get_iowait($rq) - 
io_wait_count[previous_pid]) > 0)
                          ^
parse error: unknown statistic operator @defined
	saw: identifier '@defined' at schedtimes.stp:76:9
      source:     if (@defined($rq))
                      ^
2 parse error(s).
Pass 1: parse failed.  Try again with another '--vp 1' option.

'@defined()' is part of the systemtap language, AFAICT: 
http://sourceware.org/systemtap/langref/Language_elements.html#SECTION00078200000000000000

What am I missing?

This is what is installed:
[root@x8dth-1 tapset]# rpm -qa | grep systemtap
systemtap-sdt-devel-1.1-3.el5_5.2
systemtap-1.1-3.el5_5.2
systemtap-runtime-1.1-3.el5_5.2
systemtap-sdt-devel-1.1-3.el5_5.2

And this is the kernel:
[root@x8dth-1 tapset]# uname -rp
2.6.18-194.17.1.el5 x86_64


  thanks, Joachim

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

* Re: @defined in schedtimes.stp
  2010-11-03  9:30 @defined in schedtimes.stp Joachim Worringen
@ 2010-11-03 10:02 ` Mark Wielaard
  2010-11-03 10:26   ` Joachim Worringen
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Wielaard @ 2010-11-03 10:02 UTC (permalink / raw)
  To: joachim.worringen; +Cc: systemtap

On Wed, 2010-11-03 at 10:30 +0100, Joachim Worringen wrote:
> I want to use schedtimes.stp 
> (http://sourceware.org/systemtap/examples/process/schedtimes.stp) and it 
> fails on my CentOS 5.5 box:
> 
> [root@x8dth-1 systemtap]# stap schedtimes.stp
> parse error: unknown statistic operator @defined
> [...]
> '@defined()' is part of the systemtap language, AFAICT: 
> http://sourceware.org/systemtap/langref/Language_elements.html#SECTION00078200000000000000
> 
> What am I missing?
> 
> This is what is installed:
> [root@x8dth-1 tapset]# rpm -qa | grep systemtap
> systemtap-sdt-devel-1.1-3.el5_5.2
> systemtap-1.1-3.el5_5.2
> systemtap-runtime-1.1-3.el5_5.2
> systemtap-sdt-devel-1.1-3.el5_5.2

@defined was introduced in systemtap 1.2 and you are using version 1.1.
The latest systemtap release is version 1.3 BTW.

Cheers,

Mark

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

* Re: @defined in schedtimes.stp
  2010-11-03 10:02 ` Mark Wielaard
@ 2010-11-03 10:26   ` Joachim Worringen
  2010-11-03 10:36     ` Mark Wielaard
  0 siblings, 1 reply; 6+ messages in thread
From: Joachim Worringen @ 2010-11-03 10:26 UTC (permalink / raw)
  To: Mark Wielaard, systemtap

Am 03.11.2010 11:02, schrieb Mark Wielaard:
> @defined was introduced in systemtap 1.2 and you are using version 1.1.
> The latest systemtap release is version 1.3 BTW.

O.k., that makes sense. Can anyone recommend a simple way to do the 
upgrade on CentOS 5.5 (yum repository, rpm archive)?

  thanks, Joachim

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

* Re: @defined in schedtimes.stp
  2010-11-03 10:26   ` Joachim Worringen
@ 2010-11-03 10:36     ` Mark Wielaard
  2010-11-03 11:02       ` Joachim Worringen
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Wielaard @ 2010-11-03 10:36 UTC (permalink / raw)
  To: joachim.worringen; +Cc: systemtap

On Wed, 2010-11-03 at 11:25 +0100, Joachim Worringen wrote:
> Am 03.11.2010 11:02, schrieb Mark Wielaard:
> > @defined was introduced in systemtap 1.2 and you are using version 1.1.
> > The latest systemtap release is version 1.3 BTW.
> 
> O.k., that makes sense. Can anyone recommend a simple way to do the 
> upgrade on CentOS 5.5 (yum repository, rpm archive)?

I don't know of any official rpm archives.
But in theory the following should just work:

wget http://sourceware.org/systemtap/ftp/releases/systemtap-1.3.tar.gz
tar zxf systemtap-1.3.tar.gz
cd systemtap-1.3
./configure --prefix=/usr/local/systemtap
make
sudo make install

And then just use the stap binary from /usr/local/systemtap/bin

Cheers,

Mark

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

* Re: @defined in schedtimes.stp
  2010-11-03 10:36     ` Mark Wielaard
@ 2010-11-03 11:02       ` Joachim Worringen
  2010-11-04 13:32         ` Mark Wielaard
  0 siblings, 1 reply; 6+ messages in thread
From: Joachim Worringen @ 2010-11-03 11:02 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: systemtap

Am 03.11.2010 11:36, schrieb Mark Wielaard:
> I don't know of any official rpm archives.
> But in theory the following should just work:
>
> wget http://sourceware.org/systemtap/ftp/releases/systemtap-1.3.tar.gz
> tar zxf systemtap-1.3.tar.gz
> cd systemtap-1.3
> ./configure --prefix=/usr/local/systemtap
> make
> sudo make install
>
> And then just use the stap binary from /usr/local/systemtap/bin

Works perfectly this way. Is it generally sufficient to just install the 
kernel-debuginfo packages, and then the systemtap tarball?

[root@x8dth-1 systemtap]# /usr/local/systemtap/bin/stap schedtimes.stp
all mode
         execname:    pid    run(us)  sleep(us) io_wait(us) queued(us) 
total(us)

             init:      1          6    3549288          0          3 
  3549297
      migration/0:      2          3    3027334          0          3
....

Now for the results: what I want to figure out with this script is 
whether there are situations where a thread (user space, in my case) 
wants to run, but has to wait to be scheduled on a CPU. This should 
exactly be what the "queued" column contains, right?

  thanks, Joachim


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

* Re: @defined in schedtimes.stp
  2010-11-03 11:02       ` Joachim Worringen
@ 2010-11-04 13:32         ` Mark Wielaard
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Wielaard @ 2010-11-04 13:32 UTC (permalink / raw)
  To: joachim.worringen; +Cc: systemtap

On Wed, 2010-11-03 at 12:02 +0100, Joachim Worringen wrote:
> Am 03.11.2010 11:36, schrieb Mark Wielaard:
> > wget http://sourceware.org/systemtap/ftp/releases/systemtap-1.3.tar.gz
> > tar zxf systemtap-1.3.tar.gz
> > cd systemtap-1.3
> > ./configure --prefix=/usr/local/systemtap
> > make
> > sudo make install
> >
> > And then just use the stap binary from /usr/local/systemtap/bin
> 
> Works perfectly this way. Is it generally sufficient to just install the 
> kernel-debuginfo packages, and then the systemtap tarball?

Yes, it should be. And optionally any debuginfo packages for any user
space you want to inspect more closely with specific user space probes
if wanted.

> [root@x8dth-1 systemtap]# /usr/local/systemtap/bin/stap schedtimes.stp
> all mode
>          execname:    pid    run(us)  sleep(us) io_wait(us) queued(us) 
> total(us)
> 
>              init:      1          6    3549288          0          3 
>   3549297
>       migration/0:      2          3    3027334          0          3
> ....
> 
> Now for the results: what I want to figure out with this script is 
> whether there are situations where a thread (user space, in my case) 
> wants to run, but has to wait to be scheduled on a CPU. This should 
> exactly be what the "queued" column contains, right?

Yes, I believe that is what the script measures with QUEUED. It notices
a task got sched_switch out, and if it was still in a runnable state it
will measure how long it will be waiting in the run queue to get
sched_switch back in.

Cheers,

Mark

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

end of thread, other threads:[~2010-11-04 13:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-03  9:30 @defined in schedtimes.stp Joachim Worringen
2010-11-03 10:02 ` Mark Wielaard
2010-11-03 10:26   ` Joachim Worringen
2010-11-03 10:36     ` Mark Wielaard
2010-11-03 11:02       ` Joachim Worringen
2010-11-04 13:32         ` Mark Wielaard

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