diff options
author | Rickard Green <[email protected]> | 2017-07-10 18:01:42 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-08-28 14:42:49 +0200 |
commit | 4dcb2ae7810a507b701a30072b2f514cab7ebbdb (patch) | |
tree | cd190e1012aef86ece455745b2daa730cedf7a7b /erts/emulator/beam/erl_process.c | |
parent | ca4b42a159c5cc937967c2d04818afa6b8022e0b (diff) | |
download | otp-4dcb2ae7810a507b701a30072b2f514cab7ebbdb.tar.gz otp-4dcb2ae7810a507b701a30072b2f514cab7ebbdb.tar.bz2 otp-4dcb2ae7810a507b701a30072b2f514cab7ebbdb.zip |
Optimize dist entry management
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index 2780c111af..52631d4f0d 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -13508,7 +13508,6 @@ static void doit_exit_monitor(ErtsMonitor *mon, void *vpcontext) } erts_destroy_monitor(rmon); } - erts_deref_dist_entry(dep); } } else { ASSERT(is_pid(mon->u.pid) || is_port(mon->u.pid)); @@ -13748,7 +13747,6 @@ static void doit_exit_link(ErtsLink *lnk, void *vpcontext) erts_smp_de_links_unlock(dep); if (rlnk) erts_destroy_link(rlnk); - erts_deref_dist_entry(dep); } break; @@ -14492,3 +14490,24 @@ erts_dbg_check_halloc_lock(Process *p) return 0; } #endif + +void +erts_debug_later_op_foreach(void (*callback)(void*), + void (*func)(void *, ErtsThrPrgrVal, void *), + void *arg) +{ + int six; + if (!erts_smp_thr_progress_is_blocking()) + ERTS_INTERNAL_ERROR("Not blocking thread progress"); + + for (six = 0; six < erts_no_schedulers; six++) { + ErtsSchedulerData *esdp = &erts_aligned_scheduler_data[six].esd; + ErtsThrPrgrLaterOp *lop = esdp->aux_work_data.later_op.first; + + while (lop) { + if (lop->func == callback) + func(arg, lop->later, lop->data); + lop = lop->next; + } + } +} |