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

Issue 3644007: Crash reporter: collect suspend and resume info from power manager (Closed)

Created:
10 years, 2 months ago by Simon Que
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

Collect suspend and resume info from power manager Updated the unclean shutdown collector to check and report the modification times of trace files left by power manager to indicate that the system was suspended and that it was running on low battery. These files are interpreted by the unclean shutdown collector to determine the cause of an unclean shutdown -- either the battery ran out during suspend or the battery ran out after resuming from a low battery-induced suspend and it continued to run on battery. BUG=chromium-os:1472 TEST=Let the battery run below the cutoff, suspend & resume, and then remove the battery to simulate running dry; check crash reporter logs. Alternatively/additionally, let it suspend and remove the battery while suspended. Restart and check crash reporter logs. Signed-off-by: Simon Que <sque@chromium.org>; Change-Id: I8e6767e8457afb7abf1e7300eac020adda1ebb48 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=2d2f2bb

Patch Set 1 #

Patch Set 2 : Cleanup of old files #

Total comments: 5

Patch Set 3 : Code cleanup, comments end with period, interpretation of events #

Total comments: 20

Patch Set 4 : Reduced to two files and w/o reading timestamps #

Total comments: 3

Patch Set 5 : Reorganized deletions, added unit tests #

Total comments: 6

Patch Set 6 : Updated unit test, minor fixes #

Total comments: 4

Patch Set 7 : ABC order, ASSERT_EQ order #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -6 lines) Patch
M unclean_shutdown_collector.h View 1 2 3 4 5 1 chunk +10 lines, -1 line 0 comments Download
M unclean_shutdown_collector.cc View 1 2 3 4 5 4 chunks +40 lines, -4 lines 0 comments Download
M unclean_shutdown_collector_test.cc View 5 6 3 chunks +33 lines, -1 line 0 comments Download

Messages

Total messages: 19 (0 generated)
Simon Que
10 years, 2 months ago (2010-10-12 02:21:20 UTC) #1
Simon Que
10 years, 2 months ago (2010-10-18 19:59:38 UTC) #2
Simon Que
This change is still pending review.
10 years, 1 month ago (2010-11-18 02:33:38 UTC) #3
kmixter1
I'm not really excited about this change as is because it's only for diagnostic purposes ...
10 years, 1 month ago (2010-11-18 02:58:19 UTC) #4
Simon Que
10 years, 1 month ago (2010-11-18 22:00:26 UTC) #5
Simon Que
> http://codereview.chromium.org/3644007/diff/3001/unclean_shutdown_collector.cc#newcode8 > unclean_shutdown_collector.cc:8: #include "base/time.h" > abc order Done. > http://codereview.chromium.org/3644007/diff/3001/unclean_shutdown_collector.cc#newcode15 > unclean_shutdown_collector.cc:15: // ...
10 years, 1 month ago (2010-11-18 22:02:25 UTC) #6
tfarina
My style nits below. http://codereview.chromium.org/3644007/diff/9001/unclean_shutdown_collector.cc File unclean_shutdown_collector.cc (right): http://codereview.chromium.org/3644007/diff/9001/unclean_shutdown_collector.cc#newcode15 unclean_shutdown_collector.cc:15: static const FilePath kPowerdTracePath = ...
10 years, 1 month ago (2010-11-19 15:35:43 UTC) #7
kmixter1
I'm not understanding the value in tracking the suspend/resume times or looking at them in ...
10 years, 1 month ago (2010-11-19 20:02:02 UTC) #8
Simon Que
On Fri, Nov 19, 2010 at 12:02 PM, <kmixter@chromium.org> wrote: > I'm not understanding the ...
10 years, 1 month ago (2010-11-19 20:50:25 UTC) #9
kmixter1
I think two files whose existence implies the state of the power/suspension will simplify things. ...
10 years, 1 month ago (2010-11-19 21:15:12 UTC) #10
Simon Que
10 years, 1 month ago (2010-11-19 23:13:30 UTC) #11
kmixter1
Much simpler, thanks! Could you also add a unit test for that function? Also, when ...
10 years, 1 month ago (2010-11-19 23:43:27 UTC) #12
Simon Que
PTAL. I added unit tests in addition to the below changes. > http://codereview.chromium.org/3644007/diff/18001/unclean_shutdown_collector.cc#newcode59 > unclean_shutdown_collector.cc:59: ...
10 years ago (2010-11-22 20:25:43 UTC) #13
kmixter1
http://codereview.chromium.org/3644007/diff/24001/unclean_shutdown_collector.cc File unclean_shutdown_collector.cc (right): http://codereview.chromium.org/3644007/diff/24001/unclean_shutdown_collector.cc#newcode59 unclean_shutdown_collector.cc:59: CheckForDeadBatteryUncleanShutdown(); You're not checking the return value, so this ...
10 years ago (2010-11-23 23:18:00 UTC) #14
Simon Que
> unclean_shutdown_collector.cc:59: CheckForDeadBatteryUncleanShutdown(); > You're not checking the return value, so this really has no ...
10 years ago (2010-11-24 00:12:38 UTC) #15
kmixter1
getting close http://codereview.chromium.org/3644007/diff/31001/unclean_shutdown_collector_test.cc File unclean_shutdown_collector_test.cc (right): http://codereview.chromium.org/3644007/diff/31001/unclean_shutdown_collector_test.cc#newcode18 unclean_shutdown_collector_test.cc:18: static const char kTestLowBattery[] = "test/low_battery"; still ...
10 years ago (2010-11-24 00:22:37 UTC) #16
Simon Que
> unclean_shutdown_collector_test.cc:18: static const char kTestLowBattery[] = > "test/low_battery"; > still not abc order. please ...
10 years ago (2010-11-24 00:45:41 UTC) #17
Simon Que
http://codereview.chromium.org/3644007/diff/31001/unclean_shutdown_collector_test.cc File unclean_shutdown_collector_test.cc (right): http://codereview.chromium.org/3644007/diff/31001/unclean_shutdown_collector_test.cc#newcode18 unclean_shutdown_collector_test.cc:18: static const char kTestLowBattery[] = "test/low_battery"; On 2010/11/24 00:22:38, ...
10 years ago (2010-12-01 00:45:48 UTC) #18
kmixter1
10 years ago (2010-12-01 00:57:06 UTC) #19
LGTM

Powered by Google App Engine
This is Rietveld 408576698