XProf v2.0.0-rc.4 xprof_core View Source
Link to this section Summary
Types
Command name.
Used by the GUI and xprof_core_tracer
to identify mfas.
Arity of '_'
means all arities.
Similar to type erlang:trace_pattern_mfa()
.
Derived from mfa_id
.
Used to register ets tables and xprof_core_trace_handler
gen_servers.
Traced function with optional match-spec.
Used to initiate tracing (both by xprof_core_tracer
and
xprof_core_trace_handler
).
Accepted syntax mode.
Match-specification.
Internal representation of params
Parameter name passed to commands.
Parameters passed to commands.
Unix timestamp.
Functions
Start capturing arguments and return values of function calls that lasted longer than the specified time threshold in ms.
Stop capturing long calls of the given function.
Stop monitoring the specified function (MFA).
Get expansion suggestions for the given possibly incomplete query.
Return list of monitored functions (both as MFA and the original query string).
Return list of called functions for given mfa tuple.
Return list of called functions formatted according to the active syntax mode.
Return captured arguments and return values.
Return captured arguments and return values formatted according to the active syntax mode.
Return metrics gathered for the given function since the given timestamp.
Return metrics gathered for the given function formatted according to the active syntax mode.
Get loaded modules and functions (MFAs) that match the query string.
Get syntax mode.
Return current tracing state.
Start monitoring the specified function (MFA).
Start the specified command.
Start monitoring based on the specified query string.
Start monitoring based on the specified query string with additional parameters.
Remove all record definitions.
(similar to shell command rf('_')
)
Remove selected record definitions.
Set syntax mode explicitely.
Turn on tracing for one or all processes.
Link to this section Types
Command name.
Used by the GUI and xprof_core_tracer
to identify mfas.
Arity of '_'
means all arities.
Similar to type erlang:trace_pattern_mfa()
.
Derived from mfa_id
.
Used to register ets tables and xprof_core_trace_handler
gen_servers.
Traced function with optional match-spec.
Used to initiate tracing (both by xprof_core_tracer
and
xprof_core_trace_handler
).
Accepted syntax mode.
Match-specification.
options()
View Sourceoptions() :: [{mfa, string()} | {atom(), erl_parse:abstract_expr()}].
Internal representation of params
Parameter name passed to commands.
Parameters passed to commands.
Unix timestamp.
Link to this section Functions
capture/3
View Sourcecapture(xprof_core:mfa_id(), non_neg_integer(), non_neg_integer()) -> {ok, CaptureId :: non_neg_integer()} | {error, not_found}.
Start capturing arguments and return values of function calls that lasted longer than the specified time threshold in ms.
capture_stop/1
View Sourcecapture_stop(xprof_core:mfa_id()) -> ok | {error, not_found | not_captured}.
Stop capturing long calls of the given function.
Stop monitoring the specified function (MFA).
Get expansion suggestions for the given possibly incomplete query.
Return list of monitored functions (both as MFA and the original query string).
Return list of called functions for given mfa tuple.
Return list of called functions formatted according to the active syntax mode.
get_captured_data/2
View Sourceget_captured_data(xprof_core:mfa_id(), Offset :: non_neg_integer()) -> {ok, CaptureSpec, [Item]} | {error, not_found} when CaptureSpec :: {CaptureId :: non_neg_integer(), Threshold :: non_neg_integer(), Limit :: non_neg_integer(), HasMore :: boolean()}, Item :: {Index :: non_neg_integer(), CallingProcess :: pid(), CallTimeMs :: non_neg_integer(), Args :: list(), Result :: term()}.
Return captured arguments and return values.
The Offset
argument is the item index last seen by the caller, only items
newer than that will be returned. An offset of 0 will return all data.
The returned HasMore
indicates whether capturing is still ongoing or it has
been stopped either manually or by reaching the limit.
get_captured_data_pp/2
View Sourceget_captured_data_pp(xprof_core:mfa_id(), Offset :: non_neg_integer()) -> {ok, CaptureSpec, Items} | {error, not_found} when CaptureSpec :: {CaptureId :: non_neg_integer(), Threshold :: non_neg_integer(), Limit :: non_neg_integer(), HasMore :: boolean()}, Items :: [{proplists:proplist()}].
Return captured arguments and return values formatted according to the active syntax mode.
Return metrics gathered for the given function since the given timestamp.
Each item contains a timestamp and the corresponding histogram metrics values.
Return metrics gathered for the given function formatted according to the active syntax mode.
Get loaded modules and functions (MFAs) that match the query string.
Used for autocomplete suggestions on the GUI.
Get syntax mode.
If not set explicitely it will be autodetected.
get_trace_status/0
View Sourceget_trace_status() -> {pid() | all, Status :: initialized | running | paused | overflow}.
Return current tracing state.
(The initialized
status is basically the same as paused
, additionally
meaning that no tracing was started yet since xprof was started)
monitor/1
View Sourcemonitor(mfa()) -> ok | {error, Reason :: already_traced | string()}.
Start monitoring the specified function (MFA).
Start the specified command.
monitor_pp/1
View Sourcemonitor_pp(binary()) -> ok | {error, Reason :: already_traced | string()}.
Start monitoring based on the specified query string.
Start monitoring based on the specified query string with additional parameters.
Additional parameters have precedence overthe same keys in the query.
Remove all record definitions.
(similar to shell command rf('_')
)
Remove selected record definitions.
The argument can be a record name or a list of record names. To
remove all record definitions, use '_'
.
(similar to shell command rf/1
)
Return all stored record definitions.
(Similar to shell command rl/0
)
Load record definitions from module.
(similar to shell command rr/1
)
Set syntax mode explicitely.
Turn on tracing for one or all processes.
Additionally tracing can be paused and resumed for the same process specification (one or all) that was given earlier.