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

Issue 2864009: Log active use time between kernel crashes. (Closed)

Created:
10 years, 6 months ago by petkov
Modified:
9 years, 7 months ago
Reviewers:
kmixter1, Sam Leffler
CC:
chromium-os-reviews_chromium.org, petkov, Luigi Semenzato, sosa
Base URL:
ssh://git@chromiumos-git/metrics.git
Visibility:
Public.

Description

Log active use time between kernel crashes. Also, initialize the network state from flimflam, just in case -- now that the metrics daemon process starts a bit late, BUG=none TEST=unit tests, ran on the device, emerged arm-generic

Patch Set 1 #

Patch Set 2 : Make the kernel crash file name a parameter and add a unit test. #

Total comments: 9

Patch Set 3 : Address review comments. #

Patch Set 4 : Fix potential memory leaks and usage of freed resources. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -23 lines) Patch
M Makefile View 2 chunks +0 lines, -12 lines 0 comments Download
M metrics_daemon.h View 1 2 6 chunks +22 lines, -0 lines 0 comments Download
M metrics_daemon.cc View 1 2 3 10 chunks +110 lines, -11 lines 0 comments Download
M metrics_daemon_test.cc View 1 2 7 chunks +42 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
petkov
... and the last in the series of CLs for logging time between kernel crashes.
10 years, 6 months ago (2010-06-17 22:46:40 UTC) #1
petkov
ping...
10 years, 6 months ago (2010-06-22 18:45:06 UTC) #2
petkov
Sam, could you please review the flimflam dbus stuff. Thanks!
10 years, 6 months ago (2010-06-22 23:43:10 UTC) #3
kmixter1
LGTM with Sam's check on the connman interface stuff otherwise a few nits. http://codereview.chromium.org/2864009/diff/2001/3001 File ...
10 years, 6 months ago (2010-06-22 23:55:33 UTC) #4
Sam Leffler
dbus stuff LGTM modulo nit/question http://codereview.chromium.org/2864009/diff/2001/3002 File metrics_daemon.cc (right): http://codereview.chromium.org/2864009/diff/2001/3002#newcode132 metrics_daemon.cc:132: return ""; Do you ...
10 years, 6 months ago (2010-06-23 18:20:43 UTC) #5
petkov
10 years, 6 months ago (2010-06-24 18:18:35 UTC) #6
Address comments, I think. Unless there're more comments in the next few
minutes, I'll push.

http://codereview.chromium.org/2864009/diff/2001/3001
File Makefile (left):

http://codereview.chromium.org/2864009/diff/2001/3001#oldcode76
Makefile:76: metrics_daemon.o: \
On 2010/06/22 23:55:33, kmixter1 wrote:
> Did you intentionally remove these extra dependencies?

Yes, they're not complete anyway -- and I don't think this is the right way to
do .h deps.

And when you ebuild/emerge, you usually build from scratch so it's irrelevant.

http://codereview.chromium.org/2864009/diff/2001/3002
File metrics_daemon.cc (right):

http://codereview.chromium.org/2864009/diff/2001/3002#newcode130
metrics_daemon.cc:130: if (dbus_error_is_set (&error) || !reply) {
On 2010/06/22 23:55:33, kmixter1 wrote:
> Does timeout fall into this case?  Also that function blocks all reception so
> any other external notifications will be delayed until this RPC returns. You
> might want to mention that in this function's comments to avoid widespread use
> of it.  Unless 2s is always a tolerable amount of noise in measurements.

I've added a comment. Currently this function is used once at startup. And,
normally, the response is returned right away. If Sam moves the TimeToDrop
metric to flimflam, we can also get rid of this function.

http://codereview.chromium.org/2864009/diff/2001/3002#newcode132
metrics_daemon.cc:132: return "";
On 2010/06/23 18:20:43, Sam Leffler wrote:
> Do you want to return something different like "offline"?  I see "" is handled
> but if you cannot reach flimflam it might be best to assume you're offline.

"" is marked as unknown network state which for all practical purposes is
equivalent to offline.

http://codereview.chromium.org/2864009/diff/2001/3002#newcode405
metrics_daemon.cc:405: FilePath crash_detected(crash_file);
On 2010/06/22 23:55:33, kmixter1 wrote:
> I'd probably do this check outside the function and then call the function
> ProcessKernelCrash to be analogous to ProcessKernelCrash.

Done.

Powered by Google App Engine
This is Rietveld 408576698