This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: [RFC] Deprecating mtrace?


On 2013.11.04 at 10:34 +0100, OndÅej BÃlka wrote:
> On Mon, Nov 04, 2013 at 09:29:47AM +0100, Fabrice Bauzac wrote:
> > Valgrind is too slow for large CPU-intensive programs.
> >
> Citation needed.
> 
> We are talking about relative valgrind/mtrace performance so please post
> a real world testcase where mtrace is faster than valgrind.
> 
> A simple example of contrary is gcc. Consider following program. That
> enables mtrace.
> 
> #include <mcheck.h>
> void __attribute__((constructor)) init(){
>   mtrace();
> }
> 
> Now compiling it is fast.
> 
> $ time gcc -O3 m.c -fPIC -shared
> 
> real	0m0.038s
> user	0m0.024s
> sys	0m0.004s
> 
> For valgrind a overhead is mostly a additive constant, as when I compile
> a bigger files relative overhead goes down but we take this as example.
> 
> $ time valgrind gcc -O3 m.c -fPIC -shared

You should use "--track-origins=yes --trace-children=yes" here to make
this a fair comparison.

-- 
Markus


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