diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2012-08-31 11:15:37 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-11-08 19:39:06 +0100 |
commit | 00ba25decb105c4efd6e23ad985833e1d5d8b75d (patch) | |
tree | dc2ffa3d906aae0f0870396d0ede867819532054 /util/cbmem | |
parent | f27d36c361abef8fcbb377a8949067290770571a (diff) | |
download | coreboot-00ba25decb105c4efd6e23ad985833e1d5d8b75d.tar.xz |
Get more informative output from cbmem.py
This is a cosmetic change which formats timestamp information
retrieved by cbmem.py.
Instead of printing timestamps in a single line, print them one per
line and add time (in us) elapsed since the previous timestamp.
time base 4149594, total entries 18
1:56,928
2:58,851 (1,923)
3:175,230 (116,378)
4:175,340 (109)
8:177,199 (1,859)
9:214,368 (37,168)
10:214,450 (81)
30:214,462 (11)
40:215,205 (743)
50:217,180 (1,974)
60:217,312 (132)
70:436,984 (219,671)
75:436,993 (8)
80:441,424 (4,431)
90:442,487 (1,062)
99:553,777 (111,289)
1000:556,513 (2,736)
1100:824,621 (268,107)
Change-Id: I0d25cafe766c10377017697e6b206276e1a92992
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://review.coreboot.org/1716
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'util/cbmem')
-rwxr-xr-x | util/cbmem/cbmem.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/cbmem/cbmem.py b/util/cbmem/cbmem.py index 839393bba4..70ccc00afc 100755 --- a/util/cbmem/cbmem.py +++ b/util/cbmem/cbmem.py @@ -136,10 +136,16 @@ def process_timers(base): print('\ntime base %d, total entries %d' % (header.base_time, header.entr)) clock_freq = get_cpu_freq() base = base + header.struct_len + prev_time = 0 for i in range(header.entr): timestamp = TimestampEntry(base) print '%d:%s ' % (timestamp.timer_id, normalize_timer(timestamp.timer_value, clock_freq)), + if prev_time: + print '(%s)' % normalize_timer( + timestamp.timer_value - prev_time, clock_freq), + prev_time = timestamp.timer_value + print base = base + timestamp.struct_len print |