Closed GoogleCodeExporter closed 9 years ago
I like this idea. It would be nice to fold it in with the existing hacks I use
for
mingw right now -- we can add cygwin as well, and maybe change FreeBSD etc so
they
don't try to compile the heap checker, which is linux-specific. This is gonna
be great!
Original comment by csilv...@gmail.com
on 24 Feb 2009 at 10:36
Sure. I did the conditionals in Makefile.am just like the MINGW conditionals
(how
else ya gonna do 'em?), so it should be very easy to flip my WITH_* switches in
the
MINGW (or Cygwin) environment, or vice-versa. Or even to combine the two.
I mentioned in my comments that we (or you guys) could skip certain (possibly
less-portable?) configure checks if some perftools features were disabled, but I
didn't actually do any work towards that. Sorry. :)
Original comment by roger.a....@gmail.com
on 24 Feb 2009 at 10:51
I've decided to implement the following:
AC_ARG_ENABLE([cpu-profiler],
[AS_HELP_STRING([--disable-cpu-profiler],
[do not build the cpu profiler])],
[],
[enable_cpu_profiler="$default_enable_cpu_profiler"])
AC_ARG_ENABLE([heap-profiler],
[AS_HELP_STRING([--disable-heap-profiler],
[do not build the heap profiler])],
[],
[enable_heap_profiler="$default_enable_heap_profiler"])
AC_ARG_ENABLE([heap-checker],
[AS_HELP_STRING([--disable-heap-checker],
[do not build the heap checker])],
[],
[enable_heap_checker="$default_enable_heap_checker"])
AC_ARG_ENABLE([minimal],
[AS_HELP_STRING([--enable-minimal],
[build only tcmalloc-minimal])],
[],
[enable_minimal=no])
WITH_STACK_TRACE is set to no if there are no dependencies on the stacktrace (no
heap-checker, heap-profiler, or cpu-profiler) -- there is no way to set it
directly.
I also don't build or test or install pprof if WITH_STACK_TRACE is no.
I build libtcmalloc.so if either WITH_HEAP_CHECKER or WITH_HEAP_PROFILER is
true,
since both are linked into libtcmalloc. However, if one is true and the other
false,
I only run the appropriate unittests, so it still makes sense to distinguish
them.
Let me know if you think this plan would work for your needs, or I should
modify it.
Original comment by csilv...@gmail.com
on 27 Feb 2009 at 12:10
That works perfectly for me. I actually only need the --enable-minimal option;
I
just kind of went wild breaking down the modules in case someone else needed the
flexibility. I haven't explored the profilers much, but I can see that your
organization here makes much more sense than my original.
Original comment by roger.a....@gmail.com
on 27 Feb 2009 at 12:25
I've added new flags to configure in perftools 1.1, just released.
Original comment by csilv...@gmail.com
on 11 Mar 2009 at 9:21
Original issue reported on code.google.com by
roger.a....@gmail.com
on 24 Feb 2009 at 7:36Attachments: