diff options
author | Rickard Green <[email protected]> | 2012-08-03 15:06:21 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-08-03 15:06:21 +0200 |
commit | e76262ea8ac6986a497bb1e7fbf5e75668027473 (patch) | |
tree | 7128f0a39f6a996f7abd67e16fa3167bdc28e116 /erts/emulator/beam/erl_process.c | |
parent | ee51d735f05514a784d808be9604703d70561731 (diff) | |
parent | ff1a1e3c6f9a233b880e9d359a1c50e55d7c812f (diff) | |
download | otp-e76262ea8ac6986a497bb1e7fbf5e75668027473.tar.gz otp-e76262ea8ac6986a497bb1e7fbf5e75668027473.tar.bz2 otp-e76262ea8ac6986a497bb1e7fbf5e75668027473.zip |
Merge branch 'rickard/proc-sched/OTP-9892'
* rickard/proc-sched/OTP-9892:
Read message queue lengths while having lock
Remove development debug code
Fix bug scheduling free processes
Conflicts:
erts/emulator/beam/erl_message.c
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index afd2ddc69d..8153cdce1c 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -5001,7 +5001,9 @@ schedule_process(Process *p, erts_aint32_t state, int active_enq) while (1) { erts_aint32_t e; n = e = a; - ASSERT(!(a & ERTS_PSFLG_FREE)); + + if (a & ERTS_PSFLG_FREE) + return; /* We don't want to schedule free processes... */ n |= ERTS_PSFLG_ACTIVE; if (!(a & (ERTS_PSFLG_SUSPENDED|ERTS_PSFLG_RUNNING))) n |= ERTS_PSFLG_IN_RUNQ; @@ -5012,23 +5014,13 @@ schedule_process(Process *p, erts_aint32_t state, int active_enq) return; /* Someone else activated process ... */ } -#ifdef RRR_DEBUG - if (active_enq) - erts_fprintf(stderr, "! state=0x%x\n", n); -#endif - if (erts_system_profile_flags.runnable_procs && !(a & (ERTS_PSFLG_ACTIVE|ERTS_PSFLG_SUSPENDED))) { profile_runnable_proc(p, am_active); } - if ((n & ERTS_PSFLG_IN_RUNQ) && !(a & ERTS_PSFLG_IN_RUNQ)) { -#ifdef RRR_DEBUG - if (active_enq) - erts_fprintf(stderr, "-->\n"); -#endif + if ((n & ERTS_PSFLG_IN_RUNQ) && !(a & ERTS_PSFLG_IN_RUNQ)) add2runq(p, n); - } } void @@ -5098,9 +5090,6 @@ resume_process(Process *p) state = erts_smp_atomic32_read_band_mb(&p->state, ~ERTS_PSFLG_SUSPENDED); state &= ~ERTS_PSFLG_SUSPENDED; -#ifdef RRR_DEBUG - erts_fprintf(stderr, "%T - state=0x%x\n", p->id, state); -#endif if ((state & (ERTS_PSFLG_EXITING | ERTS_PSFLG_ACTIVE | ERTS_PSFLG_IN_RUNQ |