aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorHenrik Nord <henrik@erlang.org>2012-02-14 10:27:21 +0100
committerHenrik Nord <henrik@erlang.org>2012-02-14 10:27:33 +0100
commite89d1abc81d1dbbc5613668c74f0cd50c887bc33 (patch)
tree5796138e252dffc7a30d650349b8b2e06533a456 /erts/emulator/beam
parentc58d64db07921970e539f346dc65f13d5f3bc975 (diff)
parent481c7b92d3a25e7c7625665ab6c554c154b5502b (diff)
downloadotp-e89d1abc81d1dbbc5613668c74f0cd50c887bc33.tar.gz
otp-e89d1abc81d1dbbc5613668c74f0cd50c887bc33.tar.bz2
otp-e89d1abc81d1dbbc5613668c74f0cd50c887bc33.zip
Merge branch 'jz/reduce-smp-locking-time-range' into maint
* jz/reduce-smp-locking-time-range: erts: reduce smp locking time range in erts_garbage_collect OTP-9912
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_gc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 9590aa4a74..bde87b8346 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -357,10 +357,11 @@ erts_garbage_collect(Process* p, int need, Eterm* objv, int nobj)
erts_smp_proc_lock(p, ERTS_PROC_LOCK_STATUS);
p->gcstatus = p->status;
p->status = P_GARBING;
+ erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
+
if (erts_system_monitor_long_gc != 0) {
get_now(&ms1, &s1, &us1);
}
- erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
ERTS_CHK_OFFHEAP(p);