summaryrefslogtreecommitdiff
path: root/storage/innobase/trx/trx0i_s.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-12-03 09:55:53 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-12-03 09:55:53 +0200
commit1669c8890ca2e9092213626e5b047e58ca8b1e77 (patch)
tree54e6f431069744db84f3bc5109fddbd139a78324 /storage/innobase/trx/trx0i_s.cc
parent260161fc9fb5b4885013d550e606681769b52019 (diff)
downloadmariadb-git-1669c8890ca2e9092213626e5b047e58ca8b1e77.tar.gz
MDEV-24167 fixup: Improve the PERFORMANCE_SCHEMA instrumentation
Let us try to avoid code bloat for the common case that performance_schema is disabled at runtime, and use ATTRIBUTE_NOINLINE member functions for instrumented latch acquisition. Also, let us distinguish lock waits from non-contended lock requests by using write_lock,read_lock for the requests that lead to waits, and try_write_lock,try_read_lock for the wait-free lock acquisitions. Actual 'try' operations are not being instrumented at all.
Diffstat (limited to 'storage/innobase/trx/trx0i_s.cc')
-rw-r--r--storage/innobase/trx/trx0i_s.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/trx/trx0i_s.cc b/storage/innobase/trx/trx0i_s.cc
index d870c46d34c..4af37c1d35f 100644
--- a/storage/innobase/trx/trx0i_s.cc
+++ b/storage/innobase/trx/trx0i_s.cc
@@ -1305,7 +1305,7 @@ trx_i_s_cache_start_read(
/*=====================*/
trx_i_s_cache_t* cache) /*!< in: cache */
{
- cache->rw_lock.rd_lock();
+ cache->rw_lock.rd_lock(SRW_LOCK_CALL);
}
/*******************************************************************//**
@@ -1326,7 +1326,7 @@ trx_i_s_cache_start_write(
/*======================*/
trx_i_s_cache_t* cache) /*!< in: cache */
{
- cache->rw_lock.wr_lock();
+ cache->rw_lock.wr_lock(SRW_LOCK_CALL);
}
/*******************************************************************//**