Fix dwarf2 unwinding through futex functions.
commitdf5b85da90915ce6208ad737807e3d8f2a8fce87
authorAndi Kleen <ak@linux.intel.com>
Wed, 26 Mar 2014 22:45:37 +0000 (26 18:45 -0400)
committerCarlos O'Donell <carlos@redhat.com>
Thu, 27 Mar 2014 03:18:15 +0000 (26 23:18 -0400)
tree5f9d2d8b2b64d2bc9b36dead2b4d4f89f1e8bc79
parentfbd6b5a4052316f7eb03c4617eebfaafc59dcc06
Fix dwarf2 unwinding through futex functions.

When profiling programs with lock problems with perf record -g dwarf,
libunwind can currently not backtrace through the futex and unlock
functions in pthread. This is because they use out of line sections,
and those are not correctly described in dwarf2 (I believe needs
dwarf3 or 4).

This patch first removes the out of line sections. They only save a
single jump, but cause a lot of pain. Then it converts the now inline
lock code to use the now standard gas .cfi_* commands.

With these changes libunwind/perf can backtrace through the futex
functions now.

Longer term it would be likely better to just use C futex() functions
on x86 like all the other architectures. This would clean the code up
even more.
ChangeLog
nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h