[SERVER-6758] cpu profiler doesn't work with embedded tcmalloc Created: 13/Aug/12 Updated: 11/Jul/16 Resolved: 27/Nov/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 2.3.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
Either --use-cpu-profiler should imply --use-system-tcmalloc or it should use the embedded copy of gperftools, and possibly build a copy of pprof. |
| Comments |
| Comment by Githook User [ 21/May/14 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: config-10gen_macos.h:
config-10gen_linux.h:
SCons --use-cpu-profiler changes:
|
| Comment by Eliot Horowitz (Inactive) [ 27/Nov/12 ] |
|
Note, this does require libunwind installed on system. |
| Comment by auto [ 27/Nov/12 ] |
|
Author: {u'date': u'2012-11-27T19:26:07Z', u'email': u'eliot@10gen.com', u'name': u'Eliot Horowitz'}Message: |
| Comment by John Hinsdale [ 24/Oct/12 ] |
|
Not sure there is a 100% hard dependency on libunwind to use the profiler, at least the CPU profiler. FWIW, I was able to build mongo from source (on x86_64) with "- Perhaps mongo distros that bundle gperftools could set all the flags to work in harmony for the different packages' compiles, based on the detected presence/absence (and/or explicitly directed use/nonuse) of libunwind. The gperftools docs seem to imply that all these unwind issues relate only to the profilers and not to tcmalloc, but I may have misread that. I imagine there is a very big "YMMV" for all this |
| Comment by Andy Schwerin [ 14/Aug/12 ] |
|
FYI, pprof is a script (python or perl), so we just need to drop it in the source tree if we go this route. The profilers imply a dependency on libunwind, which is why we didn't build support for them into the tcmalloc we link by default. Extending the build system to be able to build the tcmalloc version with profiling support seems like a reasonable approach. |