Reland of Enable allocator shim for Android (crrev.com/1875043003)

Reason for reland:
The original CL was reverted by crrev.com/1881523003 because it broke
clang builds. This CL contains the fix for clang (see diff between
patch-set 1 and 2).
The culprit of the fix is that LLVM libc++ uses _NOEXCEPT instead
of glibc's __THROW. The absence of it was causing errors like the
following:

../../base/allocator/allocator_shim_override_cpp_symbols.h:20:25: error: function previously declared with an explicit exception specification redeclared with an implicit exception specification [-Werror,-Wimplicit-exception-spec-mismatch]
SHIM_ALWAYS_EXPORT void operator delete(void* p) __THROW

Original issue's description:
> Enable allocator shim for Android
>
> This is a follow-up to crrev.com/1719433002, which introduced the
> shim for Android, and enables it by default by setting
> use_experimental_allocator_shim=true for Android.
>
> Build/Perf sheriffs heads up
> ----------------------------
> If you see any build error or crash related with __wrap_malloc,
> __wrap_free, __real_malloc, __real_free, etc this CL is to blame.
>
> Performance considerations
> ------------------------
> Binary size diff (GN, arm, static, official build): 24k
>
> I did a mixture of local and trybots run to estimate the perf impact
> of this change. Didn't get any conclusive data, everything I tried
> seems in the same ballpark, below noise levels. More in details:
>
> cc_perftests.PrepareTiles on a Nexus 4.
> Rationale of the choice: in a previous CL (crbug.com/593344), this
> benchmark revealed the presence of two mfences in the malloc path.
> Results: https://goo.gl/8VC3Jp in the same ballpark.
>
> page-cycler on Nexus 9 via trybots:
> Results: http://goo.gl/J3i50a seems to suggest that this CL improves
> both warm and cold times in most cases. I doubt it, more likely it's
> noise.
>
> All the other perf trybots failed. The perf waterfall seems to be in a
> bad state in these days.
>
> BUG=550886,598075
> TEST=base_unittests --gtest_filter=AllocatorShimTest.*
> TBR=thakis@chromium.org
>
> Committed: https://crrev.com/ebb95496c73dc0d5ce83968ac619921f154305f7
> Cr-Commit-Position: refs/heads/master@{#386386}

BUG=550886,598075
CC=dalecurtis@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#386444}


CrOS-Libchrome-Original-Commit: 88bf797383cd290d9bd23db0045c5fb23e010beb
1 file changed
tree: ece4831a13f26869c4d5614113ca015ec8517d9f
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/