Re: [PATCH 1/3] perf tools: Allow to build with -ltcmalloc

From: Andi Kleen
Date: Sun Oct 13 2019 - 21:33:35 EST


> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index a099a8a89447..8f1ba986d3bf 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -114,6 +114,8 @@ include ../scripts/utilities.mak
> # Define NO_LIBZSTD if you do not want support of Zstandard based runtime
> # trace compression in record mode.
> #
> +# Define TCMALLOC to enable tcmalloc heap profiling.

It might be useful for more than just profiling. I found that gcc runs a
few percent faster with tcmalloc for some workloads. Maybe the same is
true for perf too, as sometimes it does a lot of mallocs.

-Andi