The QSPY host application can also present the tracing data as a sequence diagram. To generate a Sequence file, you need to invoke QSPY with the -g [obj-list] command-line option.
The [obj-list] is a comma-separated list of objects shown in the sequence. The names in the list must correspond exactly to the object dictionaries produced by the Target. Examples of the valid -g options are shown below:
-g -g l_SysTick_Handler,Table::inst,Philo::inst[0],Philo::inst[1]-g l_QF_onClockTick,TServer::instAdditionally, the list could include ? (questionmark), which denotes System Border.
-g -g Table::inst,Philo::inst[0],Philo::inst[1],?-g ?,l_QF_onClockTick,TServer::instThe following QS trace records produce the most interesting output:
Additional annotations of the sequence diagrams are also available if the following QS trace records are enabled:
The main elements of the QSPY sequence diagram shown in the following sequence output are marked with the [xx] labels, which are explained below the listing.
[1] -g ?,l_QF_onClockTick,TServer::inst
+-------+-------+ +-------+-------+ +-------+-------+
[2] | ? | |l_QF_onClockTic| | TServer::inst |
+-------+-------+ +-------+-------+ +-------+-------+
[3] 3115372171 / | |
[4] 3127751904 *--NEW_REQUEST_SIG--+------------------>|
[5] 3127792184 / | <TServer::receiv>
3144424365 / *--RECEIVED_SIG---->|
3144429488 / | <TServer::author>
3177742936 / *--AUTHORIZED_SIG-->|
[6] 3177796020 / | (RcallA)
3177816231 / | <TServer::idle>
3190753295 *--NEW_REQUEST_SIG--+------------------>|
3190792988 / | <TServer::receiv>
3200126862 *--NEW_REQUEST_SIG--+------------------>|
[7] 3200127346 / | (Defer)
3207429692 / *--RECEIVED_SIG---->|
3207435638 / | <TServer::author>
3240835283 / *--AUTHORIZED_SIG-->|
[8] 3240884412 / | *<=NEW_REQUEST_SIG]
3240884486 / | (RCall)
3240902469 / | <TServer::idle>
. . . . . . . . . . . . . .
-g [obj-list] option, so that you can conveniently copy-and-paste this option to run the same sequence again. [obj-list]. From each box descends a lifeline that runs vertically down the page and represents the ordering of exchanged events and other interesting occurrences involving a given object. NOTE: This first object in this particular sequence diagram, denoted as‘?’, is the The System Border Object explained below.
NOTE: The names in the sequence diagram are truncated to the first 15 characters.
NOTE: The sequence header is repeated every 100 lines of the sequence output.
*, the event target is pointed to with > or <. The source and target are connected with a line *----->. The line is annotated with the signal of the posted event. < or >. (Rcall) or (RcallA), respectively. (Defer). *<, the LIFO policy of the event posting is denoted by the = line right before the signal of the posted event. As mentioned before, the [obj-list] that specifies objects participating in the sequence might include ? (questionmark), which denotes System Border. The system border is the "environment" that can produce and consume events. The "System Border" denotes possibly multiple objects that are not explicitly listed in the [obj-list], including even objects without object dictionaries. The sequence diagram in the previous section shows the "System Border", labeled as ? and life-line shown as //////.
?) anywhere in the [obj-list]. However, it is customary to place it either as the very first or the very last object in the list, as shown in the sequence diagram below:The listing below shows a sequence output (.seq) generated from the Deferred Event example application with the following -g option:
-g ?,l_QF_onClockTick,TServer::inst
The listing below shows an example of a more involved sequence diagram output (.seq) generated from the Dining Philosophers Problem (DPP) application with the following -g option:
-g l_SysTick_Handler,Table::inst,Philo::inst[0],Philo::inst[1],Philo::inst[2],Philo::inst[3],Philo::inst[4]
In addition to the elements described above, this sequence diagram illustrates the event publishing, which corresponds to the QS_QF_PUBLISH trace record. The event multicasting is represented as a horizontal line . . . ., with the event source marked as *.
-g l_SysTick_Handler,Table::inst,Philo::inst[0],Philo::inst[1],Philo::inst[2],Philo::inst[3],Philo::inst[4]
+-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+
|l_SysTick_Handl| | Table::inst | |Philo::inst[0] | |Philo::inst[1] | |Philo::inst[2] | |Philo::inst[3] | |Philo::inst[4] |
+-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+ +-------+-------+
0000042339 . . . . * .SERVE_SIG. . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . .
0000042896 *--SERVE_SIG------->| | | | | |
0001070723 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+-------------------+------------------>|
0001075362 | |<------------------+-------------------+-------------------+-------------------+-------HUNGRY_SIG--*
0001079065 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . .
0001079975 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>|
0001080774 | *--EAT_SIG----------+-------------------+-------------------+------------------>| |
0001081583 | *--EAT_SIG----------+-------------------+------------------>| | |
0001082382 | *--EAT_SIG----------+------------------>| | | |
0001083181 | *--EAT_SIG--------->| | | | |
0001087412 | | | | | | <Philo::hungry>
0001091293 | | | | | | <Philo::eating>
0001762885 *--TIMEOUT_SIG------+------------------>| | | | |
0001767416 | |<------HUNGRY_SIG--* | | | |
0001772368 | | <Philo::hungry> | | | |
0002097460 . . . . * .PAUSE_SIG. . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . .
0002098016 *--PAUSE_SIG------->| | | | | |
0002101049 | <Table::paused> | | | | |
0002140275 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | |
0002144842 | |<------------------+-------------------+-------HUNGRY_SIG--* | |
0002149765 | | | | <Philo::hungry> | |
0002245145 *--TIMEOUT_SIG------+-------------------+------------------>| | | |
0002249676 | |<------------------+-------HUNGRY_SIG--* | | |
0002254599 | | | <Philo::hungry> | | |
0003104906 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+------------------>| |
0003109447 | |<------------------+-------------------+-------------------+-------HUNGRY_SIG--* |
0003114370 | | | | | <Philo::hungry> |
0005013277 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+-------------------+------------------>|
0005016745 . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . DONE_SIG. * . . .
0005017655 | |<------------------+-------------------+-------------------+-------------------+---------DONE_SIG--*
0005025076 | | | | | | <Philo::thinking>
0007760487 *--TIMEOUT_SIG------+-------------------+-------------------+-------------------+-------------------+------------------>|
0007764998 | |<------------------+-------------------+-------------------+-------------------+-------HUNGRY_SIG--*
0007769921 | | | | | | <Philo::hungry>
0011827861 . . . . * .SERVE_SIG. . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . .
0011828417 *--SERVE_SIG------->| | | | | |
0011832381 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . .
0011833291 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>|
0011834089 | *--EAT_SIG----------+-------------------+-------------------+------------------>| |
0011834887 | *--EAT_SIG----------+-------------------+------------------>| | |
0011835685 | *--EAT_SIG----------+------------------>| | | |
0011836483 | *--EAT_SIG--------->| | | | |
0011839510 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . .
0011840421 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>|
0011841199 | *--EAT_SIG----------+-------------------+-------------------+------------------>| |
0011841977 | *--EAT_SIG----------+-------------------+------------------>| | |
0011842755 | *--EAT_SIG----------+------------------>| | | |
0011843533 | *--EAT_SIG--------->| | | | |
0011846001 | <Table::serving> | | | | |
0011864225 | | | | <Philo::eating> | |
0011874191 | | <Philo::eating> | | | |
0015268086 *--TIMEOUT_SIG------+-------------------+-------------------+------------------>| | |
0015271590 . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . . . . . . . | . . .
0015272500 | |<------------------+-------------------+---------DONE_SIG--* | |
0015276635 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . .
0015277545 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>|
0015278343 | *--EAT_SIG----------+-------------------+-------------------+------------------>| |
0015279141 | *--EAT_SIG----------+-------------------+------------------>| | |
0015279939 | *--EAT_SIG----------+------------------>| | | |
0015280737 | *--EAT_SIG--------->| | | | |
0015289641 | | | | | <Philo::eating> |
0015294035 | | | | <Philo::thinking> | |
0015540732 *--TIMEOUT_SIG------+------------------>| | | | |
0015544272 . . . . | . . . . . . . . . | . . . . . . . . . * .DONE_SIG . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . .
0015545182 | |<--------DONE_SIG--* | | | |
0015549317 . . . . | . . . . . . . . . * .EAT_SIG. . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . . . . . . . . | . . .
0015550227 | *--EAT_SIG----------+-------------------+-------------------+-------------------+------------------>|
0015551025 | *--EAT_SIG----------+-------------------+-------------------+------------------>| |
0015551823 | *--EAT_SIG----------+-------------------+------------------>| | |
0015552621 | *--EAT_SIG----------+------------------>| | | |
0015553419 | *--EAT_SIG--------->| | | | |
0015567245 | | | <Philo::eating> | | |
0015571639 | | <Philo::thinking> | | | |
Next: QSPY MATLAB Support