Skip to contentSkip to conversation

common: iotrace: add timestamp to iotrace records

PATCH New Ramon Fried 2 participants 2 messages May 26, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 3/6 common: iotrace: add timestamp to iotrace records

Add timestamp to each iotrace record to aid in debugging of IO timing access bugs.

---
v2: replace get_ticks() with timer_get_us()

 common/iotrace.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
common/iotrace.c +3 -1
index f39885663a..2f03a6082e 100644
@@ -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;
Signature · 1 line
2.17.0
#1 lore raw

PATCH v2 3/6 common: iotrace: add timestamp to iotrace records

Quoted 9 lines · Ramon Fried

Add timestamp to each iotrace record to aid in debugging of IO timing access bugs.

---
v2: replace get_ticks() with timer_get_us()

 common/iotrace.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)