The profiler offers time profiling. You can request it by setting the time
field to true
when creating a manner with make_manner
.
In time profiling, you specify a stack-scanning interval (in "user" milliseconds) via the options
type. For each function you time-profile, the profiler returns a value of type function_time_profile
in the time
slot of the function_profile
. The contents of the function_time_profile
record are only meaningful if the profiling manner used requested time-profiling information.
There are two kinds of time profiling: single-level time profiling and multi-level time profiling. Single-level time profiling only gathers data about a single function. Multi-level time profiling allows frequency information to be gathered on "foo
called bar
called baz
" patterns, to a depth specifiable in the depth
field of the record you pass to make_manner
. This information is reported by generating a tree of "x called y" branches, each with statistical information attached.
The values in the fields of the function_time_profile
are:
found
).
top
).
scans
).
depth
).
self
).
callers
). This field is meaningful only in a multi-level time profile.