[Babel-users] [RFC patch] linux perf support for libmusl

Dave Taht dave.taht at gmail.com
Thu Dec 17 11:59:58 UTC 2015


since there is a need for profiling babel and other subsystems (in my
case, cake) on tiny systems, the attached patch has been sitting in my
tree for a while, and supplied here in the hope it will be useful
while its problems are sorted out...

...

openwrt: Add support for musl in the linux kernel perf utility

The linux kernel's "perf" profiling utility has a hard dependency on
glibc's strerror_r which has a notorious incompatibility with other
posix standards.

This patch wraps the musl posix std strerr_r with something that behaves like
glibc strerror_r - and currently breaks glibc support as I was unable to
figure out a combination of defines that would work mutually across both
C libraries.

My current take on it is that linux mainline perf should switch to using
strerror_l which is std and known to be thread safe, and would result in
less code....

The patch only supports linux-4.4 but is easily extended backwards.

H/T to stephen walker for the initial attempt, nbd for a refinement.

untested on anything but arm at present.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-openwrt-Add-support-for-musl-in-the-linux-kernel-per.patch
Type: text/x-patch
Size: 6499 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/babel-users/attachments/20151217/413741fe/attachment.bin>


More information about the Babel-users mailing list