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

Issue 7134007: Added command line switches "crash-on-hang-threads" and "crash-on-hang-seconds" (Closed)

Created:
9 years, 6 months ago by ramant (doing other things)
Modified:
9 years, 6 months ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Added command line switches "crash-on-hang-threads" and"crash-on-hang-seconds" for crashing the browser whenthreads specified in "crash-on-hang-threads" don't respondfor "crash-on-hang-seconds".TEST=thread watcher unit testsBUG=85282 R=jar Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89630

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 28

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Total comments: 12

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Patch Set 22 : '' #

Patch Set 23 : '' #

Patch Set 24 : '' #

Patch Set 25 : '' #

Patch Set 26 : '' #

Patch Set 27 : '' #

Patch Set 28 : '' #

Patch Set 29 : '' #

Patch Set 30 : '' #

Patch Set 31 : '' #

Patch Set 32 : '' #

Patch Set 33 : '' #

Total comments: 14

Patch Set 34 : '' #

Patch Set 35 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+579 lines, -254 lines) Patch
M chrome/browser/browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +1 line, -6 lines 0 comments Download
M chrome/browser/metrics/thread_watcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 9 chunks +188 lines, -91 lines 0 comments Download
M chrome/browser/metrics/thread_watcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 9 chunks +273 lines, -149 lines 0 comments Download
M chrome/browser/metrics/thread_watcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 5 chunks +93 lines, -8 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
ramant (doing other things)
Hi Jim, Implemented what we had talked about the "crash-on-hang-threads" and "crash-on-hang-seconds" command line switches ...
9 years, 6 months ago (2011-06-09 20:15:49 UTC) #1
jar (doing other things)
A few nits, and a few comments about tiny refactoring. http://codereview.chromium.org/7134007/diff/1011/chrome/browser/metrics/thread_watcher.cc File chrome/browser/metrics/thread_watcher.cc (right): http://codereview.chromium.org/7134007/diff/1011/chrome/browser/metrics/thread_watcher.cc#newcode249 ...
9 years, 6 months ago (2011-06-10 00:38:33 UTC) #2
ramant (doing other things)
Hi Jim, Made the changes we had discussed. Would appreciate if you could take a ...
9 years, 6 months ago (2011-06-13 03:26:02 UTC) #3
jar (doing other things)
http://codereview.chromium.org/7134007/diff/4019/chrome/browser/metrics/thread_watcher.cc File chrome/browser/metrics/thread_watcher.cc (right): http://codereview.chromium.org/7134007/diff/4019/chrome/browser/metrics/thread_watcher.cc#newcode287 chrome/browser/metrics/thread_watcher.cc:287: // number of other threads responding is equal to ...
9 years, 6 months ago (2011-06-14 00:56:27 UTC) #4
ramant (doing other things)
Hi Jim, Removed the locking in ThreadWatcherList by making all the code that accesses the ...
9 years, 6 months ago (2011-06-16 22:26:45 UTC) #5
jar (doing other things)
LGTM Just a few style nits. http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thread_watcher.cc File chrome/browser/metrics/thread_watcher.cc (right): http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thread_watcher.cc#newcode297 chrome/browser/metrics/thread_watcher.cc:297: CHECK(crash+thread_id_); style nit: ...
9 years, 6 months ago (2011-06-18 15:04:16 UTC) #6
ramant (doing other things)
9 years, 6 months ago (2011-06-19 21:18:16 UTC) #7
Hi Jim,
  Made all the changes you had suggested.

thanks,
raman

http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thre...
File chrome/browser/metrics/thread_watcher.cc (right):

http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thre...
chrome/browser/metrics/thread_watcher.cc:297: CHECK(crash+thread_id_);
On 2011/06/18 15:04:16, jar wrote:
> style nit: spaces around binary operator "+"

Done.

http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thre...
chrome/browser/metrics/thread_watcher.cc:303: bool
ThreadWatcher::CrashOnUnresponsiveness() {
On 2011/06/18 15:04:16, jar wrote:
> nit: The function name almost suggests this function does the crashing. 
Better
> may be:
> 
> IsVeryUnresponsive()
> 
> The "Very" will hint at "beyond a threshold"

Done.

http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thre...
chrome/browser/metrics/thread_watcher.cc:522:
g_thread_watcher_list_->registered_.erase(it->first);
On 2011/06/18 15:04:16, jar wrote:
> nit: Not a big deal for perf here.... but you might be able to just do:
> erase(it)
> rather than
> erase(it->first)

Done.

http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thre...
chrome/browser/metrics/thread_watcher.cc:582: need_to_awaken = true;
On 2011/06/18 15:04:16, jar wrote:
> nit: Early return would make this cleaner.  You won't need the bool.
> if (now - last_wakeup_time_ < wakeup_interval)
>   return;

Done.

http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thre...
File chrome/browser/metrics/thread_watcher.h (right):

http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thre...
chrome/browser/metrics/thread_watcher.h:30: //   want to crash the browser
because of hung watched thread.
On 2011/06/18 15:04:16, jar wrote:
> nit: You used "watched thread" on line 30 and 27, but used IO thread on lines
22
> and 26.  I'm a little wary that this can be confusing.  Perhaps you should
> instead consistently (lines 22-30) use the phrase:
> 
> watched (IO) thread
> 

Done.

http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thre...
File chrome/browser/metrics/thread_watcher_unittest.cc (right):

http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thre...
chrome/browser/metrics/thread_watcher_unittest.cc:5: #include <math.h>  // ceil
On 2011/06/18 15:04:16, jar wrote:
> nit: I'm not used to seeing mention of the function you used.  I'd either
> suggest removing the comment, or making it style compliant using a short
> sentence with a period at the end.

Done.

http://codereview.chromium.org/7134007/diff/17026/chrome/browser/metrics/thre...
chrome/browser/metrics/thread_watcher_unittest.cc:249: ThreadWatcherTest() :
setup_complete_(&lock_),
On 2011/06/18 15:04:16, jar wrote:
> style nit: I think you have to put the initializers on one line, or else wrap
> the : and indent it 4 spaces, and then align initializers undre that.

Done.

Powered by Google App Engine
This is Rietveld 408576698