aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_trace.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-08-29 18:39:21 +0200
committerRickard Green <[email protected]>2016-08-29 18:39:21 +0200
commitb815d568e2e43d96698dbb8de6b993d55c1b14a0 (patch)
treea2ecbfa7529ea14fb6376882c8bcbcbfc36509b8 /erts/emulator/beam/erl_trace.c
parent5006f1e0c45d4e9b888b2c0ca48130049d33074c (diff)
parentc429c3d042ba274d4225a6d79b2f1df8cfd19983 (diff)
downloadotp-b815d568e2e43d96698dbb8de6b993d55c1b14a0.tar.gz
otp-b815d568e2e43d96698dbb8de6b993d55c1b14a0.tar.bz2
otp-b815d568e2e43d96698dbb8de6b993d55c1b14a0.zip
Merge branch 'rickard/ds-trace/OTP-13822' into maint
* rickard/ds-trace/OTP-13822: Fix tracing of processes executing dirty
Diffstat (limited to 'erts/emulator/beam/erl_trace.c')
-rw-r--r--erts/emulator/beam/erl_trace.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c
index c4396488f5..f4d92564c1 100644
--- a/erts/emulator/beam/erl_trace.c
+++ b/erts/emulator/beam/erl_trace.c
@@ -813,6 +813,9 @@ trace_send(Process *p, Eterm to, Eterm msg)
ErtsTracerNif *tnif = NULL;
ErtsTracingEvent* te;
Eterm pam_result;
+#ifdef ERTS_SMP
+ ErtsThrPrgrDelayHandle dhndl;
+#endif
ASSERT(ARE_TRACE_FLAGS_ON(p, F_TRACE_SEND));
@@ -837,6 +840,10 @@ trace_send(Process *p, Eterm to, Eterm msg)
} else
pam_result = am_true;
+#ifdef ERTS_SMP
+ dhndl = erts_thr_progress_unmanaged_delay();
+#endif
+
if (is_internal_pid(to)) {
if (!erts_proc_lookup(to))
goto send_to_non_existing_process;
@@ -852,6 +859,11 @@ trace_send(Process *p, Eterm to, Eterm msg)
send_to_tracer_nif(p, &p->common, p->common.id, tnif, TRACE_FUN_T_SEND,
operation, msg, to, pam_result);
}
+
+#ifdef ERTS_SMP
+ erts_thr_progress_unmanaged_continue(dhndl);
+#endif
+
erts_match_set_release_result_trace(p, pam_result);
}
@@ -1167,6 +1179,8 @@ erts_call_trace(Process* p, BeamInstr mfa[3], Binary *match_spec,
Eterm transformed_args[MAX_ARG];
ErtsTracer pre_ms_tracer = erts_tracer_nil;
+ ERTS_SMP_LC_ASSERT(erts_proc_lc_my_proc_locks(p) & ERTS_PROC_LOCK_MAIN);
+
ASSERT(tracer);
if (ERTS_TRACER_COMPARE(*tracer, erts_tracer_true)) {
/* Breakpoint trace enabled without specifying tracer =>