MPDTRACE(5)

NAME
mpdtrace - runtime event trace file for MPD program

DESCRIPTION
The runtime events of any MPD program can be recorded during execution in an mpdtrace file by setting the environment variable MPD_TRACE to the name of the mpdtrace 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 mpdtrace file has the following fields:

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

Line number
    Line number of the corresponding MPD statement.

Proc name
    Proc name of the corresponding MPD 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 mpdtrace 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.mpd, 15	main.body	BODY	1730b8	0
CS.mpd, 16	main.body	CREATEG	1730b8	0
CS.mpd, 1	CS.body	BODY	173168	0
CS.mpd, 5	CS.body	SEND	173168	0
CS.mpd, 1	CS.body	ENDBODY	173168	0
CS.mpd, 5	CS.arbitrator	PROC	1731c0	173168
CS.mpd, 20	main.body	SEND	1730b8	0
CS.mpd, 15	main.body	ENDBODY	1730b8	0
CS.mpd, 7	CS.arbitrator	IN	1731c0	0
CS.mpd, 20	main.user	PROC	173168	1730b8
CS.mpd, 22	main.user	CALL	173168	0
CS.mpd, 8	CS.arbitrator	ARM	1731c0	173168
CS.mpd, 7	CS.arbitrator	NI	1731c0	173168
CS.mpd, 10	CS.arbitrator	IN	1731c0	0
CS.mpd, 24	main.user	SEND	173168	0
CS.mpd, 10	CS.arbitrator	ARM	1731c0	173168
CS.mpd, 10	CS.arbitrator	NI	1731c0	173168
CS.mpd, 7	CS.arbitrator	IN	1731c0	0
CS.mpd, 20	main.user	ENDPROC	173168	1730b8

SEE ALSO

mpd(1), mpdprof(1)

CAVEATS
mpdtrace output reflects the actual MPD implementation, which differs in some details from the MPD 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 mpdtrace events report a line number different from the line number of the corresponding MPD 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