aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-04-05 10:21:57 +0200
committerRickard Green <[email protected]>2018-04-05 10:21:57 +0200
commit0bb8aac23842e04e522cd98ed397339675a41ad8 (patch)
treeb88ad76f5c97669925a244b337f50d2e9993faff
parent1c834990a92943c0fcd1d47610767806ab4660e1 (diff)
downloadotp-0bb8aac23842e04e522cd98ed397339675a41ad8.tar.gz
otp-0bb8aac23842e04e522cd98ed397339675a41ad8.tar.bz2
otp-0bb8aac23842e04e522cd98ed397339675a41ad8.zip
Fix seq trace
-rw-r--r--erts/emulator/beam/erl_proc_sig_queue.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/erts/emulator/beam/erl_proc_sig_queue.c b/erts/emulator/beam/erl_proc_sig_queue.c
index 99d20e9242..c2da73a092 100644
--- a/erts/emulator/beam/erl_proc_sig_queue.c
+++ b/erts/emulator/beam/erl_proc_sig_queue.c
@@ -723,7 +723,7 @@ erts_proc_sig_fetch(Process *proc)
ERTS_HDBG_CHECK_SIGNAL_PRIV_QUEUE(proc);
}
-void do_seq_trace_output(Eterm to, Eterm token, Eterm msg);
+static void do_seq_trace_output(Eterm to, Eterm token, Eterm msg);
static void
send_gen_exit_signal(Process *c_p, Eterm from_tag,
@@ -869,7 +869,7 @@ send_gen_exit_signal(Process *c_p, Eterm from_tag,
}
}
-void
+static void
do_seq_trace_output(Eterm to, Eterm token, Eterm msg)
{
/*
@@ -887,15 +887,17 @@ do_seq_trace_output(Eterm to, Eterm token, Eterm msg)
else
rp = erts_proc_lookup_raw_inc_refc(to);
- erts_proc_lock(rp, ERTS_PROC_LOCK_MSGQ);
+ if (rp) {
+ erts_proc_lock(rp, ERTS_PROC_LOCK_MSGQ);
- if (!ERTS_PROC_IS_EXITING(rp))
- seq_trace_output(token, msg, SEQ_TRACE_SEND, to, rp);
+ if (!ERTS_PROC_IS_EXITING(rp))
+ seq_trace_output(token, msg, SEQ_TRACE_SEND, to, rp);
- erts_proc_unlock(rp, ERTS_PROC_LOCK_MSGQ);
+ erts_proc_unlock(rp, ERTS_PROC_LOCK_MSGQ);
- if (!is_normal_sched)
- erts_proc_dec_refc(rp);
+ if (!is_normal_sched)
+ erts_proc_dec_refc(rp);
+ }
}
void