Copyright © (C) 2019, Maxim Fedorov
Behaviours: gen_server.
Authors: Maxim Fedorov (maximfca@gmail.com).
caller() = {CallerMod::module(), CallerFun::atom(), CallerArity::non_neg_integer(), CallerCount::pos_integer()}
module_time() = {Module::module(), [{Fun::atom(), Arity::non_neg_integer(), Count::non_neg_integer(), TimeMs::non_neg_integer()}]}
module_trace() = {Module::module(), [{Fun::atom(), Arity::non_neg_integer(), Count::non_neg_integer(), TimeMs::non_neg_integer(), [caller()]}]}
pid_port_spec() = pid() | port() | all | processes | ports | existing | existing_processes | existing_ports | new | new_processes | new_ports
progress_callback() = silent | {module(), atom(), term()}
collect/0 | |
collect/1 | |
format/0 | |
format/1 | |
format_callgrind/1 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | |
record/2 | Traces calls to MFA and records arguments passed. |
sample/4 | Records samples of calls to any function in MFA list passed. |
start/0 | Starts call tracing profiler outside of supervision tree. |
start_link/0 | Starts call tracing profiler as a part of supervision tree. |
start_trace/0 | |
start_trace/1 | |
stop/0 | Stops call tracing profiler. |
stop/1 | |
stop_trace/0 | |
terminate/2 | |
time/1 | Performs call time tracing for all processes, all modules and all functions. |
time/4 | Performs call time tracing for specific processes, modules or functions. |
trace/1 | Performs call time tracing for all processes, all modules and all functions, and also collects information about the caller. |
trace/4 | Performs call time tracing, and collects information about the caller. |
collect() -> any()
collect(Options0) -> any()
format() -> any()
format(Options0) -> any()
format_callgrind(Data) -> any()
handle_cast(Request, State) -> any()
handle_info(Info::timeout() | term(), State::#state{tracing = boolean(), tracer = undefined | pid(), call_time = undefined | [{module(), [{{Fun::atom(), non_neg_integer()}, Count::non_neg_integer(), Time::non_neg_integer()}]}], samples = undefined | {[{module(), atom(), non_neg_integer(), term()}], term()}, traced_procs = term()}) -> {noreply, NewState::#state{tracing = boolean(), tracer = undefined | pid(), call_time = undefined | [{module(), [{{Fun::atom(), non_neg_integer()}, Count::non_neg_integer(), Time::non_neg_integer()}]}], samples = undefined | {[{module(), atom(), non_neg_integer(), term()}], term()}, traced_procs = term()}} | {noreply, NewState::#state{tracing = boolean(), tracer = undefined | pid(), call_time = undefined | [{module(), [{{Fun::atom(), non_neg_integer()}, Count::non_neg_integer(), Time::non_neg_integer()}]}], samples = undefined | {[{module(), atom(), non_neg_integer(), term()}], term()}, traced_procs = term()}, timeout() | hibernate} | {stop, Reason::term(), NewState::#state{tracing = boolean(), tracer = undefined | pid(), call_time = undefined | [{module(), [{{Fun::atom(), non_neg_integer()}, Count::non_neg_integer(), Time::non_neg_integer()}]}], samples = undefined | {[{module(), atom(), non_neg_integer(), term()}], term()}, traced_procs = term()}}
init(Args::term()) -> {ok, State::#state{tracing = boolean(), tracer = undefined | pid(), call_time = undefined | [{module(), [{{Fun::atom(), non_neg_integer()}, Count::non_neg_integer(), Time::non_neg_integer()}]}], samples = undefined | {[{module(), atom(), non_neg_integer(), term()}], term()}, traced_procs = term()}}
record(TimeMs::non_neg_integer(), MFA::{Mod::module() | '_', Fun::atom() | '_', Arity::non_neg_integer() | '_'}) -> [[term()]] | not_found
Traces calls to MFA and records arguments passed.
sample(PidPortSpec, TimeMs, MFAList, Progress) -> any()
Records samples of calls to any function in MFA list passed.
start() -> {ok, Pid::pid()} | ignore | {error, Reason::term()}
Starts call tracing profiler outside of supervision tree.
start_link() -> {ok, Pid::pid()} | ignore | {error, Reason::term()}
Starts call tracing profiler as a part of supervision tree
start_trace() -> any()
start_trace(Options0) -> any()
stop() -> any()
Stops call tracing profiler
stop(Timeout::integer() | infinity) -> ok
stop_trace() -> any()
terminate(Reason::normal | shutdown | {shutdown, term()} | term(), State::#state{tracing = boolean(), tracer = undefined | pid(), call_time = undefined | [{module(), [{{Fun::atom(), non_neg_integer()}, Count::non_neg_integer(), Time::non_neg_integer()}]}], samples = undefined | {[{module(), atom(), non_neg_integer(), term()}], term()}, traced_procs = term()}) -> term()
time(TimeMs::non_neg_integer()) -> [module_time()]
TimeMs: milliseconds to wait.
Does not collect any call stacks. Fast enough to be used even on highly-loaded
systems running thousands of processes.
Performs call time tracing for all processes, all modules and all functions.
See also: erlang:trace/3.
time(TimeMs::non_neg_integer(), PidPortSpec::pid_port_spec(), MFAList::erlang:trace_pattern_mfa(), Progress::progress_callback()) -> [module_time()]
Performs call time tracing for specific processes, modules or functions. Accepts a progress report callback.
trace(TimeMs::non_neg_integer()) -> [module_trace()]
TimeMs: milliseconds to wait
Performs call time tracing for all processes, all modules and all functions, and also collects information about the caller. This is considerably slower than using time/1, because actual tracing is being used.
trace(TimeMs::non_neg_integer(), PidPortSpec::pid_port_spec(), MFAList::erlang:trace_pattern_mfa(), Progress::progress_callback()) -> [module_trace()]
Performs call time tracing, and collects information about the caller.
Generated by EDoc