Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
7802-erts-Add-behavior-attributes-to-erl_tracer...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 7802-erts-Add-behavior-attributes-to-erl_tracer.patch of Package erlang
From ee8806e836c82f51583d9237f0a0ad91e46c642f Mon Sep 17 00:00:00 2001 From: Lukas Larsson <lukas@erlang.org> Date: Wed, 27 Sep 2023 14:45:48 +0200 Subject: [PATCH 02/10] erts: Add behavior attributes to erl_tracer --- erts/preloaded/ebin/erl_tracer.beam | Bin 2464 -> 5212 bytes erts/preloaded/src/erl_tracer.erl | 133 ++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/erts/preloaded/src/erl_tracer.erl b/erts/preloaded/src/erl_tracer.erl index 20416d02c2..447ee939e9 100644 --- a/erts/preloaded/src/erl_tracer.erl +++ b/erts/preloaded/src/erl_tracer.erl @@ -34,6 +34,139 @@ monotonic | strict_monotonic }. -type tracer_state() :: term(). +-callback enabled(TraceTag, TracerState, Tracee) -> Result when + TraceTag :: trace_tag() | trace_status, + TracerState :: term(), + Tracee :: tracee(), + Result :: trace | discard | remove. +-callback enabled_call(TraceTag, TracerState, Tracee) -> Result when + TraceTag :: trace_tag_call(), + TracerState :: term(), + Tracee :: tracee(), + Result :: trace | discard | remove. +-callback enabled_garbage_collection(TraceTag, TracerState, Tracee) -> Result when + TraceTag :: trace_tag_gc(), + TracerState :: term(), + Tracee :: tracee(), + Result :: trace | discard | remove. +-callback enabled_ports(TraceTag, TracerState, Tracee) -> Result when + TraceTag :: trace_tag_ports(), + TracerState :: term(), + Tracee :: tracee(), + Result :: trace | discard | remove. +-callback enabled_procs(TraceTag, TracerState, Tracee) -> Result when + TraceTag :: trace_tag_procs(), + TracerState :: term(), + Tracee :: tracee(), + Result :: trace | discard | remove. +-callback enabled_receive(TraceTag, TracerState, Tracee) -> Result when + TraceTag :: trace_tag_receive(), + TracerState :: term(), + Tracee :: tracee(), + Result :: trace | discard | remove. +-callback enabled_running_ports(TraceTag, TracerState, Tracee) -> Result when + TraceTag :: trace_tag_running_ports(), + TracerState :: term(), + Tracee :: tracee(), + Result :: trace | discard | remove. +-callback enabled_running_procs(TraceTag, TracerState, Tracee) -> Result when + TraceTag :: trace_tag_running_procs(), + TracerState :: term(), + Tracee :: tracee(), + Result :: trace | discard | remove. +-callback enabled_send(TraceTag, TracerState, Tracee) -> Result when + TraceTag :: trace_tag_send(), + TracerState :: term(), + Tracee :: tracee(), + Result :: trace | discard | remove. + +-callback trace(seq_trace, TracerState, Label, SeqTraceInfo, Opts) -> Result when + TracerState :: term(), + Label :: term(), + SeqTraceInfo :: term(), + Opts :: trace_opts(), + Result :: ok; + (TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result when + TraceTag :: trace_tag(), + TracerState :: term(), + Tracee :: tracee(), + TraceTerm :: term(), + Opts :: trace_opts(), + Result :: ok. +-callback trace_call(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result when + TraceTag :: trace_tag_call(), + TracerState :: term(), + Tracee :: tracee(), + TraceTerm :: term(), + Opts :: trace_opts(), + Result :: ok. +-callback trace_garbage_collection(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result when + TraceTag :: trace_tag_gc(), + TracerState :: term(), + Tracee :: tracee(), + TraceTerm :: term(), + Opts :: trace_opts(), + Result :: ok. +-callback trace_ports(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result when + TraceTag :: trace_tag(), + TracerState :: term(), + Tracee :: tracee(), + TraceTerm :: term(), + Opts :: trace_opts(), + Result :: ok. +-callback trace_procs(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result when + TraceTag :: trace_tag(), + TracerState :: term(), + Tracee :: tracee(), + TraceTerm :: term(), + Opts :: trace_opts(), + Result :: ok. +-callback trace_receive(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result when + TraceTag :: trace_tag_receive(), + TracerState :: term(), + Tracee :: tracee(), + TraceTerm :: term(), + Opts :: trace_opts(), + Result :: ok. +-callback trace_running_ports(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result when + TraceTag :: trace_tag_running_ports(), + TracerState :: term(), + Tracee :: tracee(), + TraceTerm :: term(), + Opts :: trace_opts(), + Result :: ok. +-callback trace_running_procs(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result when + TraceTag :: trace_tag_running_procs(), + TracerState :: term(), + Tracee :: tracee(), + TraceTerm :: term(), + Opts :: trace_opts(), + Result :: ok. +-callback trace_send(TraceTag, TracerState, Tracee, TraceTerm, Opts) -> Result when + TraceTag :: trace_tag_send(), + TracerState :: term(), + Tracee :: tracee(), + TraceTerm :: term(), + Opts :: trace_opts(), + Result :: ok. + +-optional_callbacks( + [enabled_call/3, + enabled_garbage_collection/3, + enabled_ports/3, + enabled_procs/3, + enabled_receive/3, + enabled_running_ports/3, + enabled_send/3, + trace_call/5, + trace_garbage_collection/5, + trace_ports/5, + trace_procs/5, + trace_receive/5, + trace_running_ports/5, + trace_send/5 + ]). + on_load() -> case erlang:load_nif(atom_to_list(?MODULE), 0) of ok -> ok -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor