aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_hash.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_db_hash.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_db_hash.c')
-rw-r--r--erts/emulator/beam/erl_db_hash.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_db_hash.c b/erts/emulator/beam/erl_db_hash.c
index dea45053df..dbe13204d9 100644
--- a/erts/emulator/beam/erl_db_hash.c
+++ b/erts/emulator/beam/erl_db_hash.c
@@ -628,11 +628,7 @@ int db_create_hash(Process *p, DbTable *tbl)
(DbTable *) tb,
sizeof(DbTableHashFineLocks));
for (i=0; i<DB_HASH_LOCK_CNT; ++i) {
- #ifdef ERTS_ENABLE_LOCK_COUNT
- erts_rwmtx_init_x(&tb->locks->lck_vec[i].lck, "db_hash_slot", tb->common.the_name);
- #else
- erts_rwmtx_init(&tb->locks->lck_vec[i].lck, "db_hash_slot");
- #endif
+ erts_rwmtx_init_x(&tb->locks->lck_vec[i].lck, "db_hash_slot", make_small(i));
}
/* This important property is needed to guarantee that the buckets
* involved in a grow/shrink operation it protected by the same lock: