chromiumos/platform/bootstat.git
16 months agoSome cleanup of bootstat scripts 53/65753/2 master
Greg Spencer [Tue, 13 Aug 2013 22:48:20 +0000 (15:48 -0700)]
Some cleanup of bootstat scripts

Cleaned up boostat_summary output so that it no longer prints huge
negative numbers when the delta is zero, and so that the columns
overflow less often.

Added millisecond output to bootstat_get_last (with "time-ms"
argument) so that scripts using it can use builtin bash integer
arithmetic instead of having to invoke awk to manipulate times (makes
the client code simpler). (this is used by code that fixes referenced
bug).

BUG=chromium:271068
TEST=ran on device (Pixel)

Change-Id: Ieb98c6779dd06310c0c2b3bb2dd4c9b48af13bc5
Reviewed-on: https://gerrit.chromium.org/gerrit/65753
Tested-by: Greg Spencer <gspencer@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Greg Spencer <gspencer@chromium.org>

20 months agoEnhance bootstat_summary to accept a list of events. 21/48821/2 factory-4128.B factory-4290.B factory-4455.B factory-pit-4280.B factory-pit-4390.B factory-pit-4471.B factory-spring-4131.B factory-spring-4262.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-pit-4482.B firmware-wolf-4389.24.B release-R28-4100.B release-R29-4319.B release-R30-4537.B stabilize-4068.0.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B stabilize-4443.B stabilize-4512.B stabilize-spring-4100.53.B toolchainB
J. Richard Barnette [Mon, 22 Apr 2013 21:37:29 +0000 (14:37 -0700)]
Enhance bootstat_summary to accept a list of events.

If provided with arguments, the script will summarize only the named
events.  If no arguments are provided, the script summarizes all
available events, just as before.

BUG=None
TEST=run the command with and without arguments

Change-Id: I21fdcced548d5a1d63c62b8e40f3817342319c46
Reviewed-on: https://gerrit.chromium.org/gerrit/48821
Reviewed-by: Daniel Erat <derat@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
2 years agoFor bootstat_get_last, don't complain about non-existent events. factory-2569.B factory-2717.B factory-2723.14.B factory-2846.B factory-2848.B factory-2914.B factory-2985.B factory-2993.B factory-3004.B factory-3536.B factory-spring-3842.B firmware-butterfly-2788.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-snow-2695.90.B firmware-snow-2695.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-spring-3833.B firmware-stout-2817.B release-R22-2723.B release-R23-2913.B release-R25-3428.B release-R26-3701.B release-R27-3912.B stabilize stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-3881.0.B stabilize-3912.79.B stabilize-4008.0.B stabilize-4035.0.B stabilize-bluetooth-smart stabilize-daisy stabilize-link stabilize-link-2913.278 stabilize2 toolchain-3428.65.B toolchain-3701.42.B toolchainA
J. Richard Barnette [Wed, 27 Jun 2012 21:51:48 +0000 (14:51 -0700)]
For bootstat_get_last, don't complain about non-existent events.

Requested events are converted into files to be processed by
'tail -1'.  If the file doesn't exist, tail complains.  We don't
want the complaint, because this command is meant to be used to test
for non-existent events.

BUG=chromium-os:32203
TEST=run the test from the bug report

Change-Id: I0c76f531e84ad71470394793cc1e2cdfe977e3df
Reviewed-on: https://gerrit.chromium.org/gerrit/26271
Reviewed-by: Daniel Erat <derat@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
2 years agoAdd a new 'bootstat_summary' command.
J. Richard Barnette [Wed, 27 Jun 2012 21:55:36 +0000 (14:55 -0700)]
Add a new 'bootstat_summary' command.

The command prints a simple summary of boot phase timings and
CPU utilization.

BUG=None
TEST=run the command from shell prompt

Change-Id: Ibf53369572808bb80b9cb0dc1e6c77742c2f8857
Reviewed-on: https://gerrit.chromium.org/gerrit/26270
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>

2 years ago[bootstat] add OWNERS factory-2268.16.B factory-2305.B factory-2338.B factory-2368.B factory-2394.B factory-2460.B factory-2475.B firmware-link-2348.B release-R20-2268.B release-R21-2465.B
Elly Jones [Fri, 6 Apr 2012 17:39:10 +0000 (13:39 -0400)]
[bootstat] add OWNERS

TEST=None
BUG=chromium-os:22007

Change-Id: If4befce7fab22dbdeb50c5fccd8357380c91e85a
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/19756
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
3 years agobootstat write timing to the kernel. factory-1020.B factory-1235.B factory-1284.B factory-1412.B factory-1987.B factory-980.B firmware-kiev-2.112.B firmware-uboot_v2-1299.B release-1011.B release-R16-1193.B release-R17-1412.B release-R18-1660.B release-R19-2046.B test-982.B
Da Zheng [Wed, 27 Jul 2011 02:14:28 +0000 (19:14 -0700)]
bootstat write timing to the kernel.

BUG=chromium-os:19176
TEST=Test it on ChromeOS, and /sys/kernel/debug/bootstat/report contains
all timings written by bootstat.

Change-Id: I25a2e0aec1b24f52047c7bc97f0ad40f78009a8b
Reviewed-on: http://gerrit.chromium.org/gerrit/6598
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Da Zheng <zhengda@chromium.org>
3 years agoRevert "bootstat write timing to the kernel."
Vadim Bendebury [Wed, 24 Aug 2011 18:50:33 +0000 (11:50 -0700)]
Revert "bootstat write timing to the kernel."

This reverts commit 13ce71d9e8fac31a269425aca34e106f1ff46a88

The problem can be seen in http://build.chromium.org/p/chromiumos/builders/x86%20generic%20PFQ/builds/525/steps/BuildTarget/logs/stdio

NEVER COMMIT ANYTHING WITHOUT TESTING, EVEN ONELINERS!!!!

Change-Id: I3f68b0c72daa3f8d3bc6980074e2c11dda546001
Reviewed-on: http://gerrit.chromium.org/gerrit/6593
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
3 years agobootstat write timing to the kernel.
Da Zheng [Wed, 27 Jul 2011 02:14:28 +0000 (19:14 -0700)]
bootstat write timing to the kernel.

BUG=chromium-os:19176
TEST=Test it on ChromeOS, and /sys/kernel/debug/bootstat/report contains
all timings written by bootstat.

Change-Id: I83998dc71ba0d521cdbf7ba0edac6bada35495a6
Reviewed-on: http://gerrit.chromium.org/gerrit/5503
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Da Zheng <zhengda@chromium.org>
3 years agoUse O_NOFOLLOW in bootstat_log() when opening event files. 0.14.811.B 0.15.877.B 780.B firmware-881-u-boot-v1 firmware-u-boot-v1
J. Richard Barnette [Wed, 6 Jul 2011 21:34:40 +0000 (14:34 -0700)]
Use O_NOFOLLOW in bootstat_log() when opening event files.

BUG=chromium-os:16611
TEST=unit test

Change-Id: I59f06b680d1477029f749165a87d05c7700ee735
Reviewed-on: http://gerrit.chromium.org/gerrit/3689
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Jim Hebert <jimhebert@chromium.org>
4 years agoAdd new bootstat_last command 0.11.241.B 0.11.257.B 0.11.257.B90 0.12.362.B 0.12.369.B 0.12.392.B 0.12.433.B 0.12.433.B109 0.12.433.B62 0.13.434.B 0.13.509.B 0.13.558.B 0.13.587.B 11.1.241.B
J. Richard Barnette [Tue, 7 Dec 2010 18:18:43 +0000 (10:18 -0800)]
Add new bootstat_last command

BUG=chromium-os:9701
TEST=None

Review URL: http://codereview.chromium.org/5265008

Change-Id: I60f506485a0b64f3d516611f3edac7098730a34b

4 years agoEliminate the dependency on kernel pseudo-files when running unit tests
J. Richard Barnette [Tue, 7 Dec 2010 01:58:00 +0000 (17:58 -0800)]
Eliminate the dependency on kernel pseudo-files when running unit tests

This change means that the unit tests no longer need /proc/uptime
or /sys/block/sda/stat in order to operate properly.

As an added bonus, this change enables testing that the output of
bootstat_log() exactly matches the expected content.

BUG=chromium-os:8311
TEST=Run the unit tests

Review URL: http://codereview.chromium.org/5500001

Change-Id: I8a6382ebb9eb3c78c3109f9e12f5b87dfe334a00

4 years agoCreate a bootstat library for external C and C++ programs
J. Richard Barnette [Tue, 17 Aug 2010 02:33:29 +0000 (19:33 -0700)]
Create a bootstat library for external C and C++ programs

BUG=none
TEST=emerge-x86-generic bootstat

Review URL: http://codereview.chromium.org/3129002

4 years agoCreate bootstat command
J. Richard Barnette [Mon, 9 Aug 2010 18:39:20 +0000 (11:39 -0700)]
Create bootstat command

BUG=none
TEST=build on host and use command as described in README file
TEST=emerge-x86-generic, and test on target
TEST=emerge-arm-generic to confirm clean compile on ARM

Review URL: http://codereview.chromium.org/3043047

4 years agoAdd LICENSE file
J. Richard Barnette [Thu, 5 Aug 2010 21:13:48 +0000 (14:13 -0700)]
Add LICENSE file

4 years agoinitial repository with README
J. Richard Barnette [Mon, 2 Aug 2010 22:08:04 +0000 (15:08 -0700)]
initial repository with README