diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-10-17 22:35:51 +0000 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-09 19:57:07 -0800 |
commit | 962b655483aa87d7b9bbb0062a92da3e852587bc (patch) | |
tree | 673de3f163d04c4469afedd7aebe32ee2491e395 | |
parent | 627e7201ffb20e51ed8ebc6c6c16b16dfbb34420 (diff) | |
download | libmthca-962b655483aa87d7b9bbb0062a92da3e852587bc.tar.gz |
Add Valgrind memcheck documentation to libmthca README
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | README | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -24,3 +24,36 @@ libmthca currently supports HCAs based on the following Mellanox chips: Both non-DDR and DDR HCAs are supported, and the MT25208 is supported with both MT23108-compatible and native MemFree firmware. + +Valgrind Support +================ + +When running applications that use libibverbs under the Valgrind +memory-checking debugger, Valgrind will falsely report "read from +uninitialized" for memory that was initialized by the kernel drivers +or HCA hardware. Specifically, Valgrind cannot see when kernel +drivers or HCA hardware write to userspace memory, so when the process +reads from that memory, Valgrind incorrectly assumes that the memory +contents are uninitialized, and therefore raises a warning. + +libmthca can be built with specific support for the Valgrind +memory-checking debugger by specifying the --with-valgrind command +line argument to configure. This flag enables code in libibverbs to +tell Valgrind "this memory may look uninitialized, but it's really +OK," which therefore suppresses the incorrect "read from +uninitialized" warnings. This code adds trivial overhead to the +critical performance path, so it is disabled by default. The intent +is that production users can use a "normal" build of libmthca and +developers can use the "valgrind debug" build by simply switching +their OPENIB_DRIVER_PATH environment variables. + +Libmthca needs some header files from Valgrind in order to compile +this support; it is important to use the header files from the same +version of Valgrind that will be used at run time. You may need to +specify the directory where Valgrind's header files are installed as +an argument to --with-valgrind. For example + + ./configure --with-valgrind=/opt/valgrind + +will make the libmthca build look for valgrind headers in +/opt/valgrind/include |