| 1 |
= MLmon |
| 2 |
|
| 3 |
An `mlmon.out` file records dynamic <<Profiling#,profiling>> counts. |
| 4 |
|
| 5 |
== File format |
| 6 |
|
| 7 |
An `mlmon.out` file is a text file with a sequence of lines. |
| 8 |
|
| 9 |
* The string `MLton prof`. |
| 10 |
|
| 11 |
* The string `alloc`, `count`, or `time`, depending on the kind |
| 12 |
of profiling information, corresponding to the command-line argument |
| 13 |
supplied to `mlton -profile`. |
| 14 |
|
| 15 |
* The string `current` or `stack` depending on whether profiling |
| 16 |
data was gathered for only the current function (the top of the stack) |
| 17 |
or for all functions on the stack. This corresponds to whether the |
| 18 |
executable was compiled with `-profile-stack false` or `-profile-stack |
| 19 |
true`. |
| 20 |
|
| 21 |
* The magic number of the executable. |
| 22 |
|
| 23 |
* The number of non-gc ticks, followed by a space, then the number of |
| 24 |
GC ticks. |
| 25 |
|
| 26 |
* The number of (split) functions for which data is recorded. |
| 27 |
|
| 28 |
* A line for each (split) function with counts. Each line contains an |
| 29 |
integer count of the number of ticks while the function was current. |
| 30 |
In addition, if stack data was gathered (`-profile-stack true`), then |
| 31 |
the line contains two additional tick counts: |
| 32 |
|
| 33 |
** the number of ticks while the function was on the stack. |
| 34 |
** the number of ticks while the function was on the stack and a GC |
| 35 |
was performed. |
| 36 |
|
| 37 |
* The number of (master) functions for which data is recorded. |
| 38 |
|
| 39 |
* A line for each (master) function with counts. The lines have the |
| 40 |
same format and meaning as with split-function counts. |