Skip to content

Commit

Permalink
#1933: Docs: Reference spec-file.md in trace.md and node-lb-data.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Oct 10, 2022
1 parent 51da2d5 commit 12f2208
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 43 deletions.
7 changes: 7 additions & 0 deletions docs/md/node-lb-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,10 @@ The type of communication lines up with the enum

For all the broadcast-like edges, the communication logging will occur on the
receive of the broadcast side (one entry per broadcast recipient).

\section lb-spec-file LB Specification File
In order to customize when LB output is enabled and disabled, a LB
specification file can be passed to \vt via a command-line flag:
`--vt_lb_spec --vt_lb_spec_file=filename.spec`.

For details about vt's specification file see \subpage vt-spec-file
44 changes: 1 addition & 43 deletions docs/md/trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,4 @@ In order to customize when tracing is enabled and disabled, a trace
specification file can be passed to \vt via a command-line flag:
`--vt_trace_spec --vt_trace_spec_file=filename.spec`.

The parser will read the following format:

\code
[%] <phase> <range negative> <range positive>
\endcode

The following is an example of a trace specification:

\code
0 0 10
%100 -3 3
200 -5 5
\endcode

This specifies that tracing will be enabled on the following phases:

\code
{
[0,10], # phase 0 with offsets 0,+10 (subsumes [0,3] from %100 -3 3)
[97,103] # any phase % 100 with offset -3,+3
[195,205] # phase 200 with offsets -5,+5 (subsumes [197,203] from %100 -3 3)
[297,303] # any phase % 100 with offset -3,+3
[n%100-3,n%100+3] ... # any phase % 100 with offset -3,+3
}
\endcode

The sets of mod-phase and phase-specific entries must be unique. There may be
overlap across the two sets, but not within them. Having two entries that
start with `%100` or two entries that start with `100` would be invalid and
trigger a parsing error. But having a `%100` and `100` entry is valid.
Whether tracing is enabled is calculated as an OR across all specification
entries. Thus, if a given phase is contained in any spec line, it is
enabled. Note that `0 % 100 = 0`. Therefore, if the above example did not
contain the first line, tracing would be enabled as:

\code
{
[0,3], # any phase mod 100 from -3,+3
[97,103],
[195,205],
[297,303], ...
}
\endcode
For details about vt's Spec File see \subpage vt-spec-file

0 comments on commit 12f2208

Please sign in to comment.