[email protected] | c4e135d | 2012-12-04 22:28:04 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
llozano | a6f6423 | 2016-08-01 22:39:55 | [diff] [blame] | 5 | // Workaround for crosbug:629593. Using AFDO on the tcmalloc files is |
| 6 | // causing problems. The tcmalloc files depend on stack layouts and |
| 7 | // AFDO can mess with them. Better not to use AFDO there. This is a |
| 8 | // temporary hack. We will add a mechanism in the build system to |
| 9 | // avoid using -fauto-profile for tcmalloc files. |
mostynb | 2af5a28 | 2016-08-16 16:57:03 | [diff] [blame] | 10 | #if !defined(__clang__) && (defined(OS_CHROMEOS) || __GNUC__ > 5) |
| 11 | // Note that this option only seems to be available in the chromeos GCC 4.9 |
| 12 | // toolchain, and stock GCC 5 and up. |
llozano | a6f6423 | 2016-08-01 22:39:55 | [diff] [blame] | 13 | #pragma GCC optimize ("no-auto-profile") |
| 14 | #endif |
| 15 | |
[email protected] | c4e135d | 2012-12-04 22:28:04 | [diff] [blame] | 16 | #if defined(TCMALLOC_FOR_DEBUGALLOCATION) |
| 17 | #include "third_party/tcmalloc/chromium/src/debugallocation.cc" |
| 18 | #else |
| 19 | #include "third_party/tcmalloc/chromium/src/tcmalloc.cc" |
| 20 | #endif |