aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_trace.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-02-08 18:31:43 +0100
committerLukas Larsson <[email protected]>2016-04-15 15:06:53 +0200
commit6cb6b59cd4cd5bd4383053e12ae8ab192711c827 (patch)
tree8fae3033130b776df85625accb0cd4328d72bde3 /erts/emulator/beam/erl_trace.h
parent37092dab15448ef6a078800e3ff0cc41880ea765 (diff)
downloadotp-6cb6b59cd4cd5bd4383053e12ae8ab192711c827.tar.gz
otp-6cb6b59cd4cd5bd4383053e12ae8ab192711c827.tar.bz2
otp-6cb6b59cd4cd5bd4383053e12ae8ab192711c827.zip
erts: Extend process and port tracing
This commit completes the tracing for processes so that all messages sent by a process (via nifs or otherwise) will be traced. The commit also adds tracing of all types of events from ports. When enabling tracing using erlang:trace, the 'all' flag now also enables tracing on all ports. OTP-13496
Diffstat (limited to 'erts/emulator/beam/erl_trace.h')
-rw-r--r--erts/emulator/beam/erl_trace.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_trace.h b/erts/emulator/beam/erl_trace.h
index 61f82a6b93..0fefd6f70d 100644
--- a/erts/emulator/beam/erl_trace.h
+++ b/erts/emulator/beam/erl_trace.h
@@ -68,9 +68,12 @@ ErtsTracer erts_set_system_seq_tracer(Process *c_p,
ErtsProcLocks c_p_locks,
ErtsTracer new);
ErtsTracer erts_get_system_seq_tracer(void);
-void erts_change_default_tracing(int setflags, Uint *flagsp,
- const ErtsTracer tracerp);
-void erts_get_default_tracing(Uint *flagsp, ErtsTracer *tracerp);
+void erts_change_default_proc_tracing(int setflags, Uint flagsp,
+ const ErtsTracer tracerp);
+void erts_get_default_proc_tracing(Uint *flagsp, ErtsTracer *tracerp);
+void erts_change_default_port_tracing(int setflags, Uint flagsp,
+ const ErtsTracer tracerp);
+void erts_get_default_port_tracing(Uint *flagsp, ErtsTracer *tracerp);
void erts_set_system_monitor(Eterm monitor);
Eterm erts_get_system_monitor(void);
int erts_is_tracer_valid(Process* p);
@@ -106,6 +109,9 @@ void trace_sched_ports(Port *pp, Eterm);
void trace_sched_ports_where(Port *pp, Eterm, Eterm);
void trace_port(Port *, Eterm what, Eterm data);
void trace_port_open(Port *, Eterm calling_pid, Eterm drv_name);
+void trace_port_receive(Port *, Eterm calling_pid, Eterm tag, ...);
+void trace_port_send(Port *, Eterm to, Eterm msg, int exists);
+void trace_port_send_binary(Port *, Eterm to, Eterm what, char *bin, Sint sz);
/* system_profile */
void erts_set_system_profile(Eterm profile);
@@ -177,7 +183,7 @@ int erts_finish_breakpointing(void);
/* Nif tracer functions */
int erts_is_tracer_proc_enabled(Process *c_p, ErtsProcLocks c_p_locks,
- ErtsPTabElementCommon *t_p);
+ ErtsPTabElementCommon *t_p, Eterm type);
int erts_is_tracer_enabled(Process *c_p, const ErtsTracer tracer);
Eterm erts_tracer_to_term(Process *p, ErtsTracer tracer);
ErtsTracer erts_term_to_tracer(Eterm prefix, Eterm term);
@@ -210,6 +216,7 @@ ERTS_DECLARE_DUMMY(erts_tracer_nil) = NIL;
#define ERTS_TRACER_PROC_IS_ENABLED(PROC) \
(!ERTS_TRACER_IS_NIL(ERTS_TRACER(PROC)) \
- && erts_is_tracer_proc_enabled(PROC, ERTS_PROC_LOCK_MAIN, &(PROC)->common))
+ && erts_is_tracer_proc_enabled(PROC, ERTS_PROC_LOCK_MAIN, \
+ &(PROC)->common, am_trace_status))
#endif /* ERL_TRACE_H__ */