Chromium Code Reviews| Index: base/allocator/debugallocation_shim.cc |
| diff --git a/base/allocator/debugallocation_shim.cc b/base/allocator/debugallocation_shim.cc |
| index d1cf52a23ea9f181fa92d3880837b8e2fd1c784f..0345293f4193edb2d453525c3603b72ad47d641f 100644 |
| --- a/base/allocator/debugallocation_shim.cc |
| +++ b/base/allocator/debugallocation_shim.cc |
| @@ -2,6 +2,15 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +// Workaround for crosbug:629593. Using AFDO on the tcmalloc files is |
| +// causing problems. The tcmalloc files depend on stack layouts and |
| +// AFDO can mess with them. Better not to use AFDO there. This is a |
| +// temporary hack. We will add a mechanism in the build system to |
| +// avoid using -fauto-profile for tcmalloc files. |
| +#if ((__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4) |
|
Nico
2016/08/01 21:47:29
I think you can just do `#if !defined(__clang__)`
|
| +#pragma GCC optimize ("no-auto-profile") |
| +#endif |
| + |
| #if defined(TCMALLOC_FOR_DEBUGALLOCATION) |
| #include "third_party/tcmalloc/chromium/src/debugallocation.cc" |
| #else |