Project

General

Profile

Trace Format » History » Version 2

Sergey Smolov, 09/18/2018 05:03 PM

1 1 Sergey Smolov
h1. Trace Format
2
3 2 Sergey Smolov
{{toc}}
4
5 1 Sergey Smolov
QEMU4V is able to generate traces of program execution. Here is the description of the trace format.
6
The QEMU4V trace contains records of the following kinds: instruction records, memory access records, register write records.
7
8
h2. Instruction record
9
10
Appears in the trace when the corresponding instruction from the target program has been executed.
11
The record format is as follows:
12
<pre><code class="text">
13
<time> <scale> <cpu> [IT|IS] (<inst_id>) <addr> <opcode> [A|T|X] <mode>_<security> : <disasm>
14
</code></pre>
15
The record fields are described in the following table:
16 2 Sergey Smolov
| *Field* | *Description* | *Value* |
17
| <time> | Timestamp | Decimal integer value |
18
| <scale> | Timestamp unit | String (the _clk_ value means, that the timestamp field shows not physical time but the inex of executed instruction) |
19
| <cpu> | Identifier for the processor at which the instruction is executed | Decimal integer value |
20
| [IT<notextile>|</notextile>IS] | Instruction execution flag | IT when "Instruction Taken", IS when "Instruction Skipped" |
21
| <inst_id> | Index of the executed instruction | Decimal integer value |
22
| <addr> | Virtual memory address for the instruction | Hexadecimal value |
23
| <opcode> | 16\32\64-bit code for the instruction | Hexadecimal value |
24
| [A<notextile>|</notextile>T<notextile>|</notextile>X] | Instruction set identifier | TODO |
25
| <mode> | Execution mode | String (one of the following: svc, irq, fiq, usr, mon, sys, abt, und) |
26
| <security> | Flag for the processor security mode | s when "secure", ns when "non-secure" |
27
| <disasm> | Disassembly representation for the instruction | String |
28
29
Example:
30
<pre><code class="text">
31
1 clk 0 IT (1) 00000004 3c080001 A svc : lui t0,0x1
32
</code></pre>
33
34
h2. Memory access record
35
36
TODO
37
38
h2. Register write record
39
40
TODO