Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: base/tracked.cc

Issue 7067004: Prevent MSVC from inlining GetProgramCounter for LTCG builds. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(COMPILER_MSVC) 7 #if defined(COMPILER_MSVC)
8 #include <intrin.h> 8 #include <intrin.h>
9 #endif 9 #endif
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 output->append("&gt;"); 61 output->append("&gt;");
62 break; 62 break;
63 63
64 default: 64 default:
65 output->push_back(*p); 65 output->push_back(*p);
66 break; 66 break;
67 } 67 }
68 } 68 }
69 } 69 }
70 70
71 #if defined(COMPILER_MSVC)
72 __declspec(noinline)
73 #endif
71 BASE_API const void* GetProgramCounter() { 74 BASE_API const void* GetProgramCounter() {
72 #if defined(COMPILER_MSVC) 75 #if defined(COMPILER_MSVC)
73 return _ReturnAddress(); 76 return _ReturnAddress();
74 #elif defined(COMPILER_GCC) 77 #elif defined(COMPILER_GCC)
75 return __builtin_extract_return_addr(__builtin_return_address(0)); 78 return __builtin_extract_return_addr(__builtin_return_address(0));
76 #endif // COMPILER_GCC 79 #endif // COMPILER_GCC
77 80
78 return NULL; 81 return NULL;
79 } 82 }
80 83
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 tracked_birth_time_ = TimeTicks::Now(); 137 tracked_birth_time_ = TimeTicks::Now();
135 } 138 }
136 139
137 bool Tracked::MissingBirthplace() const { 140 bool Tracked::MissingBirthplace() const {
138 return -1 == tracked_births_->location().line_number(); 141 return -1 == tracked_births_->location().line_number();
139 } 142 }
140 143
141 #endif // NDEBUG 144 #endif // NDEBUG
142 145
143 } // namespace tracked_objects 146 } // namespace tracked_objects
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698