Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190408125736.GB26605@port70.net>
Date: Mon, 8 Apr 2019 14:57:37 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: Profiling musl

* Pascal Felber <pascal.felber@...il.com> [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:
 ./libc.so app
in some cases that does not work, then
 unshare -rm /bin/sh -c 'mount --bind libc.so /lib/ld-musl-$arch.so.1 && app'
or similar (the instrumentation code can
simply be dprintf(2,...)).

Powered by blists - more mailing lists

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