Skip to content

Commit

Permalink
Remove {linux|android}_use_tcmalloc and switch to use_allocator in Ch…
Browse files Browse the repository at this point in the history
…romium.

If this change breaks some bots, please try restarting the 
bot before reverting it. http://crrev.com/264460 may not be 
effective yet until restarting.

See the bug and http://crrev.com/255129 for the details.

BUG=345554

Review URL: https://codereview.chromium.org/258433005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268876 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
dmikurube@chromium.org committed May 7, 2014
1 parent 8c550bd commit 2fa89ef
Show file tree
Hide file tree
Showing 44 changed files with 72 additions and 135 deletions.
3 changes: 1 addition & 2 deletions ash/ash.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,8 +1063,7 @@
['exclude', 'display/resolution_notification_controller_unittest.cc'],
],
}],
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['OS=="linux" and component=="shared_library" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
'dependencies': [
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
],
Expand Down
6 changes: 2 additions & 4 deletions base/base.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@
],
},
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['use_allocator!="tcmalloc" and (use_allocator!="see_use_tcmalloc" or linux_use_tcmalloc==0)', {
['use_allocator!="tcmalloc"', {
'defines': [
'NO_TCMALLOC',
],
Expand Down Expand Up @@ -700,8 +699,7 @@
'message_loop/message_pump_glib_unittest.cc',
]
}],
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['OS == "linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
['OS == "linux" and use_allocator!="none"', {
'dependencies': [
'allocator/allocator.gyp:allocator',
],
Expand Down
37 changes: 8 additions & 29 deletions build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -820,10 +820,7 @@

['OS=="linux" and target_arch=="arm" and chromeos==0', {
# Set some defaults for arm/linux chrome builds
# TODO(dmikurube): Change the default of use_allocator to "none".
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
'linux_use_tcmalloc%': 0,
'use_allocator%': 'see_use_tcmalloc',
'use_allocator%': 'none',
# sysroot needs to be an absolute path otherwise it generates
# incorrect results when passed to pkg-config
'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
Expand Down Expand Up @@ -1222,15 +1219,8 @@
'binutils_dir%': '',

# Enable TCMalloc.
# TODO(dmikurube): Change Linux default of use_allocator to "tcmalloc".
# TODO(dmikurube): Change Android default of use_allocator to "none".
# TODO(dmikurube): Kill {linux|android}_use_tcmalloc. http://crbug.com/345554
# {linux|android}_use_tcmalloc are to be replaced with use_allocator.
# They are now used only if use_allocator=="see_use_tcmalloc" (default).
# TODO(dmikurube): Assert when {linux|android}_use_tcmalloc is explicitly specified.
'linux_use_tcmalloc%': 1,
'android_use_tcmalloc%': 0,
'use_allocator%': 'see_use_tcmalloc',
# Default of 'use_allocator' is set to 'none' if OS=='android' later.
'use_allocator%': 'tcmalloc',

# Set to 1 to link against libgnome-keyring instead of using dlopen().
'linux_link_gnome_keyring%': 0,
Expand Down Expand Up @@ -1460,10 +1450,7 @@
'werror%': '',
'disable_nacl%': 1,
'nacl_untrusted_build%': 0,
# TODO(dmikurube): Change the default of use_allocator to "none".
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
'linux_use_tcmalloc%': 0,
'use_allocator%': 'see_use_tcmalloc',
'use_allocator%': 'none',
}],
['OS=="linux" and target_arch=="mipsel"', {
'sysroot%': '<(sysroot)',
Expand Down Expand Up @@ -1650,10 +1637,7 @@
'input_speech%': 0,
'java_bridge%': 1,
'build_ffmpegsumo%': 0,
# TODO(dmikurube): Change the default of use_allocator to "none".
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
'linux_use_tcmalloc%': 0,
'use_allocator%': 'see_use_tcmalloc',
'use_allocator%': 'none',

# Disable Native Client.
'disable_nacl%': 1,
Expand Down Expand Up @@ -2043,10 +2027,7 @@
'win_release_InlineFunctionExpansion': '0',
'win_release_OmitFramePointers': '0',

# TODO(dmikurube): Change the default of use_allocator to "tcmalloc".
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
'linux_use_tcmalloc%': 1,
'use_allocator': 'see_use_tcmalloc',
'use_allocator': 'tcmalloc',
'release_valgrind_build': 1,
'werror': '',
'component': 'static_library',
Expand Down Expand Up @@ -2299,8 +2280,7 @@
'<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
],
}],
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)) and clang_type_profiler==1', {
['OS=="linux" and use_allocator!="none" and clang_type_profiler==1', {
'cflags_cc!': ['-fno-rtti'],
'cflags_cc+': [
'-frtti',
Expand Down Expand Up @@ -3865,8 +3845,7 @@
}],
],
}],
# TODO(dmikurube): Kill {linux|android}_use_tcmalloc. http://crbug.com/345554
['use_allocator!="tcmalloc" and (use_allocator!="see_use_tcmalloc" or ((OS=="linux" and linux_use_tcmalloc==0) or (OS=="android" and android_use_tcmalloc==0)))', {
['use_allocator!="tcmalloc"', {
'defines': ['NO_TCMALLOC'],
}],
['linux_use_gold_flags==1', {
Expand Down
11 changes: 11 additions & 0 deletions build/gyp_chromium
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,17 @@ if __name__ == '__main__':
supplemental_includes = GetSupplementalFiles()
gyp_vars_dict = GetGypVars(supplemental_includes)

# TODO(dmikurube): Remove these checks and messages after a while.
if ('linux_use_tcmalloc' in gyp_vars_dict or
'android_use_tcmalloc' in gyp_vars_dict):
print '*****************************************************************'
print '"linux_use_tcmalloc" and "android_use_tcmalloc" are deprecated!'
print '-----------------------------------------------------------------'
print 'You specify "linux_use_tcmalloc" or "android_use_tcmalloc" in'
print 'your GYP_DEFINES. Please switch them into "use_allocator" now.'
print 'See http://crbug.com/345554 for the details.'
print '*****************************************************************'

# Automatically turn on crosscompile support for platforms that need it.
# (The Chrome OS build sets CC_host / CC_target which implicitly enables
# this mode.)
Expand Down
6 changes: 2 additions & 4 deletions cc/cc_tests.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@
[ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"',
{
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
[ '(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)',
[ 'use_allocator!="none"',
{
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
Expand Down Expand Up @@ -328,8 +327,7 @@
}
],
# See http://crbug.com/162998#c4 for why this is needed.
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))',
['OS=="linux" and use_allocator!="none"',
{
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
Expand Down
3 changes: 1 addition & 2 deletions chrome/chrome_android.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
}],
],
}],
# TODO(dmikurube): Kill android_use_tcmalloc. http://crbug.com/345554
[ '(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and android_use_tcmalloc==1)', {
[ 'use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator', ],
}],
Expand Down
3 changes: 1 addition & 2 deletions chrome/chrome_exe.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@
},
],
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'<(allocator_target)',
],
Expand Down
9 changes: 3 additions & 6 deletions chrome/chrome_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -1875,8 +1875,7 @@
}],
['os_posix == 1 and OS != "mac" and OS != "android"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down Expand Up @@ -2148,8 +2147,7 @@
}],
['os_posix == 1 and OS != "mac" and OS != "android"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down Expand Up @@ -2659,8 +2657,7 @@
}],
['os_posix == 1 and OS != "mac" and OS != "android"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
3 changes: 1 addition & 2 deletions chrome/chrome_tests_unit.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -2349,8 +2349,7 @@
}],
['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
3 changes: 1 addition & 2 deletions chromeos/chromeos.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,7 @@
'..',
],
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
[ '(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
[ 'use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
3 changes: 1 addition & 2 deletions cloud_print/cloud_print.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
],
}],
# See http://crbug.com/162998#c4 for why this is needed.
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
['OS=="linux" and use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
3 changes: 1 addition & 2 deletions components/components_tests.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,7 @@
'../base/allocator/allocator.gyp:allocator',
],
}],
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['OS=="linux" and component=="shared_library" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
'dependencies': [
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
],
Expand Down
3 changes: 1 addition & 2 deletions components/nacl.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@
}],
['os_posix == 1 and OS != "mac"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
3 changes: 1 addition & 2 deletions content/content_app.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
'public/app/startup_helper_win.h',
],
'conditions': [
# TODO(dmikurube): Kill {linux|android}_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and ((OS=="linux" and os_posix==1 and use_aura==1 and linux_use_tcmalloc==1) or (OS=="android" and android_use_tcmalloc==1)))', {
['((OS=="linux" and os_posix==1 and use_aura==1) or OS=="android") and use_allocator!="none"', {
'dependencies': [
# This is needed by app/content_main_runner.cc
'../base/allocator/allocator.gyp:allocator',
Expand Down
3 changes: 1 addition & 2 deletions content/content_shell.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,7 @@
'../components/components.gyp:breakpad_host',
],
}],
# TODO(dmikurube): Kill {linux|android}_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and ((OS=="linux" and linux_use_tcmalloc==1) or (OS=="android" and android_use_tcmalloc==1)))', {
['(OS=="linux" or OS=="android") and use_allocator!="none"', {
'dependencies': [
# This is needed by content/app/content_main_runner.cc
'../base/allocator/allocator.gyp:allocator',
Expand Down
3 changes: 1 addition & 2 deletions content/content_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -1411,10 +1411,9 @@
'<(angle_path)/src/build_angle.gyp:libGLESv2',
],
}],
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(OS=="win" and win_use_allocator_shim==1) or '
'(os_posix == 1 and OS != "android" and '
' ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)))', {
' use_allocator!="none")', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
3 changes: 1 addition & 2 deletions courgette/courgette.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@
'conditions': [
[ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
3 changes: 1 addition & 2 deletions crypto/crypto.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@
'conditions': [
[ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
[ '(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
[ 'use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
3 changes: 1 addition & 2 deletions device/device_tests.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
}],
['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
3 changes: 1 addition & 2 deletions gpu/gles2_conform_support/gles2_conform_support.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@
],
'conditions': [
# See http://crbug.com/162998#c4 for why this is needed.
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
['OS=="linux" and use_allocator!="none"', {
'dependencies': [
'../../base/allocator/allocator.gyp:allocator',
],
Expand Down
3 changes: 1 addition & 2 deletions gpu/gpu.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,7 @@
],
}],
# See http://crbug.com/162998#c4 for why this is needed.
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
['OS=="linux" and use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
6 changes: 2 additions & 4 deletions ipc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ if (!is_android) {

# TODO(brettw) hook up tcmalloc to this target.
#if (is_posix && !is_mac && !is_android) {
# # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
# if ((use_allocator!="none" && use_allocator!="see_use_tcmalloc") || (use_allocator=="see_use_tcmalloc" && linux_use_tcmalloc)) {
# if (use_allocator!="none") {
# deps += "/base/allocator"
# }
#}
Expand Down Expand Up @@ -145,8 +144,7 @@ if (!is_android) {

# TODO(brettw) hook up tcmalloc to this target.
#if (is_posix && !is_mac && !is_android) {
# # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
# if ((use_allocator!="none" && use_allocator!="see_use_tcmalloc") || (use_allocator=="see_use_tcmalloc" && linux_use_tcmalloc)) {
# if (use_allocator!="none") {
# deps += "//base/allocator"
# }
#}
Expand Down
6 changes: 2 additions & 4 deletions ipc/ipc.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@
}],
['os_posix == 1 and OS != "mac" and OS != "android"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down Expand Up @@ -113,8 +112,7 @@
}],
['os_posix == 1 and OS != "mac" and OS != "android"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
6 changes: 2 additions & 4 deletions media/media.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,7 @@
}],
['os_posix==1 and OS!="mac"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down Expand Up @@ -1699,8 +1698,7 @@
'conditions': [
['os_posix==1 and OS!="mac"', {
'conditions': [
# TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
['use_allocator!="none"', {
'dependencies': [
'../base/allocator/allocator.gyp:allocator',
],
Expand Down
Loading

0 comments on commit 2fa89ef

Please sign in to comment.