Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
dist_doc_DATA = quickstart.txt streaming-howto.txt python-howto.txt \
snapshot-howto.txt calibrate.txt live-reading-howto.txt \
- live-reading-protocol.txt
+ live-reading-protocol.txt valgrind-howto.txt
--- /dev/null
+Build lttng-tools with "-DVALGRIND" to create executables compatible
+with the valgrind tool. The start with e.g.:
+
+valgrind --leak-check=full lttng-sessiond
poison_free(ht->split_count);
}
-#if defined(HAVE_SCHED_GETCPU)
+#if defined(HAVE_SCHED_GETCPU) && !defined(VALGRIND)
static
int ht_get_split_count_index(unsigned long hash)
{
mode_t mode;
};
+#ifdef VALGRIND
+static
+int use_clone(void)
+{
+ return 0;
+}
+#else
+static
+int use_clone(void)
+{
+ return !getenv("LTTNG_DEBUG_NOCLONE");
+}
+#endif
+
/*
* Create recursively directory using the FULL path.
*/
static
int run_as(int (*cmd)(void *data), void *data, uid_t uid, gid_t gid)
{
- if (!getenv("LTTNG_DEBUG_NOCLONE")) {
+ if (use_clone()) {
int ret;
DBG("Using run_as_clone");