This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
loc2-test and stap disagree with each other
- From: Hien Nguyen <hien at us dot ibm dot com>
- To: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Mon, 10 Jul 2006 15:18:48 -0700
- Subject: loc2-test and stap disagree with each other
I tried loc2c-test to figure out which variables are available at the
probe point as follow
#./loc2c-test -k 0xc00000000036d048
kernel/sched.c (0x11)
__kcrctab_wake_up_process [443092] long unsigned int const
__kstrtab_wake_up_process [4430b8] char[] const
[.....]
schedule (0x2e): 0xc00000000036c490 (kernel/sched.c:2865) ..
0xc00000000036d2d8 (kernel/sched.c:4056)
switch_count [43c0d6] long int*
prev [43c0e6] task_t*
next [43c0f6] task_t*
rq [43c106] runqueue_t*
array [43c115] prio_array_t*
queue [43c125] list_head*
now [43c131] long long
unsigned int
run_time [43c141] long unsigned int
cpu [43c151] int
idx [43c161] int
new_prio [43c171] int
Looks like loc2c-test indicates that the *prev* and *next* variables are
available. However, stap failed to resolve those variable
#stap -p2 -vv -e 'probe
kernel.statement("schedule@kernel/sched.c:3035"){ prev_task =
$prev->pid; printf("%d\n", prev_task)}'
[....]Pass 1: parsed user script and 25 library script(s) in
190usr/0sys/442real ms.
probe schedule@kernel/sched.c:3035 pc=0xc00000000036d048
semantic error: unresolved target-symbol expression: identifier '$prev'
at <input>:1:69
semantic error: unresolved target-symbol expression: identifier '$prev'
at <input>:1:69
semantic error: unresolved target-symbol expression: identifier '$prev'
at <input>:1:69
semantic error: unresolved target-symbol expression: identifier '$prev'
at <input>:1:69
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 global(s) in
450usr/50sys/1130real ms.
Pass 2: analysis failed. Try again with more '-v' (verbose) options.
Running rm -rf /tmp/stapGetF8h
Did I do something wrong?
Thanks, Hien.