Skip to content
Snippets Groups Projects
Commit b5e0e360 authored by Ramon Fried's avatar Ramon Fried Committed by Tom Rini
Browse files

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: default avatarRamon Fried <ramon.fried@gmail.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent a74440b2
No related branches found
No related tags found
No related merge requests found
...@@ -27,11 +27,13 @@ enum iotrace_flags { ...@@ -27,11 +27,13 @@ enum iotrace_flags {
* struct iotrace_record - Holds a single I/O trace record * struct iotrace_record - Holds a single I/O trace record
* *
* @flags: I/O access type * @flags: I/O access type
* @timestamp: Timestamp of access
* @addr: Address of access * @addr: Address of access
* @value: Value written or read * @value: Value written or read
*/ */
struct iotrace_record { struct iotrace_record {
enum iotrace_flags flags; enum iotrace_flags flags;
u64 timestamp;
phys_addr_t addr; phys_addr_t addr;
iovalue_t value; iovalue_t value;
}; };
...@@ -81,7 +83,7 @@ static void add_record(int flags, const void *ptr, ulong value) ...@@ -81,7 +83,7 @@ static void add_record(int flags, const void *ptr, ulong value)
iotrace.start + iotrace.offset, iotrace.start + iotrace.offset,
sizeof(value)); sizeof(value));
} }
rec->timestamp = timer_get_us();
rec->flags = flags; rec->flags = flags;
rec->addr = map_to_sysmem(ptr); rec->addr = map_to_sysmem(ptr);
rec->value = value; rec->value = value;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment