aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2010-02-02 15:28:11 +0100
committerBjörn Gustavsson <[email protected]>2010-02-08 18:05:13 +0100
commit628aa0e68a0632905a28f66e71ae10fb15f12fbe (patch)
tree6b0729873a43f1e99354013a06955624ee2c93b1 /erts/emulator/beam/erl_process.c
parentcfff4e99860a4d21a42645b20f76188dde704e54 (diff)
downloadotp-628aa0e68a0632905a28f66e71ae10fb15f12fbe.tar.gz
otp-628aa0e68a0632905a28f66e71ae10fb15f12fbe.tar.bz2
otp-628aa0e68a0632905a28f66e71ae10fb15f12fbe.zip
Add runtime option to enable/disable lcnt stats
Add erts_debug:lock_counters({copy_save, bool()}). This option enables or disables statistics saving for destroyed processes and ets-tables. Enabling this might consume a lot of memory. Add id-numbering for lock classes which is otherwise undefined.
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r--erts/emulator/beam/erl_process.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 2789691c55..bf08bc7a86 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -2095,7 +2095,11 @@ erts_init_scheduling(int mrq, int no_schedulers, int no_schedulers_online)
rq->ix = ix;
erts_smp_atomic_init(&rq->info_flags, ERTS_RUNQ_IFLG_NONEMPTY);
- erts_smp_mtx_init(&rq->mtx, "run_queue");
+ /* make sure that the "extra" id correponds to the schedulers
+ * id if the esdp->no <-> ix+1 mapping change.
+ */
+
+ erts_smp_mtx_init_x(&rq->mtx, "run_queue", make_small(ix + 1));
erts_smp_cnd_init(&rq->cnd);
erts_smp_atomic_init(&rq->spin_waiter, 0);