aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_gc.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-04-12 16:55:58 +0200
committerRickard Green <[email protected]>2018-05-16 13:28:38 +0200
commit08873ec673ef223a4e0c9826b0370d80bb6aad24 (patch)
tree3282e1d43d2695c353c93eb4db08373e5d06fc9f /erts/emulator/beam/erl_gc.c
parent9be1ed4b7847044698563392b3d7b53565ea0873 (diff)
downloadotp-08873ec673ef223a4e0c9826b0370d80bb6aad24.tar.gz
otp-08873ec673ef223a4e0c9826b0370d80bb6aad24.tar.bz2
otp-08873ec673ef223a4e0c9826b0370d80bb6aad24.zip
Teach HiPE to yield from receive
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r--erts/emulator/beam/erl_gc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 0692cea0ee..a65dbbf42b 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -413,21 +413,20 @@ erts_gc_after_bif_call_lhf(Process* p, ErlHeapFragment *live_hf_end,
{
int cost;
- if (p->flags & F_HIBERNATE_SCHED) {
+ if (p->flags & (F_HIBERNATE_SCHED|F_HIPE_RECV_LOCKED)) {
/*
* We just hibernated. We do *not* want to mess
* up the hibernation by an ordinary GC...
+ *
+ * OR
+ *
+ * We left a receive in HiPE with message
+ * queue lock locked, and we do not want to
+ * do a GC with message queue locked...
*/
return result;
}
-#ifdef HIPE
- if (p->hipe_smp.have_receive_locks) {
- /* Do not want to GC with message queue locked... */
- return result;
- }
-#endif
-
if (!p->mbuf) {
/* Must have GC:d in BIF call... invalidate live_hf_end */
live_hf_end = ERTS_INVALID_HFRAG_PTR;