From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ramon Fried Date: Wed, 30 May 2018 23:09:59 +0300 Subject: [U-Boot] [PATCH v4 3/6] common: iotrace: add timestamp to iotrace records In-Reply-To: <20180530201002.31913-1-ramon.fried@gmail.com> References: <20180530201002.31913-1-ramon.fried@gmail.com> Message-ID: <20180530201002.31913-4-ramon.fried@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add timestamp to each iotrace record to aid in debugging of IO timing access bugs. Signed-off-by: Ramon Fried Reviewed-by: Simon Glass --- Changes in v4: None Changes in v3: None Changes in v2: None Changes in v1: - Change timestamp function to get_ticks() common/iotrace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/iotrace.c b/common/iotrace.c index f39885663a..2f03a6082e 100644 --- a/common/iotrace.c +++ b/common/iotrace.c @@ -27,11 +27,13 @@ enum iotrace_flags { * struct iotrace_record - Holds a single I/O trace record * * @flags: I/O access type + * @timestamp: Timestamp of access * @addr: Address of access * @value: Value written or read */ struct iotrace_record { enum iotrace_flags flags; + u64 timestamp; phys_addr_t addr; iovalue_t value; }; @@ -81,7 +83,7 @@ static void add_record(int flags, const void *ptr, ulong value) iotrace.start + iotrace.offset, sizeof(value)); } - + rec->timestamp = timer_get_us(); rec->flags = flags; rec->addr = map_to_sysmem(ptr); rec->value = value; -- 2.17.0