[SERVER-13544] Backport upstream patches to gperftools to support tcmalloc in C++11 Created: 10/Apr/14 Updated: 11/Jul/16 Resolved: 14/Apr/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andy Schwerin | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
The vendored version of gperftools does not support C++11, nor does the currently released version of gperftools (2.1). This ticket is to apply the upstream gperftools patches needed for C++11 support to the vendored version of the library, as a stop-gap until gperftools 2.2 is released. |
| Comments |
| Comment by Githook User [ 14/Apr/14 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: The following change was backported: Another change we wanted was: However, since that patch must hit every PR/SC instance and the code has evolved from that point find . -type f | xargs egrep -l '"PR\w+"' | xargs perl -pi -e 's|"PR(\w+)"|" PR\1 "|g' and then manually fixing up the one reference to GPRIuPTHREAD, which achieved the same result. Finally, remove the logic preventing mixture of C++11 and gperftools from the build system. |
| Comment by Andrew Morrow (Inactive) [ 12/Apr/14 ] |
|
Looking at the relevant changes, I don't think we can just cherry-pick the format string change because the change needs to be systemic and hit all SC/PR usages: https://code.google.com/p/gperftools/source/detail?r=6287bbbbad8730712cfd1ee28ecc0648cbaa9f94# I think we should just run the following over the tcmalloc code in our tree: find . -type f | xargs egrep -l '"PR\w+"' | xargs perl -pi -e 's|"PR(\w+)"|" PR\1 "|g' find . -type f | xargs egrep -l '"SC\w+"' | xargs perl -pi -e 's|"SC(\w+)"|" SC\1 "|g' The other change we want is trivial: 18fbc316eebea9db2d7ec41e161c0a3fbb09fa42 and we can just take. Hopefully they will release a gperftools-2.2 during 2.8 dev and we can just bump to that but in the meantime lets make these easy change. |