public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Mehul Choube <Mehul_Choube@symantec.com>
To: "systemtap@sourceware.org" <systemtap@sourceware.org>
Subject: probe when thread is queued
Date: Tue, 05 Feb 2013 20:33:00 -0000	[thread overview]
Message-ID: <E884EC9CD547324B8976A5D37317AC566D92A6B927@APJ1XCHEVSPIN30.SYMC.SYMANTEC.COM> (raw)

Hi,

I want to probe when does a thread go into "queued" state (i.e off cpu but not for IO).
But following method gives error:

======= cmd output - start =======

sles11sp1:/stap_scripts # uname -a
Linux sles11sp1 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux

sles11sp1:/stap_scripts # stap -v
A script must be specified.
SystemTap translator/driver (version 1.0/0.137 non-git sources)

sles11sp1:/stap_scripts # stap -e 'probe scheduler.cpu_off { if (task_prev->state == 0) { printf ("pid %d queued\n", task_prev->pid); } }'
parse error: expected ')'
        saw: operator '->' at <input>:1:40
     source: probe scheduler.cpu_off { if (task_prev->state == 0) { printf ("pid %d queued\n", task_prev->pid); } }
                                                    ^
parse error: expected 'probe', 'global', 'function', or '%{'
        saw: operator '}' at <input>:1:102
     source: probe scheduler.cpu_off { if (task_prev->state == 0) { printf ("pid %d queued\n", task_prev->pid); } }
                                                                                                                  ^
2 parse error(s).
Pass 1: parse failed.  Try again with another '--vp 1' option.

sles11sp1:/stap_scripts # stap -e 'probe scheduler.cpu_off { if ($prev->state == 0) { printf ("pid %d queued\n", $prev->pid); } }'
semantic error: not accessible at this address (0xffffffff8139499b): identifier '$prev' at <input>:1:31
        source: probe scheduler.cpu_off { if ($prev->state == 0) { printf ("pid %d queued\n", $prev->pid); } }
                                              ^
Pass 2: analysis failed.  Try again with another '--vp 01' option.

sles11sp1:/stap_scripts # stap -e 'probe scheduler.cpu_off { if (@cast(task_prev, "task_struct", "kernel")->state == 0) { printf ("pid %d queued\n", @cast(task_prev, "task_struct", "kernel")->pid); } }'
semantic error: not accessible at this address (0xffffffff8139499b): identifier '$prev' at /usr/share/systemtap/tapset/scheduler.stp:38:17
        source:     task_prev = $prev
                                ^
Pass 2: analysis failed.  Try again with another '--vp 01' option.

======= cmd output - end =======

Please suggest a way to obtain the info.



Thanks,
Mehul

             reply	other threads:[~2013-02-05 20:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05 20:33 Mehul Choube [this message]
2013-02-05 21:28 ` David Smith
2013-02-06  6:31   ` Mehul Choube
2013-02-06 20:02     ` Josh Stone

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=E884EC9CD547324B8976A5D37317AC566D92A6B927@APJ1XCHEVSPIN30.SYMC.SYMANTEC.COM \
    --to=mehul_choube@symantec.com \
    --cc=systemtap@sourceware.org \
    /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).