SRTRACE(5)

NAME
srtrace - runtime event trace file for SR program

DESCRIPTION
The runtime events of any SR program can be recorded during execution in an srtrace file by setting the environment variable SR_TRACE to the name of the srtrace file. Two specific names, stdout and stderr, can be used to direct the trace output to standard output and standard error output respectively.

Each line of the srtrace file has the following fields:

Filename
    Name of the file where the corresponding SR statement is located.

Line number
    Line number of the corresponding SR statement.

Proc name
    Proc name of the corresponding SR statement. This has the form
        [vm(n).]resource.proc
    which reads as proc in resource of virtual machine n. vm(n) is displayed only for distributed programs.

Event
    Name of the event used in srtrace file. The available events are as follows:

Process ID
    A hexadecimal number identifying the particular process that generated the event.

Additional Field
    For the following events, there is a second hexadecimal number following the process ID. The meanings are:

    RETURN	process ID of the invoker
    REPLY	process ID of the invoker
    FORWARD	process ID of the invoker
    ARM	process ID of the invoker
    NI	process ID of the invoker
    PROC	process ID of the invoker
    ENDPROC	process ID of the invoker

    INITS	initial value of the semaphore

    CREATES	semaphore ID
    P	semaphore ID
    CONTP	semaphore ID
    V	semaphore ID

    Other events have 0 in the place of this field.

EXAMPLE
Some sample output:

CS.sr, 15	main.body	BODY	1730b8	0
CS.sr, 16	main.body	CREATEG	1730b8	0
CS.sr, 1	CS.body	BODY	173168	0
CS.sr, 5	CS.body	SEND	173168	0
CS.sr, 1	CS.body	ENDBODY	173168	0
CS.sr, 5	CS.arbitrator	PROC	1731c0	173168
CS.sr, 20	main.body	SEND	1730b8	0
CS.sr, 15	main.body	ENDBODY	1730b8	0
CS.sr, 7	CS.arbitrator	IN	1731c0	0
CS.sr, 20	main.user	PROC	173168	1730b8
CS.sr, 22	main.user	CALL	173168	0
CS.sr, 8	CS.arbitrator	ARM	1731c0	173168
CS.sr, 7	CS.arbitrator	NI	1731c0	173168
CS.sr, 10	CS.arbitrator	IN	1731c0	0
CS.sr, 24	main.user	SEND	173168	0
CS.sr, 10	CS.arbitrator	ARM	1731c0	173168
CS.sr, 10	CS.arbitrator	NI	1731c0	173168
CS.sr, 7	CS.arbitrator	IN	1731c0	0
CS.sr, 20	main.user	ENDPROC	173168	1730b8

SEE ALSO

sr(1), srprof(1)

CAVEATS
srtrace output reflects the actual SR implementation, which differs in some details from the SR source language. For example, a process statement is traced as a SEND followed by a PROC. Some P and V statements are implemented as in and send respectively, and vice versa.

The following srtrace events report a line number different from the line number of the corresponding SR statement:

NI	line number of corresponding IN
ENDPROC	line number of corresponding PROC
ENDBODY	line number of corresponding BODY
ENDFINAL	line number of corresponding FINAL