Skip to content

Commit

Permalink
SERVER-56290 Upgrade gperftools to 2.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
acmorrow authored and Evergreen Agent committed Jul 21, 2021
1 parent 958e563 commit 106d971
Show file tree
Hide file tree
Showing 321 changed files with 25,081 additions and 19,450 deletions.
2 changes: 1 addition & 1 deletion README.third_party.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ a notice will be included in
| [benchmark] | Apache-2.0 | 1.5.2 | 1.5.2 | | |
| [Boost] | BSL-1.0 | 1.76.0 | 1.76.0 | ||
| [fmt] | BSD-2-Clause | 7.1.3 | 7.1.3 | ||
| [GPerfTools] | BSD-3-Clause | 2.8 | 2.8 | ||
| [GPerfTools] | BSD-3-Clause | 2.9.1 | 2.9.1 | ||
| [ICU4] | ICU | 67.1 | 57.1 |||
| [Intel Decimal FP Library] | BSD-3-Clause | 2.0 Update 2 | 2.0 Update 1 | ||
| [JSON-Schema-Test-Suite] | MIT | | 728066f9c5 | | |
Expand Down
1 change: 1 addition & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -5224,6 +5224,7 @@ Export([
'http_client',
'module_sconscripts',
'optBuild',
'selected_experimental_optimizations',
'serverJs',
'ssl_provider',
'use_libunwind',
Expand Down
29 changes: 28 additions & 1 deletion src/third_party/gperftools/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,45 @@ Import("env")
Import("has_option")
Import("use_libunwind")
Import("debugBuild")
Import("selected_experimental_optimizations")

env = env.Clone(
# Building with hidden visibility interferes with intercepting the
# libc allocation functions.
DISALLOW_VISHIDDEN=True,
)

# If we don't have a frame pointer, we need to tell tcmalloc so that
# it doesn't try to select a frame pointer based unwinder like
# generic_fp. For debugBuilds, we also don't want the generic_fp or
# libunwind based unwinders because they are currently too slow. We
# will still fall back to libunwind if it is present and no better
# option is available. Note that defining
# TCMALLOC_DONT_PREFER_LIBUNWIND has real effects even if libunwind
# isn't in play. Specifically, it enables the architecture specific
# implementations for x86 and ppc.
#
# Please see the following gperftools issues for ongoing discussion:
#
# https://github.com/gperftools/gperftools/issues/1276
# https://github.com/gperftools/gperftools/issues/1277
# https://github.com/gperftools/gperftools/issues/1278
#

fp = 'nofp' not in selected_experimental_optimizations
if not fp or debugBuild:
env.Append(
CPPDEFINES=[
'NO_FRAME_POINTER',
'TCMALLOC_DONT_PREFER_LIBUNWIND' if debugBuild else None,
],
)

if use_libunwind:
env.Append(
CPPDEFINES=[
("HAVE_LIBUNWIND_H", "1"),
'HAVE_UCONTEXT_H'
'HAVE_UCONTEXT_H',
],
)
env.InjectThirdParty(libraries=['unwind'])
Expand Down
Loading

0 comments on commit 106d971

Please sign in to comment.