summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-15 11:55:51 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-15 11:55:51 +0000
commit95c3892dd3911ba44ae3170573de1153857b15a8 (patch)
tree6d7ef89721855b6f26afaef7c63b54af19d6f57d
parent6e9a8c5ae2883ca21d117ac672dd8a55b3429dc1 (diff)
sna: Include valgrind leakchecks for --enable-debug=memory
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 30262c15..75a6b27e 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -54,6 +54,11 @@
#include <sys/mman.h>
#include <unistd.h>
+#ifdef HAVE_VALGRIND
+#include <valgrind.h>
+#include <memcheck.h>
+#endif
+
#define FAULT_INJECTION 0
#define FORCE_INPLACE 0
@@ -16452,6 +16457,8 @@ static void sna_accel_debug_memory(struct sna *sna)
ErrorF("Allocated CPU bo: %d, %ld bytes\n",
sna->debug_memory.cpu_bo_allocs,
(long)sna->debug_memory.cpu_bo_bytes);
+
+ VG(VALGRIND_DO_ADDED_LEAK_CHECK);
}
#else