diff options
author | Rickard Green <[email protected]> | 2016-08-25 15:34:43 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-08-29 16:26:25 +0200 |
commit | c429c3d042ba274d4225a6d79b2f1df8cfd19983 (patch) | |
tree | e0a4ecdbe38eaf3ed26cb589ab67bb7965c6ffc7 /erts/emulator/beam/erl_trace.c | |
parent | 0e04e76df2ea71e2e2e116afef04c497d84b1024 (diff) | |
download | otp-c429c3d042ba274d4225a6d79b2f1df8cfd19983.tar.gz otp-c429c3d042ba274d4225a6d79b2f1df8cfd19983.tar.bz2 otp-c429c3d042ba274d4225a6d79b2f1df8cfd19983.zip |
Fix tracing of processes executing dirty
Diffstat (limited to 'erts/emulator/beam/erl_trace.c')
-rw-r--r-- | erts/emulator/beam/erl_trace.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c index 4cf38bf894..48836be8eb 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 => |