Skip to content

Flowgraph Trace Levels

Scott Johnston edited this page Aug 30, 2018 · 40 revisions

A flowgraph oriented logger traces the execution of a flowgraph by rendering different levels of detail to stdout (errors are printed to a stderr logger and by convention nil is passed on). The levels of detail are:

// Trace level constants.                                                                                                      
const (
        QQ = iota  // very quiet for minimal stats
        Q          // quiet, default                                                                                 
        V          // trace Node firing                                                                                         
        VV         // trace channel IO                                                                                          
        VVV        // trace state before select                                                                                 
        VVVV       // full-length array dumps                                                                                   
)
tbi(0:0) ;e0=7
rdy(1:0) e0=7,e5=0;e1=7
either(2:0) e1=7,e6=_;e2=7
sub(3:0) e2=7,e3=1;e4=6
steerc(4:0) e4=6;e5=_,e6=6
tbi(0:1) ;e0=3
either(2:1) e1=_,e6=6;e2=6
sub(3:1) e2=6,e3=1;e4=5
steerc(4:1) e4=5;e5=_,e6=5
either(2:2) e1=_,e6=5;e2=5

from Flowgraph Coordination:

Each log entry has the form:
nodename(nodeid:firecnt) [srclist];[dstlist]

A srclist or dstlist has this form:
edgename=type(val)[,edgename=type(val)[,...,edgename=type(val)]]

So for this log entry:

steerv(2:5) e0=int(1),e1=int(1005):e2=_,e3=int(1005)

steerv is the name of the Node, it's globally unique id is 2, it has fired six times (0 thru 5), and this time its e0 input steered the e1 input (1005) to the second output (e3). "_" indicates an empty input or output.

  • VV also traces channel IO, each read or write of data and acknowledge channels. The acks only show the channel with an arrow to the left (write) or right (read). * indicates a Node hasn't fired yet. // s indicates a read happened out of a select statement. // !s indicates an opportunistic read happened on a non-empty channel.
tbi(0:0) e0.Data <- 7
rdy(1:*) 7 <- e0.Data // s
rdy(1:0) e0.Ack <-
rdy(1:0) e5.Ack <-
rdy(1:0) e1.Data <- 7
steerc(4:*) <- e5.Ack // s
tbi(0:0) <- e0.Ack // select
either(2:*) 7 <- e1.Data // s
tbi(0:1) e0.Data <- 3
either(2:0) e1.Ack <-
  • VVV traces the Node state before each input (data or ack) and before each firing. Data coming from upstream sources are either empty _ or show the data that has arrived. Acks coming from downstream destinations show the count remaining. At k0 the ack is satisfied.
tbi(0:0) <<;e0=k0>>
rdy(1:*) <<e0=_,e5=0;e1=k0>>
rdy(1:0) <<e0=7,e5=0;e1=k0>>
either(2:*) <<e1=_,e6=_;e2=k0>>
either(2:0) <<e1=7,e6=_;e2=k0>>
sub(3:*) <<e2=_,e3=1;e4=k0>>
sub(3:0) <<e2=7,e3=1;e4=k0>>
steerc(4:*) <<e4=_;e5=k1,e6=k0>>
steerc(4:*) <<e4=_;e5=k0,e6=k0>>
steerc(4:0) <<e4=6;e5=k0,e6=k0>>
  • VVVV traces everything that has proven at all useful in debugging the flowgraph package. It also dumps the entirety of slice data, avoiding the ellipsis shortened slices of the lower trace levels. It also by default adds the number of seconds as a third colon-separated number after the node name.

  • QQ simplifies the output of the Q mode to facilitate embedding in CSV files. Commented and new-line terminated statistics becomes nothing more than comma-separated numerics.

Trace samples from tbiterator target of flowgraph_test Makefile.

Clone this wiki locally