summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-04-18 17:54:39 -0700
committerSamuel Just <sam.just@inktank.com>2013-04-19 11:05:58 -0700
commit1493e7dbfb4accd931e27c563526510492a11a8b (patch)
treec92b7ad800f27b42d11b973b05ed28cc3a5fd9f8 /configure.ac
parent66c007fb3b71156a72e8bcfd8295a3e8f812d1bb (diff)
downloadceph-1493e7dbfb4accd931e27c563526510492a11a8b.tar.gz
osd/: optionally track every pg ref
This involves three pieces: For intrusive_ptr type references, we use TrackedIntPtr instead. This uses get_with_id and put_with_id to associate an id and backtrace with each particular ref instance. For refs taken via direct calls to get() and put(), get and put now require a tag string. The PG tracks individual ref counts for each tag as well as the total. Finally, PGs register/unregister themselves on construction/destruction with OSDService. As a result, on shutdown, we can check for live pgs and determine where the references are held. This behavior is compiled out by default, but can be included with the --enable-pgrefdebugging flag. Signed-off-by: Samuel Just <sam.just@inktank.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 23e21133e6a..2661d1c456e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -268,6 +268,12 @@ AS_IF([test "x$with_tcmalloc" != xno],
[no tcmalloc found (use --without-tcmalloc to disable)])])])
AM_CONDITIONAL(WITH_TCMALLOC, [test "$HAVE_LIBTCMALLOC" = "1"])
+#set pg ref debugging?
+AC_ARG_ENABLE([pgrefdebugging],
+ [AS_HELP_STRING([--enable-pgrefdebugging], [enable pg ref debugging])],
+ [AC_DEFINE([PG_DEBUG_REFS], [1], [Defined if you want pg ref debugging])],
+ [])
+
#
# Java is painful
# - adapted from OMPI wrappers package