Bug 17275 - on s390x, buildok/memory-all-probes.stp fails
Summary: on s390x, buildok/memory-all-probes.stp fails
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-15 17:34 UTC by David Smith
Modified: 2014-08-15 20:08 UTC (History)
1 user (show)

See Also:
Host: s390x
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Smith 2014-08-15 17:34:48 UTC
RHEL7 s390x has utrace (tracepoint-based), but no uprobes:

====
# stap -wp4 ../src/testsuite/buildok/memory-all-probes.stp 
user-space process-tracking facilities not available [man error::process-tracking]
Pass 4: compilation failed.  [man error::pass4]
====

RHEL5 ia64 has utrace (in-kernel), but no uprobes:

====
# stap -wp4 ../src/testsuite/buildok/memory-all-probes.stp
/home/dsmith/.systemtap/cache/02/stap_0239fcbe16622df8c2eeb7deb70d3958_27536.ko
====

Here's the contents of memory-all-probes.stp:

====
#! stap -wp4                                                                    
                                                                                
// Tests if all probes in memory.stp are resolvable.                            
                                                                                
probe vm.*,                                                                     
      vm.*.* {}                                                                 
====

All the other memory.stp build tests pass on s390x:

====
# stap -p4 ../src/testsuite/buildok/memory.stp 
/root/.systemtap/cache/db/stap_db856fd4cd3727e706f26db9f7e63439_5123.ko
[root@ibm-z10-63 s390x]# stap -p4 ../src/testsuite/buildok/memory-detailed.stp 
WARNING: cannot probe .return of 1 inlined functions  kmalloc_node
WARNING: cannot probe .return of 1 inlined functions  kmem_cache_alloc_node
/root/.systemtap/cache/4e/stap_4e60c6e534750386fe5b78d30c39bb11_20601.ko
[root@ibm-z10-63 s390x]# stap -p4 ../src/testsuite/buildok/memory-mmap.stp 
/root/.systemtap/cache/74/stap_7444c0439be2ded35855958fca7f7a37_2093.ko
[root@ibm-z10-63 s390x]# stap -p4 ../src/testsuite/buildok/memory-embedded.stp 
WARNING: "zero_page_mask" [/tmp/stap9TiVrE/stap_1f04c57f4aeb538ed6a029ff55d4b33d_6193.ko] undefined!
/root/.systemtap/cache/1f/stap_1f04c57f4aeb538ed6a029ff55d4b33d_6193.ko
[root@ibm-z10-63 s390x]# stap -p4 ../src/testsuite/buildok/memory-write_shared_copy.stp 
WARNING: "zero_page_mask" [/tmp/stapikZe0X/stap_7f45caa1c41960203d4e148deee93a6a_2401.ko] undefined!
/root/.systemtap/cache/7f/stap_7f45caa1c41960203d4e148deee93a6a_2401.ko
====

Somehow the translator things memory-all-probes.stp has a user-probe in it, even though it doesn't.
Comment 1 David Smith 2014-08-15 17:36:12 UTC
It looks like the same thing is happening with buildok/tcp-all-probes.stp on RHEL7 s390x.
Comment 2 David Smith 2014-08-15 19:26:46 UTC
I believe this is somehow related to the .callee stuff which is getting pulled in somehow (_caller_match ends up in the -p2 output).
Comment 3 Josh Stone 2014-08-15 19:41:08 UTC
(In reply to David Smith from comment #2)
> the .callee stuff which is getting pulled in somehow

Because that test includes vm.*.*, and with alias suffixes that will expand some (vm.*).* like vm.brk.* to kernel.function("do_brk").*, which then expands .callees on it.  Try stap -l vm.*.callees for more, and notice that not all of the vm aliases get callees.  That's because some have an explicit .call in them already, which doesn't have any further suffixes possible.

AFAICT, vm.pagefault.return is the only one that actually intended to use a 3-part alias, so one solution might be to remove vm.*.* from that test and just specify that one explicitly.
Comment 4 David Smith 2014-08-15 20:08:35 UTC
(In reply to Josh Stone from comment #3)
> (In reply to David Smith from comment #2)
> > the .callee stuff which is getting pulled in somehow
> 
> Because that test includes vm.*.*, and with alias suffixes that will expand
> some (vm.*).* like vm.brk.* to kernel.function("do_brk").*, which then
> expands .callees on it.  Try stap -l vm.*.callees for more, and notice that
> not all of the vm aliases get callees.  That's because some have an explicit
> .call in them already, which doesn't have any further suffixes possible.
> 
> AFAICT, vm.pagefault.return is the only one that actually intended to use a
> 3-part alias, so one solution might be to remove vm.*.* from that test and
> just specify that one explicitly.

Yep, that was it. Fixed in commit 97e8ab6.