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

Side by Side Diff: chrome/browser/metrics/thread_watcher.cc

Issue 588373002: Increase ThreadWatcher unresponsive threashold to 72 secs in dev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« 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) 2012 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/metrics/thread_watcher.h" 5 #include "chrome/browser/metrics/thread_watcher.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 DCHECK(this == g_thread_watcher_list_); 527 DCHECK(this == g_thread_watcher_list_);
528 g_thread_watcher_list_ = NULL; 528 g_thread_watcher_list_ = NULL;
529 } 529 }
530 530
531 // static 531 // static
532 void ThreadWatcherList::ParseCommandLine( 532 void ThreadWatcherList::ParseCommandLine(
533 const CommandLine& command_line, 533 const CommandLine& command_line,
534 uint32* unresponsive_threshold, 534 uint32* unresponsive_threshold,
535 CrashOnHangThreadMap* crash_on_hang_threads) { 535 CrashOnHangThreadMap* crash_on_hang_threads) {
536 // Initialize |unresponsive_threshold| to a default value. 536 // Initialize |unresponsive_threshold| to a default value.
537 *unresponsive_threshold = kUnresponsiveCount; 537 // TODO(rtenneti): Changed the default value to 4 times, until we can triage
538 // hangs automatically (and to reduce the crash dumps).
539 *unresponsive_threshold = kUnresponsiveCount * 4;
538 540
539 // Increase the unresponsive_threshold on the Stable and Beta channels to 541 // Increase the unresponsive_threshold on the Stable and Beta channels to
540 // reduce the number of crashes due to ThreadWatcher. 542 // reduce the number of crashes due to ThreadWatcher.
541 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); 543 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
542 if (channel == chrome::VersionInfo::CHANNEL_STABLE) { 544 if (channel == chrome::VersionInfo::CHANNEL_STABLE) {
543 *unresponsive_threshold *= 4; 545 *unresponsive_threshold *= 4;
544 } else if (channel == chrome::VersionInfo::CHANNEL_BETA) { 546 } else if (channel == chrome::VersionInfo::CHANNEL_BETA) {
545 *unresponsive_threshold *= 2; 547 *unresponsive_threshold *= 2;
546 } 548 }
547 549
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 1077
1076 #if defined(OS_WIN) 1078 #if defined(OS_WIN)
1077 // On Windows XP, give twice the time for shutdown. 1079 // On Windows XP, give twice the time for shutdown.
1078 if (base::win::GetVersion() <= base::win::VERSION_XP) 1080 if (base::win::GetVersion() <= base::win::VERSION_XP)
1079 actual_duration *= 2; 1081 actual_duration *= 2;
1080 #endif 1082 #endif
1081 1083
1082 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration); 1084 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration);
1083 shutdown_watchdog_->Arm(); 1085 shutdown_watchdog_->Arm();
1084 } 1086 }
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