# CMake/Google Perftools CPUProfiler

**URL:** https://community.zeek.org/t/cmake-google-perftools-cpuprofiler/2110
**Category:** Zeek
**Created:** [November 19, 2011, 7:08pm UTC](https://community.zeek.org/t/cmake-google-perftools-cpuprofiler/2110 "2011-11-19T19:08:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![James\_Swaro](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@James\_Swaro](https://community.zeek.org/u/James_Swaro)
#### Post date: [November 19, 2011, 7:08pm UTC](https://community.zeek.org/t/cmake-google-perftools-cpuprofiler/2110/1 "2011-11-19T19:08:48Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![Clark\_Gilbert](https://avatars.discourse-cdn.com/v4/letter/c/57b2e6/32.png) [@Clark\_Gilbert](https://community.zeek.org/u/Clark_Gilbert)
#### Post date: [November 19, 2011, 9:13pm UTC](https://community.zeek.org/t/cmake-google-perftools-cpuprofiler/2110/2 "2011-11-19T21:13:44Z")

</div>

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](https://community.zeek.org/uploads/short-url/1CNKzkjRkE0cBTfttQVaLYiLwDv.patch) (357 Bytes)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)
#### Post date: [May 6, 2022, 3:39pm UTC](https://community.zeek.org/t/cmake-google-perftools-cpuprofiler/2110/3 "2022-05-06T15:39:59Z")

</div>


