[ofa-general] [PATCH] librdmacm 1/2: add valgrind support to auto-tools configuration file

Sean Hefty sean.hefty at intel.com
Thu Aug 16 16:46:35 PDT 2007


>   The resulting executables will still run without Valgrind, just a
>   little bit more slowly than they otherwise would, but otherwise
>   unchanged.  When not running on valgrind, each client request
>   consumes very few (eg. 7) instructions, so the resulting performance
>   loss is negligible unless you plan to execute client requests
>   millions of times per second.  Nevertheless, if that is still a
>   problem, you can compile with the NVALGRIND symbol defined (gcc
>   -DNVALGRIND) so that client requests are not even compiled in.  */

It just seems that we're using two checks where we really want one.  We check to
see if memcheck.h exists, and if it does, we include it.  But if the user
doesn't want valgrind, then we disable using it through NVALGRIND.

How about something more like:

if with-valgrind is set then {
	if memcheck is found then
		INCLUDE_MEMCHECK_H = 1
		if with_valgrind then set CPPFLAGS
	else
		error
}

The error message in your second patch is a little misleading otherwise, since
it could occur even though valgrind support was not requested.

- Sean



More information about the general mailing list