From 628aa0e68a0632905a28f66e71ae10fb15f12fbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Tue, 2 Feb 2010 15:28:11 +0100 Subject: 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. --- erts/emulator/beam/erl_db.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'erts/emulator/beam/erl_db.c') diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c index b02150008f..e07a76835b 100644 --- a/erts/emulator/beam/erl_db.c +++ b/erts/emulator/beam/erl_db.c @@ -261,13 +261,8 @@ static ERTS_INLINE void db_init_lock(DbTable* tb, char *rwname, char* fixname) erts_refc_init(&tb->common.ref, 1); erts_refc_init(&tb->common.fixref, 0); #ifdef ERTS_SMP -# ifdef ERTS_ENABLE_LOCK_COUNT erts_smp_rwmtx_init_x(&tb->common.rwlock, rwname, tb->common.the_name); erts_smp_mtx_init_x(&tb->common.fixlock, fixname, tb->common.the_name); -# else - erts_smp_rwmtx_init(&tb->common.rwlock, rwname); - erts_smp_mtx_init(&tb->common.fixlock, fixname); -# endif tb->common.is_thread_safe = !(tb->common.status & DB_FINE_LOCKED); #endif } @@ -2597,19 +2592,11 @@ void init_db(void) #ifdef ERTS_SMP for (i=0; i