CMake/Google Perftools CPUProfiler

The Google Perftools CPUProfiler (lprofiler) does not seem to be linked into bro when perftools is enabled. Is this an error or is it intentional?

Is there an alternate flag available to include the CPU Profiler?

configured with --enable-perftools option, rebuilt and installed, no lprofiler exists.

$ ldd /usr/local/bro/bin/bro
linux-gate.so.1 => (0xb77bf000)
libpcap.so.0.8 => /usr/lib/i386-linux-gnu/libpcap.so.0.8 (0xb7770000)
libssl.so.1.0.0 => /usr/lib/i686/cmov/libssl.so.1.0.0 (0xb7723000)
libcrypto.so.1.0.0 => /usr/lib/i686/cmov/libcrypto.so.1.0.0 (0xb7574000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7560000)
libtcmalloc.so.0 => /usr/local/lib/libtcmalloc.so.0 (0xb74dc000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb73ee000)
libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb73c8000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb73aa000)
libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb7250000)
libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb7237000)
libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xb7233000)
/lib/ld-linux.so.2 (0xb77c0000)

Thoughts?

Thanks!

Examining at FindGooglePerftools, looks like it only uses tcmalloc. The attached patch should change this to use tcmalloc_and_profiler instead.

James, mind opening an issue for this on the tracker?

Thanks,
Gilbert

tcmalloc_prof.patch (357 Bytes)