All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 02/13] Switch valgrind memcheck.h to on by default
Date: Fri, 23 Sep 2016 13:16:57 -0600	[thread overview]
Message-ID: <1474658228-5390-3-git-send-email-jgunthorpe@obsidianresearch.com> (raw)
In-Reply-To: <1474658228-5390-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

We now recommend that this source be built with valgrind memcheck.h
present, so use it automatically if it is available. Users looking
to remove this tiny overhead can build with -DENABLE_VALGRIND=0

Downstream packagers should ensure the build is done with valgrind
headers available.

NOTE: Fedora/CentOS have shipped with valgrind turn on in their
packaging, so for most users this is no change.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 CMakeLists.txt | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 06dd98203349..be82c2896d75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,8 +10,8 @@
 #  -DCMAKE_BUILD_TYPE=RelWithDebInfo
 #      Change the optimization level, Debug disables optimization,
 #      Release is for packagers
-#  -DENABLE_VALGRIND=1 (default disabled)
-#      Embed valgrind notations, this has a tiny negative performance impact
+#  -DENABLE_VALGRIND=0 (default enabled)
+#      Disable valgrind notations, this has a tiny positive performance impact
 #  -DENABLE_RESOLVE_NEIGH=0 (default enabled)
 #      Do not link to libnl and do not resolve neighbours internally for Ethernet,
 #      and do not build iwpmd.
@@ -189,9 +189,11 @@ RDMA_DoFixup("${HAVE_RDMA_USER_RXE}" "rdma/rdma_user_rxe.h")
 #-------------------------
 # Apply fixups
 
-# FIXME: We should probably always enable memcheck.h, and only selectively
-# turn it off in the real high performance paths. There is no reason umad
-# should ever have memcheck disabled for instance.
+# We prefer to build with valgrind memcheck.h present, but if not, or the user
+# requested valgrind disabled, then replace it with our dummy stub.
+if (NOT DEFINED ENABLE_VALGRIND)
+  set(ENABLE_VALGRIND "ON" CACHE BOOL "Enable use of valgrind annotations")
+endif()
 if (ENABLE_VALGRIND)
   CHECK_INCLUDE_FILE("valgrind/memcheck.h" HAVE_VALGRIND_MEMCHECK)
   CHECK_INCLUDE_FILE("valgrind/drd.h" HAVE_VALGRIND_DRD)
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-09-23 19:16 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-23 19:16 [PATCH 00/13] Policy changes and packaging support Jason Gunthorpe
     [not found] ` <1474658228-5390-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-23 19:16   ` [PATCH 01/13] Be consistent about defining NDEBUG Jason Gunthorpe
2016-09-23 19:16   ` Jason Gunthorpe [this message]
2016-09-23 19:16   ` [PATCH 03/13] Do not produce libtool .la files Jason Gunthorpe
2016-09-23 19:16   ` [PATCH 04/13] Do not produce static libraries by default Jason Gunthorpe
2016-09-23 19:17   ` [PATCH 05/13] Have cmake run man pages through text substitution Jason Gunthorpe
     [not found]     ` <1474658228-5390-6-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-23 21:23       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373AB08E9D8-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-09-23 21:38           ` Jason Gunthorpe
2016-09-23 21:49             ` Hefty, Sean
     [not found]             ` <20160923213819.GC8490-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-23 21:48               ` Hefty, Sean
2016-09-26  6:30               ` Weiny, Ira
     [not found]                 ` <2807E5FD2F6FDA4886F6618EAC48510E24EEBF1A-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-09-26  7:01                   ` Leon Romanovsky
2016-09-26 15:19                   ` Hefty, Sean
     [not found]                     ` <1828884A29C6694DAF28B7E6B8A82373AB08EFE3-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-09-26 17:47                       ` Jason Gunthorpe
     [not found]                         ` <20160926174713.GF22965-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-26 18:17                           ` Weiny, Ira
     [not found]                             ` <2807E5FD2F6FDA4886F6618EAC48510E24EEC6E9-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-09-26 18:21                               ` Jason Gunthorpe
     [not found]                                 ` <20160926182154.GA27094-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 18:37                                   ` ira.weiny
2016-09-23 19:17   ` [PATCH 06/13] Consolidate definitions for paths into config.h Jason Gunthorpe
     [not found]     ` <1474658228-5390-7-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-23 21:22       ` Hefty, Sean
2016-09-23 19:17   ` [PATCH 07/13] Pass ancillary files that use paths through cmake substitution Jason Gunthorpe
2016-09-23 19:17   ` [PATCH 08/13] srp_daemon: Move lock file into /var/run/ Jason Gunthorpe
2016-09-23 19:17   ` [PATCH 09/13] verbs: Move the providers into /usr/lib.../libibverbs by default Jason Gunthorpe
2016-09-23 19:17   ` [PATCH 10/13] ipathverbs: Move truescale-serdes.cmds to /usr/libexec/ Jason Gunthorpe
2016-09-23 19:17   ` [PATCH 11/13] srp_daemon: Add the debian initscripts as an option Jason Gunthorpe
     [not found]     ` <1474658228-5390-12-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-28 18:27       ` Doug Ledford
     [not found]         ` <57EC0B75.3000101-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-28 18:47           ` Jason Gunthorpe
     [not found]             ` <20160928184708.GA31472-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-28 18:55               ` Doug Ledford
     [not found]                 ` <57EC120F.7070506-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-28 21:13                   ` Jason Gunthorpe
2016-09-28 20:18               ` Bart Van Assche
     [not found]                 ` <07810a28-9db1-6dca-0666-d811fe246b7e-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-09-28 21:01                   ` Jason Gunthorpe
     [not found]                     ` <20160928210137.GB2533-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-28 21:11                       ` Doug Ledford
2016-09-23 19:17   ` [PATCH 12/13] Document a versioning strategy and use it Jason Gunthorpe
2016-09-23 19:17   ` [PATCH 13/13] Remove ibsupport-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org from MAINTAINERS Jason Gunthorpe
     [not found]     ` <1474658228-5390-14-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-24 13:43       ` Dalessandro, Dennis
     [not found]         ` <1474724600.6625.1.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-09-24 16:56           ` Jason Gunthorpe
     [not found]             ` <20160924165645.GA16206-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-24 19:18               ` Dalessandro, Dennis
     [not found]                 ` <1474744719.6625.3.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-09-26 18:12                   ` Jason Gunthorpe
     [not found]                     ` <20160926181206.GA28992-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-26 19:12                       ` Dalessandro, Dennis
2016-09-28 18:27   ` [PATCH 00/13] Policy changes and packaging support Doug Ledford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474658228-5390-3-git-send-email-jgunthorpe@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.