configure: Add support for tcmalloc
commit2847b46958ab0bd604e1b3fcafba0f5ba4375833
authorFam Zheng <famz@redhat.com>
Thu, 26 Mar 2015 03:03:12 +0000 (26 11:03 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 28 Apr 2015 20:14:11 +0000 (28 22:14 +0200)
tree35718aed1d18f94ce9f33da940a623da7a3db99e
parent23820dbfc79d1c9dce090b4c555994f2bb6a69b3
configure: Add support for tcmalloc

This adds "--enable-tcmalloc" and "--disable-tcmalloc" to allow linking
to libtcmalloc from gperftools.

tcmalloc is a malloc implementation that works well with threads and is
fast, so it is good for performance.

It is disabled by default, because the MALLOC_PERTURB_ flag we use in
tests doesn't work with tcmalloc. However we can enable tcmalloc
specific heap checker and profilers later.

An IOPS gain can be observed with virtio-blk-dataplane, other parts of
QEMU will directly benefit from it as well:

==========================================================
                       glibc malloc
----------------------------------------------------------
rw         bs         iodepth    bw     iops       latency
read       4k         1          150    38511      24
----------------------------------------------------------

==========================================================
                         tcmalloc
----------------------------------------------------------
rw         bs         iodepth    bw     iops       latency
read       4k         1          156    39969      23
----------------------------------------------------------

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <1427338992-27057-1-git-send-email-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
configure