Project

General

Profile

Trace Format » History » Revision 2

Revision 1 (Sergey Smolov, 09/18/2018 04:29 PM) → Revision 2/5 (Sergey Smolov, 09/18/2018 05:03 PM)

h1. Trace Format 

 {{toc}} 

 QEMU4V is able to generate traces of program execution. Here is the description of the trace format. 
 The QEMU4V trace contains records of the following kinds: instruction records, memory access records, register write records. 

 h2. Instruction record 

 Appears in the trace when the corresponding instruction from the target program has been executed. 
 The record format is as follows: 
 <pre><code class="text"> 
 <time> <scale> <cpu> [IT|IS] (<inst_id>) <addr> <opcode> [A|T|X] <mode>_<security> : <disasm> 
 </code></pre> 
 The record fields are described in the following table: 
 | *Field* | *Description* Timestamp | *Value* | 
 | <time> | Timestamp *Description* | Decimal integer value Integer | 
 | <scale> | Timestamp unit *Description* | String (the _clk_ value means, that the timestamp field shows not physical time but the inex of executed instruction) *Value* | 
 | <cpu> | Identifier for the processor at which the instruction is executed *Description* | Decimal integer value *Value* | 
 | [IT<notextile>|</notextile>IS] [IT<nowiki>|</nowiki>IS] | Instruction execution flag *Description* | IT when "Instruction Taken", IS when "Instruction Skipped" *Value* | 
 | <inst_id> | Index of the executed instruction *Description* | Decimal integer value *Value* | 
 | <addr> | Virtual memory address for the instruction *Description* | Hexadecimal value *Value* | 
 | <opcode> | 16\32\64-bit code for the instruction *Description* | Hexadecimal value *Value* | 
 | [A<notextile>|</notextile>T<notextile>|</notextile>X] [A|T|X] | Instruction set identifier *Description* | TODO *Value* | 
 | <mode> | Execution mode *Description* | String (one of the following: svc, irq, fiq, usr, mon, sys, abt, und) *Value* | 
 | <security> | Flag for the processor security mode *Description* | s when "secure", ns when "non-secure" *Value* | 
 | <disasm> | Disassembly representation for the instruction *Description* | String *Value* | 

 Example: 
 <pre><code class="text"> 
 1 clk 0 IT (1) 00000004 3c080001 A svc : lui t0,0x1 
 </code></pre> 

 h2. Memory access record 

 TODO 

 h2. Register write record 

 TODO