summaryrefslogtreecommitdiff
path: root/storage/innobase/include/sync0rw.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-02-28 12:42:45 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-02-28 12:42:45 +0200
commit6cf29ab0df3131d097b9f811d8a887b54d1afca5 (patch)
tree2236238339cff253472045674efc2e0211ebff52 /storage/innobase/include/sync0rw.h
parentc1bcb2055ebab1e9d3e0e99b3626f78d477badd1 (diff)
downloadmariadb-git-6cf29ab0df3131d097b9f811d8a887b54d1afca5.tar.gz
MDEV-12146 Deprecate and remove innodb_instrument_semaphores
MDEV-7618 introduced configuration parameter innodb_instrument_semaphores in MariaDB Server 10.1. The parameter seems to only affect the rw-lock X-latch acquisition. Extra fields are added to rw_lock_t to remember one X-latch holder or waiter. These fields are not being consulted or reported anywhere. This is basically only adding code bloat. If the intention is to debug hangs or deadlocks, we have better tools for that in the debug server, and for the non-debug server, core dumps can reveal a lot. For example, the mini-transaction memo records the currently held buffer block or index rw-locks, to be released at mtr_t::commit(). The configuration parameter innodb_instrument_semaphores will be deprecated in 10.2.5 and removed in 10.3.0. rw_lock_t: Remove the members lock_name, file_name, line, thread_id which did not affect any output.
Diffstat (limited to 'storage/innobase/include/sync0rw.h')
-rw-r--r--storage/innobase/include/sync0rw.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0rw.h
index 9a9da2d145a..79532790f76 100644
--- a/storage/innobase/include/sync0rw.h
+++ b/storage/innobase/include/sync0rw.h
@@ -2,6 +2,7 @@
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
+Copyright (c) 2017, MariaDB Corporation. All Rights Reserved.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -38,9 +39,6 @@ Created 9/11/1995 Heikki Tuuri
#include "os0event.h"
#include "ut0mutex.h"
-/** Enable semaphore request instrumentation */
-extern my_bool srv_instrument_semaphores;
-
/** Counters for RW locks. */
struct rw_lock_stats_t {
typedef ib_counter_t<int64_t, IB_N_SLOTS> int64_counter_t;
@@ -127,10 +125,10 @@ if MySQL performance schema is enabled and "UNIV_PFS_RWLOCK" is
defined, the rwlock are instrumented with performance schema probes. */
# ifdef UNIV_DEBUG
# define rw_lock_create(K, L, level) \
- rw_lock_create_func((L), (level), #L, __FILE__, __LINE__)
+ rw_lock_create_func((L), (level), __FILE__, __LINE__)
# else /* UNIV_DEBUG */
# define rw_lock_create(K, L, level) \
- rw_lock_create_func((L), #L, __FILE__, __LINE__)
+ rw_lock_create_func((L), __FILE__, __LINE__)
# endif /* UNIV_DEBUG */
/**************************************************************//**
@@ -215,10 +213,10 @@ unlocking, not the corresponding function. */
/* Following macros point to Performance Schema instrumented functions. */
# ifdef UNIV_DEBUG
# define rw_lock_create(K, L, level) \
- pfs_rw_lock_create_func((K), (L), (level), #L, __FILE__, __LINE__)
+ pfs_rw_lock_create_func((K), (L), (level), __FILE__, __LINE__)
# else /* UNIV_DEBUG */
# define rw_lock_create(K, L, level) \
- pfs_rw_lock_create_func((K), (L), #L, __FILE__, __LINE__)
+ pfs_rw_lock_create_func((K), (L), __FILE__, __LINE__)
# endif /* UNIV_DEBUG */
/******************************************************************
@@ -303,7 +301,6 @@ rw_lock_create_func(
#ifdef UNIV_DEBUG
latch_level_t level, /*!< in: level */
#endif /* UNIV_DEBUG */
- const char* cmutex_name, /*!< in: mutex name */
const char* cfile_name, /*!< in: file name where created */
ulint cline); /*!< in: file line where created */
/******************************************************************//**
@@ -637,11 +634,6 @@ struct rw_lock_t
/** Line number where last time x-locked */
unsigned last_x_line:14;
- const char* lock_name;
- const char* file_name;/*!< File name where the lock was obtained */
- ulint line; /*!< Line where the rw-lock was locked */
- os_thread_id_t thread_id;
-
/** Count of os_waits. May not be accurate */
uint32_t count_os_wait;
@@ -744,7 +736,6 @@ pfs_rw_lock_create_func(
#ifdef UNIV_DEBUG
latch_level_t level, /*!< in: level */
#endif /* UNIV_DEBUG */
- const char* cmutex_name, /*!< in: mutex name */
const char* cfile_name, /*!< in: file name where created */
ulint cline); /*!< in: file line where created */