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


CrOS-Libchrome-Original-Commit: 5fcce3f791f0f703c56179ddd351c2dc6e7c4926
2 files changed
tree: 33a78bcacd20997540eeb12217a2880d2c3e05a7
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. ipc/
  6. mojo/
  7. testing/
  8. third_party/
  9. ui/