diff options
author | Jovi Zhang <[email protected]> | 2011-12-09 05:46:45 +0800 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-12-20 11:32:25 +0100 |
commit | 481c7b92d3a25e7c7625665ab6c554c154b5502b (patch) | |
tree | 5dcb459e1c9269002f251e040fc74f261cd355f8 /erts/emulator/beam | |
parent | 2799d29ad1123b5128498ea89d2ff5678e59b545 (diff) | |
download | otp-481c7b92d3a25e7c7625665ab6c554c154b5502b.tar.gz otp-481c7b92d3a25e7c7625665ab6c554c154b5502b.tar.bz2 otp-481c7b92d3a25e7c7625665ab6c554c154b5502b.zip |
erts: reduce smp locking time range in erts_garbage_collect
get_now should be use out of process status locking, then
it can reduce smp locking time range in here.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index eb2b945877..bcda3bf056 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); |