>>> FWIW this is a matter of 227Mb large /usr/lib/valgrind versus 71Mb without
>>> debug.
>>
>> Which machine architecture and compiler?
> 
> amd64 gcc, but indeed with -g, because it's how binaries are supposed to
> be built in Debian.

For many [most?] packages, Fedora handles this by building _with_ -g in CFLAGS,
saving everything in a <package>-debuginfo-<version>.rpm, then [effectively]
applying "strip --strip-debug" before constructing <package>-<version>.rpm.
Ordinary installs get the smaller pieces without debuginfo, but the 
corresponding
full -g is available for developers to use when handling bug reports.
[However, in this specific case I cannot find a valgrind-debuginfo package.]

> By default, after build, debian strip:
> 
>   - libraries with:
>     strip --remove-section=.comment --remove-section=.note --strip-unnedded
>   - exectutables with:
>     strip --remove-section=.comment --remove-section=.note
> 
> Would this be okay to do that? (I think so since my earlier test proves
> it works).

The earlier test checks only the 'free' routine, so applying --strip-unneeded
would rely on all "interesting" routines having similar behavior.


> If you strip --strip-debug (which basically should be the same as not
> building with -g if I'm correct) then memcheck-amd64-linux here is:
> 
>     -rwxr-xr-x 1 madcoder madcoder 4751991 12 mai   17:06 
> /home/madcoder/memcheck-amd64-linux
> 
> which is basically 4M instead of 11.5… du your /usr/lib/valgrind you'll see 
> it's huge!

I see around 12MB per <tool>-amd64-linux, and about 5MB or less after "strip 
--strip-debug".
If that much is too big, then consider removing infrequently-used tools,
or mounting a compressed filesystem on /usr/lib/valgrind, or perhaps compressing
individual executables with a compressor such as upx 
(http://upx.sourceforge.net).
upx does compress them to about 2MB to 2.6MB each, and they do invoke; but 
valgrind
and its tools might make assumptions about layout of address space that are more
demanding than a usual executable program.

-- 

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to