Project

General

Profile

Command Line Options » History » Version 13

Sergey Smolov, 01/20/2020 02:56 PM

1 1 Sergey Smolov
h1. Command Line Options
2
3 13 Sergey Smolov
{{toc}}
4
5
h1. Overview
6
7 3 Sergey Smolov
The _Trace Matcher_ command line looks as follows:
8 1 Sergey Smolov
<pre>
9 11 Sergey Smolov
usage: traceutils [-h] [-w [W_SIZE]] [-fds] [-sr] [-d] [-se] FILE [FILE ...]
10 4 Sergey Smolov
11
positional arguments:
12
  FILE                  Path to trace file
13 6 Sergey Smolov
14 1 Sergey Smolov
optional arguments:
15 13 Sergey Smolov
  -h, --help            Show this help message and exit
16 1 Sergey Smolov
  -w [W_SIZE], --window-size [W_SIZE]
17
                        Matching window size in ticks (default: 1)
18
  -fds, --first-dif-stop
19
                        Stop the tool when the first difference is detected (default: disabled)
20 13 Sergey Smolov
  -sr, --skip-rest      Skip matching for the rest of the longest trace (default: disabled)
21
  -d, --debug           Enable printing for debug messages (default: disabled)
22
  -se, --skip-equal     Skip subsequent records if they differ in time field only (default: disabled)
23 1 Sergey Smolov
</pre>
24
25 13 Sergey Smolov
The detailed descriptions of some specific options are given below.
26 1 Sergey Smolov
27 13 Sergey Smolov
h2. Window size
28
29
For example, there are two input trace files that are called @log1.txt@ and @log2.txt@. The @log1.txt@ file contains the following records:
30
<pre>
31
1 clk 0 IT (1) 00000004 3c080001 A svc : lui t0,0x1
32
1 clk R r8 00000000
33
</pre>
34
35
The @log2.txt@ file contains the following records:
36
<pre>
37
1 clk R r8 00000000
38
1 clk 0 IT (1) 00000004 3c080001 A svc : lui t0,0x1
39
</pre>
40
41
Trace files to compare may contain same _records_ (lines), but at different positions relative to each other. To take this effect into account and do not treat actually simultaneous but formally logged in different order events, a *window* concept is introduced. The idea is not to compare trace files record by record, but "record block" by "records block" with the aim to find equal but reordered records. Such block is called as "window". Window is characterized by it's size that is a number of records inside the window. By default, window size is set to 1. It means that record by record comparison will be made.
42
43
h2. Stopping when first difference
44
45
When an appropriate option is enabled, the tool ceases matching process when the first non-matched record has been detected.
46
47
h2. Skip matching for the rest
48
49
There are not so many reasons to continue the matching process when there is only one not completely parsed trace. When enabled, the appropriate option disables matching in such case.