summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRamon Fried <ramon.fried@gmail.com>2018-05-30 23:09:59 +0300
committerTom Rini <trini@konsulko.com>2018-06-07 17:08:07 -0400
commitb5e0e360fdcf9e2ad5680ddfcde187d953880551 (patch)
treee76a1df144a594ea3bc2e0ebfd2206337a7c2cd5 /common
parenta74440b27b3f12d2cce54d7910953af19f1ac051 (diff)
downloadu-boot-b5e0e360fdcf9e2ad5680ddfcde187d953880551.tar.gz
common: iotrace: add timestamp to iotrace records
Add timestamp to each iotrace record to aid in debugging of IO timing access bugs. Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/iotrace.c4
1 files changed, 3 insertions, 1 deletions
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;