From 1bdb81e52c7865f89663f97f6bc1244f3e4f6b12 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Dejan=20Jovanovi=C4=87?= Date: Mon, 14 Mar 2011 22:14:47 +0000 Subject: [PATCH] adding support for google performance tools to the build sytem, it can be enabled at configure with --with-google-perftools to use it on ubuntu, you need to install packages google-perftools and libgoogle-perftools0 to run the profiling of the heap, you can run it for example with HEAPPROFILE=/tmp/profile ./builds/bin/cvc4 test/regress/regress0/lemmas/clocksynchro_5clocks.main_invar.base.smt this will create some files /tmp/profile* that you can then to get the pdf of the profile you can then run google-pprof --pdf ./builds/bin/cvc4 /tmp/profile.0001.heap > profile.pdf or for other options check http://goog-perftools.sourceforge.net/doc/ --- configure.ac | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 707cbea00..66e8acd7d 100644 --- a/configure.ac +++ b/configure.ac @@ -173,8 +173,23 @@ AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL -# determine whether to use CLN or GMP. -# we do this here so it can affect the build directory +# Whether to compile with google profiling tools +cvc4_use_google_perftools=0 +AC_ARG_WITH( + [google_perftools], + AS_HELP_STRING( + [--with-google-perftools], + [use Google Performance Tools] + ), + [if test "$withval" != no; then + cvc4_use_google_perftools=1 + fi + ] +) + +if test $cvc4_use_google_perftools = 1; then + LIBS="${LIBS:+$LIBS } -ltcmalloc -lpthread " +fi # [chris 8/24/2010] The user *must* specify --with-cln to get CLN # (and, thus, opt in to the GPL dependency). -- 2.30.2