diff options
author | Rickard Green <[email protected]> | 2014-08-18 13:03:35 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2014-08-22 15:46:31 +0200 |
commit | 05c183c014c658810fc5a3391429eba9db14ac8f (patch) | |
tree | eadc2fefd919195c0a9c4d0401043c49185d0fbe /erts/emulator/beam/io.c | |
parent | 88bf8f4b00e424c0b850eb5622bd10828e85444a (diff) | |
download | otp-05c183c014c658810fc5a3391429eba9db14ac8f.tar.gz otp-05c183c014c658810fc5a3391429eba9db14ac8f.tar.bz2 otp-05c183c014c658810fc5a3391429eba9db14ac8f.zip |
Ensure "runnable proc" trace messages are not sent out of order
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r-- | erts/emulator/beam/io.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index 0f86d8e41d..50e08de8a4 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -1253,12 +1253,18 @@ try_imm_drv_call(ErtsTryImmDrvCallState *sp) goto locked_fail; } - if (!c_p) reds_left_in = CONTEXT_REDS/10; else { if (IS_TRACED_FL(c_p, F_TRACE_SCHED_PROCS)) trace_virtual_sched(c_p, am_out); + /* + * No status lock held while sending runnable + * proc trace messages. It is however not needed + * in this case, since only this thread can send + * such messages for this process until the process + * has been scheduled out. + */ if (erts_system_profile_flags.runnable_procs && erts_system_profile_flags.exclusive) profile_runnable_proc(c_p, am_inactive); @@ -1319,6 +1325,13 @@ finalize_imm_drv_call(ErtsTryImmDrvCallState *sp) if (IS_TRACED_FL(c_p, F_TRACE_SCHED_PROCS)) trace_virtual_sched(c_p, am_in); + /* + * No status lock held while sending runnable + * proc trace messages. It is however not needed + * in this case, since only this thread can send + * such messages for this process until the process + * has been scheduled out. + */ if (erts_system_profile_flags.runnable_procs && erts_system_profile_flags.exclusive) profile_runnable_proc(c_p, am_active); |