We say that the profiler produces execution profiles for function calls. More exactly, the profiler produces execution profiles for all code items. For more on code items, see the section on MLWorks.Profile
in the MLWorks Reference Manual. For now, note that a code item most closely corresponds to an instance of a lambda function (a fn
) in the source. So in:
val f = fn x => x + 10;
The fn x => x+10
code item is profilable: an application of f
to an integer value could be profiled, though in practice its execution would probably be completed so quickly that the profiler would not have time to record anything about the application.