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

Unified Diff: chrome/browser/metrics/thread_watcher.cc

Issue 10827026: Use NOINLINE for thread watcher and browser thread identifier (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/browser_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/thread_watcher.cc
===================================================================
--- chrome/browser/metrics/thread_watcher.cc (revision 147800)
+++ chrome/browser/metrics/thread_watcher.cc (working copy)
@@ -34,51 +34,47 @@
// merge them all together.
// TODO(eroman): What is the equivalent for other compilers?
eroman 2012/07/26 00:25:02 While you are here, can you remove this comment?
ramant (doing other things) 2012/07/26 00:28:41 Done.
-#if defined(COMPILER_MSVC)
-#pragma optimize("", off)
+MSVC_DISABLE_OPTIMIZE()
MSVC_PUSH_DISABLE_WARNING(4748)
-#endif
int* NullPointer() {
return reinterpret_cast<int*>(NULL);
}
-void ThreadUnresponsive_UI() {
+NOINLINE void ThreadUnresponsive_UI() {
*NullPointer() = __LINE__;
}
-void ThreadUnresponsive_DB() {
+NOINLINE void ThreadUnresponsive_DB() {
*NullPointer() = __LINE__;
}
-void ThreadUnresponsive_WEBKIT() {
+NOINLINE void ThreadUnresponsive_WEBKIT() {
*NullPointer() = __LINE__;
}
-void ThreadUnresponsive_FILE() {
+NOINLINE void ThreadUnresponsive_FILE() {
*NullPointer() = __LINE__;
}
-void ThreadUnresponsive_FILE_USER_BLOCKING() {
+NOINLINE void ThreadUnresponsive_FILE_USER_BLOCKING() {
*NullPointer() = __LINE__;
}
-void ThreadUnresponsive_PROCESS_LAUNCHER() {
+NOINLINE void ThreadUnresponsive_PROCESS_LAUNCHER() {
*NullPointer() = __LINE__;
}
-void ThreadUnresponsive_CACHE() {
+NOINLINE void ThreadUnresponsive_CACHE() {
*NullPointer() = __LINE__;
}
-void ThreadUnresponsive_IO() {
+NOINLINE void ThreadUnresponsive_IO() {
*NullPointer() = __LINE__;
}
-#if defined(COMPILER_MSVC)
MSVC_POP_WARNING()
-#pragma optimize("", on)
-#endif
+MSVC_ENABLE_OPTIMIZE();
void CrashBecauseThreadWasUnresponsive(BrowserThread::ID thread_id) {
base::debug::Alias(&thread_id);
« no previous file with comments | « no previous file | content/browser/browser_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698