From 00ba25decb105c4efd6e23ad985833e1d5d8b75d Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Fri, 31 Aug 2012 11:15:37 -0700 Subject: 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 Reviewed-on: http://review.coreboot.org/1716 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- util/cbmem/cbmem.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util') 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 -- cgit v1.2.3