summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xMakefile.am11
-rw-r--r--configure.ac10
-rwxr-xr-xsrc/symbolize.cc2
4 files changed, 21 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 42328f2..1ce2460 100644
--- a/.gitignore
+++ b/.gitignore
@@ -89,6 +89,7 @@
/page_heap_test.exe
/pagemap_unittest
/pagemap_unittest.exe
+/pprof-symbolize
/profile_handler_unittest
/profiledata_unittest
/profiler1_unittest
diff --git a/Makefile.am b/Makefile.am
index 04ff5af..be1db83 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -392,7 +392,10 @@ endif WITH_STACK_TRACE
# If we are not compiling with stacktrace support, pprof is worthless
if WITH_STACK_TRACE
-bin_SCRIPTS = src/pprof
+bin_SCRIPTS = pprof-symbolize
+
+pprof-symbolize : $(top_srcdir)/src/pprof
+ cp -p $(top_srcdir)/src/pprof $@
### Unittests
@@ -403,9 +406,13 @@ pprof_unittest: $(top_srcdir)/src/pprof
# Let unittests find pprof if they need to run it
TESTS_ENVIRONMENT += PPROF_PATH=$(top_srcdir)/src/pprof
-### Documentation
+if INSTALL_PPROF
+bin_SCRIPTS += src/pprof
dist_man_MANS = docs/pprof.1
dist_doc_DATA += docs/pprof_remote_servers.html
+endif INSTALL_PPROF
+
+### Documentation
# On MSVC, we need our own versions of addr2line and nm to work with pprof.
WINDOWS_PROJECTS += vsprojects/nm-pdb/nm-pdb.vcxproj
diff --git a/configure.ac b/configure.ac
index ed69dca..c1c33e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -346,6 +346,16 @@ AC_CACHE_CHECK([if the compiler supports -Wno-unused-result],
AM_CONDITIONAL(HAVE_W_NO_UNUSED_RESULT,
test "$perftools_cv_w_no_unused_result" = yes)
+AC_ARG_ENABLE([deprecated-pprof],
+ [AS_HELP_STRING([--disable-deprecated-pprof],
+ [do not install old deprecated and unmaintained bundled pprof
+(see github.com/google/pprof for supported version)])],
+ [enable_pprof="$enableval"],
+ [enable_pprof=yes])
+
+AM_CONDITIONAL(INSTALL_PPROF,
+ [test "x$enable_pprof" = xyes])
+
AC_ARG_ENABLE([dynamic-sized-delete-support],
[AS_HELP_STRING([--enable-dynamic-sized-delete-support],
[try to build run-time switch for sized delete operator])],
diff --git a/src/symbolize.cc b/src/symbolize.cc
index 4c71010..d28a10d 100755
--- a/src/symbolize.cc
+++ b/src/symbolize.cc
@@ -72,7 +72,7 @@ using tcmalloc::DumpProcSelfMaps; // from sysinfo.h
// a more-permanent copy that won't ever get destroyed.
static char* get_pprof_path() {
static char* result = ([] () {
- string pprof_string = EnvToString("PPROF_PATH", "pprof");
+ string pprof_string = EnvToString("PPROF_PATH", "pprof-symbolize");
return strdup(pprof_string.c_str());
})();