diff options
author | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-05 20:07:26 +0000 |
---|---|---|
committer | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-05 20:07:26 +0000 |
commit | 5fcce3f791f0f703c56179ddd351c2dc6e7c4926 (patch) | |
tree | daaaae965ba14650bb3a654d20079ab89a9065e2 /remoting | |
parent | ac90e05b7ba311cb3624787758390930c732b59c (diff) | |
download | chromium_src-5fcce3f791f0f703c56179ddd351c2dc6e7c4926.zip chromium_src-5fcce3f791f0f703c56179ddd351c2dc6e7c4926.tar.gz chromium_src-5fcce3f791f0f703c56179ddd351c2dc6e7c4926.tar.bz2 |
Add use_allocator instead of linux_use_tcmalloc to switch the allocator.
This change is to add a new build option 'use_allocator' which will
replace 'linux_use_tcmalloc' in the future. It doesn't change the
behavior immediately. The migration plan is as follows:
1) (this change)
... Add 'use_allocator' and set its default to "see_use_tcmalloc".
... Change allocator conditions to check use_allocator firstly.
... Use linux_use_tcmalloc if use_allocator=="see_use_tcmalloc".
... NO IMPACT without specifying use_allocator explicitly.
2) Change Blink to accept use_allocator. http://crrev.com/177053003/
3) Change gyp to accept use_allocator. http://crrev.com/178643004/
4) PSA the transition period to chromium-dev@.
5) (after the PSA-ed transition period)
... Make 'use_allocator' to "tcmalloc" or "none" (it depends) by default.
... Remove all linux_use_tcmalloc.
... Assert in gyp_chromium to check if linux_use_tcmalloc is not specified.
At the point of this change (1), linux_use_tcmalloc is still used by default
because 'use_allocator%': "see_use_tcmalloc".
As written in http://crbug.com/345554, linux_use_tcmalloc would
be confusing to have more options about allocators. We plan to:
A) enable gperftools' heap-profiler with non-tcmalloc allocator,
B) add a new memory allocator instead of tcmalloc.
BUG=345554, 339604, 341349
R=agl@chromium.org, brettw@chromium.org, dgarrett@chromium.org, jam@chromium.org, jamesr@chromium.org, joi@chromium.org, miket@chromium.org, nick@chromium.org, rsleevi@chromium.org, scherkus@chromium.org, sergeyu@chromium.org, shess@chromium.org, sievers@chromium.org, sky@chromium.org, vitalybuka@chromium.org, willchan@chromium.org
Review URL: https://codereview.chromium.org/177353002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255129 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/remoting_host.gypi | 9 | ||||
-rw-r--r-- | remoting/remoting_host_linux.gypi | 3 | ||||
-rw-r--r-- | remoting/remoting_test.gypi | 3 |
3 files changed, 10 insertions, 5 deletions
diff --git a/remoting/remoting_host.gypi b/remoting/remoting_host.gypi index 3a02439..40b00c9 100644 --- a/remoting/remoting_host.gypi +++ b/remoting/remoting_host.gypi @@ -743,7 +743,8 @@ }], # mac_breakpad==1 ], # conditions }], # OS=mac - ['OS=="linux" and linux_use_tcmalloc==1', { + # 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))', { 'dependencies': [ '../base/allocator/allocator.gyp:allocator', ], @@ -769,7 +770,8 @@ 'host/setup/me2me_native_messaging_host_main.h', ], 'conditions': [ - ['OS=="linux" and linux_use_tcmalloc==1', { + # 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))', { 'dependencies': [ '../base/allocator/allocator.gyp:allocator', ], @@ -801,7 +803,8 @@ '../build/linux/system.gyp:gtk', ], }], - ['OS=="linux" and linux_use_tcmalloc==1', { + # 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))', { 'dependencies': [ '../base/allocator/allocator.gyp:allocator', ], diff --git a/remoting/remoting_host_linux.gypi b/remoting/remoting_host_linux.gypi index 6f01138..e27faf8 100644 --- a/remoting/remoting_host_linux.gypi +++ b/remoting/remoting_host_linux.gypi @@ -127,7 +127,8 @@ 'host/setup/start_host.cc', ], 'conditions': [ - ['linux_use_tcmalloc==1', { + # 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)', { 'dependencies': [ '../base/allocator/allocator.gyp:allocator', ], diff --git a/remoting/remoting_test.gypi b/remoting/remoting_test.gypi index 2ef35a4a..45860e8 100644 --- a/remoting/remoting_test.gypi +++ b/remoting/remoting_test.gypi @@ -229,7 +229,8 @@ ['exclude', '^base/resources_unittest\\.cc$'], ] }], - [ 'OS == "linux" and linux_use_tcmalloc==1', { + # 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))', { 'dependencies': [ '../base/allocator/allocator.gyp:allocator', ], |