Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 8 Apr 2019 14:57:37 +0200
From: Szabolcs Nagy <>
Subject: Re: Profiling musl

* Pascal Felber <> [2019-04-08 12:15:04 +0200]:
> Does anyone have experience with profiling musl? We are running into
> performance issues (after modifying some of the musl code) and would like to
> understand where the overheads come from, but profiling with gprof does not
> work and we have issues with valgrind. Any help will be greatly appreciated.

gprof is fairly intrusive anyway,
statistical profiling with perf should work
(perf record/perf report)

sometimes it's useful to trace/count some
points in the code, in principle debuggers
should be able to do it, but i don't know
a good tool for such thing (gdb is difficult
to automate and slow, unless you use ftrace
but that does not always work).
(i tried uprobe with perf probe, it does
system wide probing instead of just one
process and it's cumbersome to use)

you can always modify musl to add your own
instrumentation, since it's easy to run an
application with a modified musl:
 ./ app
in some cases that does not work, then
 unshare -rm /bin/sh -c 'mount --bind /lib/ld-musl-$ && app'
or similar (the instrumentation code can
simply be dprintf(2,...)).

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.