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

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

Issue 783423002: Revert of 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 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 // TODO(rtenneti): Changed the default value to 4 times, until we can triage 537 *unresponsive_threshold = kUnresponsiveCount;
538 // hangs automatically (and to reduce the crash dumps).
539 *unresponsive_threshold = kUnresponsiveCount * 4;
540 538
541 // Increase the unresponsive_threshold on the Stable and Beta channels to 539 // Increase the unresponsive_threshold on the Stable and Beta channels to
542 // reduce the number of crashes due to ThreadWatcher. 540 // reduce the number of crashes due to ThreadWatcher.
543 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); 541 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
544 if (channel == chrome::VersionInfo::CHANNEL_STABLE) { 542 if (channel == chrome::VersionInfo::CHANNEL_STABLE) {
545 *unresponsive_threshold *= 4; 543 *unresponsive_threshold *= 4;
546 } else if (channel == chrome::VersionInfo::CHANNEL_BETA) { 544 } else if (channel == chrome::VersionInfo::CHANNEL_BETA) {
547 *unresponsive_threshold *= 2; 545 *unresponsive_threshold *= 2;
548 } 546 }
549 547
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 1075
1078 #if defined(OS_WIN) 1076 #if defined(OS_WIN)
1079 // On Windows XP, give twice the time for shutdown. 1077 // On Windows XP, give twice the time for shutdown.
1080 if (base::win::GetVersion() <= base::win::VERSION_XP) 1078 if (base::win::GetVersion() <= base::win::VERSION_XP)
1081 actual_duration *= 2; 1079 actual_duration *= 2;
1082 #endif 1080 #endif
1083 1081
1084 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration); 1082 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration);
1085 shutdown_watchdog_->Arm(); 1083 shutdown_watchdog_->Arm();
1086 } 1084 }
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