aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-02-10 13:03:54 +0000
committerErlang/OTP <[email protected]>2010-02-10 13:03:54 +0000
commitada6afd00530d6569c41741cfd9d63311ff60f25 (patch)
tree3ff92e054e2babf7478fa0a96e7d82fd42ab5595 /erts/emulator/beam/erl_process.c
parente7d6097b0f015d5a489ea3a3ad71e064a87c0576 (diff)
parent9a22cca549f88f955163e165b8849a6129925e8b (diff)
downloadotp-ada6afd00530d6569c41741cfd9d63311ff60f25.tar.gz
otp-ada6afd00530d6569c41741cfd9d63311ff60f25.tar.bz2
otp-ada6afd00530d6569c41741cfd9d63311ff60f25.zip
Merge branch 'egil/lcnt' into ccase/r13b04_dev
* egil/lcnt: Add test suite for lcnt in tools Add lcnt:rt_opt/1 bindings to erts_debug Add runtime option to enable/disable lcnt stats Add auto width on string output Add lcnt documentation Add lock profiling tool OTP-8424 Add lock profiling tool. The Lock profiling tool, lcnt, can make use of the internal lock statistics when the runtime system is built with this feature enabled. This provides a mechanism to examine potential lock bottlenecks within the runtime itself. - 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);