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]

Enabling dwarf unwinder for s390x


Hi,

I have enabled the dwarf unwinder for s390x in systemtap git trunk now.

After the powerpc cleanups this was not that hard. Though it did find a
generic issue with the unwinder. The ABI should specify the default CFI
rules for the program counter and stack pointer, although most (all?)
don't, so you just have to guess... In most cases the PC is retrieved
through the return address register as specified by the CIE (but not
actually on x86 where one has an extra [fake] unwind table register that
one just maps to the PC). And the SP is normally set from the CFA (but
not on s390 where the SP is treated as just a regular register). Through
unwind.h and the arch specific include files the default rule for PC and
SP can now be set.

There was also an oddity with the RHEL based kernel I was using which
had a .eh_frame section of type SHT_NOTE and no
corresponding .eh_frame_hdr section. We now just ignore such weirdness
(there is a .debug_frame section that we can use). See
https://bugzilla.redhat.com/show_bug.cgi?id=751197

With the latest commits all kernel based stack tapset functions work
fine on s390x. There is a general issue with accessing user space
addresses on s390 which David already noticed. This also prevents user
space backtraces atm. I'll look into this next. See David's emails:
http://sourceware.org/ml/systemtap/2011-q4/msg00064.html

Some other issues on s390x that need some love are:
http://sourceware.org/PR13377
- s390x argument access is broken for any argument > 5 (_stp_arg)
http://sourceware.org/PR13376
- vdso/vma build-id matching fails on s390x
http://sourceware.org/PR13350
- dwarf unwinder _stp_valid_pc_addr() invalid for s390x 

So things aren't perfect yet. But the current test results also don't
look too terrible:

Host: Linux ibm-z10-15.rhts.eng.bos.redhat.com 2.6.32-211.el6.s390x #1
SMP Tue O
ct 18 16:03:18 EDT 2011 s390x s390x s390x GNU/Linux
Snapshot: version 1.7/0.152 commit release-1.6-377-g9cc3e70
GCC: 4.4.6 [gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)]
Distro: Red Hat Enterprise Linux Server release 6.2 Beta (Santiago)

# of expected passes            2626
# of unexpected failures        220
# of unexpected successes       8
# of expected failures          261
# of untested testcases         65
# of unsupported tests          6

More testing and help with any of the above appreciated.

Thanks,

Mark


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