mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 00:51:29 +00:00
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>
This commit is contained in:
committed by
Stefan Reinauer
parent
f27d36c361
commit
00ba25decb
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user