David Smith wrote:
Something *really* strange is going on there. The above output (and
the part that I cut out) shows that stap didn't do pass 4 for any of
the cache tests. That's really odd, since "stap -p4" is hardcoded in
that test.
Can you run the following command *twice* and send me the output?
# stap -v -p4 -e "probe begin {}"
The output should look something like:
---------------
# stap -v -p4 -e "probe begin {}"
Pass 1: parsed user script and 53 library script(s) in
140usr/10sys/165real ms.
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0
global(s) in 10usr/10sys/3real ms.
Pass 3: translated to C into
"/tmp/stapGSMvEZ/stap_7a5fe045c67645c83d0df1d327d2de1c_122.c" in
0usr/0sys/0real ms.
Pass 4: compiled C into "stap_7a5fe045c67645c83d0df1d327d2de1c_122.ko"
in 880usr/140sys/2566real ms.
# stap -v -p4 -e "probe begin {}"
Pass 1: parsed user script and 53 library script(s) in
140usr/20sys/490real ms.
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0
global(s) in 10usr/0sys/3real ms.
Pass 3: using cached
/home/dsmith/.systemtap/cache/7a/stap_7a5fe045c67645c83d0df1d327d2de1c_122.c
Pass 4: using cached
/home/dsmith/.systemtap/cache/7a/stap_7a5fe045c67645c83d0df1d327d2de1c_122.ko
---------------
Pass 4 is giving an error, odd that it did not show up in the test
log. Here it is:
[....]
mp/stapuYgXg9/.tmp_stap_9001.o /tmp/stapuYgXg9/stap_9001.c
In file included from /usr/local/share/systemtap/runtime/runtime.h:79,
from /tmp/stapuYgXg9/stap_9001.c:31:
/usr/local/share/systemtap/runtime/alloc.c:66: error: expected
declaration specifiers or '...' before '(' token
/usr/local/share/systemtap/runtime/alloc.c: In function 'percpu_free':
/usr/local/share/systemtap/runtime/alloc.c:67: error: number of
arguments doesn't match prototype
include/linux/percpu.h:51: error: prototype declaration
[...]
From runtime/alloc.c
[...]
#ifdef CONFIG_SMP
[...]
66: void _stp_free_percpu(const void *objp)
{
int i;
struct percpu_data *p = (struct percpu_data *) (~(unsigned long)
objp);
for_each_cpu(i)
kfree(p->ptrs[i]);
kfree(p);
}
But earler in alloc.c _stp_free_percpu() is defined:
#ifdef CONFIG_SMP
#define _stp_free_percpu(ptr) free_percpu(ptr)
#else
#define _stp_free_percpu(ptr) kfree(ptr)
#endif
I think the #ifdefs are messed up. Both defines are under CONFIG_SMP.
If I comment out the first defines it works better, but I am still net
seeing the
"using cached " message.
root@hez235 testing]# stap -v -p4 -e "probe begin {}"
Pass 1: parsed user script and 52 library script(s) in
1410usr/90sys/1617real ms.
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 global(s) in
20usr/0sys/25real ms.
Pass 3: translated to C into "/tmp/stapAeJiJi/stap_9300.c" in
780usr/2750sys/3863real ms.
Pass 4: compiled C into "stap_9300.ko" in 9440usr/1950sys/12946real ms.
[root@hez235 testing]# stap -v -p4 -e "probe begin {}"
Pass 1: parsed user script and 52 library script(s) in
1410usr/90sys/1615real ms.
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 global(s) in
20usr/0sys/27real ms.
Pass 3: translated to C into "/tmp/stapsDZD66/stap_9388.c" in
770usr/2760sys/4103real ms.
Pass 4: compiled C into "stap_9388.ko" in 9470usr/1960sys/12527real ms.