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]

probe when thread is queued


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


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