Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / Profiling.adoc
CommitLineData
7f918cf1
CE
1Profiling
2=========
3
4With MLton and `mlprof`, you can profile your program to find out
5bytes allocated, execution counts, or time spent in each function. To
6profile you program, compile with ++-profile __kind__++, where _kind_
7is one of `alloc`, `count`, or `time`. Then, run the executable,
8which will write an `mlmon.out` file when it finishes. You can then
9run `mlprof` on the executable and the `mlmon.out` file to see the
10performance data.
11
12Here are the three kinds of profiling that MLton supports.
13
14* <:ProfilingAllocation:>
15* <:ProfilingCounts:>
16* <:ProfilingTime:>
17
18== Next steps ==
19
20* <:CallGraph:>s to visualize profiling data.
21* <:HowProfilingWorks:>
22* <:MLmon:>
23* <:MLtonProfile:> to selectively profile parts of your program.
24* <:ProfilingTheStack:>
25* <:ShowProf:>