This adds an interface for a backend-specific notion of time, e.g. CPU cycles since simulator start, and a concrete implementation for the Bochs backend. This is needed to record CPU idle times (e.g., HLT instruction), and for target backends capable of more timing-accurate execution. This change also modifies the tracing plugin to add the time to all trace events. Change-Id: I93ac1d54c07f32b0b8f84f333417741d8e9c8288
35 lines
869 B
Protocol Buffer
35 lines
869 B
Protocol Buffer
message Trace_Event_Extended {
|
|
// data value read/written
|
|
optional uint64 data = 5;
|
|
// register contents
|
|
repeated group Registers = 6 {
|
|
// register ID
|
|
required uint32 id = 1;
|
|
// register value
|
|
optional uint64 value = 2;
|
|
// data register points to
|
|
optional uint32 value_deref = 3;
|
|
}
|
|
// selected stack content
|
|
repeated group Stack = 7 {
|
|
required uint32 value = 1;
|
|
}
|
|
}
|
|
|
|
message Trace_Event {
|
|
required uint64 ip = 1;
|
|
// backend-specific notion of time since last event, counted, e.g., in
|
|
// CPU cycles; needed to record CPU idle times (e.g., HLT instruction),
|
|
// and for target backends capable of timing-accurate execution
|
|
optional int64 time_delta = 6;
|
|
optional uint64 memaddr = 2;
|
|
optional uint32 width = 3;
|
|
enum AccessType {
|
|
READ = 1;
|
|
WRITE = 2;
|
|
}
|
|
optional AccessType accesstype = 4;
|
|
|
|
optional Trace_Event_Extended trace_ext = 5;
|
|
}
|