# MX\_RUNPROF

> [HTML Version](mx_runprof.htm)

_Reviewed and revised April 2024_

**xcall MIAMEX, MX\_RUNPROF, opsts \{,fspec\}**

MX\_RUNPROF (MIAMEX 203) generates a run profile log to be analyzed for an overview of the program call structure and performance.

**Parameters**

_opsts_  ([Signed Int](integer-signed.md))  \[in/out\]

specifies the opcode and return status:

| **Opcode** | | **Returned Status** | 
|------|------|------|------|
| **Value** | **Function** | **Value** | **Function** |
| 0 | Check profiling status | 0 | disabled |
| | | 1 | enabled (+flags) |
| 1 | Enable profiling and   <br>output to _fspec_ | 2 | enabled |
| | | \-2 | already enabled |
| | | \-3 | cannot open file |
| 2 | Disable profilling | 3 | now disabled |
| | | 0 | was disabled |




_fspec_  ([String](string.md))  \[in\]

destination filespec; replaced if already exists; default is <pid>.rpl

**See Also**

•	[RUNPROF.LIT](runprof_lit.md)

**History**

2023 July, A-Shell 6.5.1735:  Routine added to A-Shell.