![]() |
MySQL 9.5.0
Source Code Documentation
|
Track aggregate metrics policy, used by the page mutex. More...
#include <sync0policy.h>
Public Types | |
| typedef Mutex | MutexType |
| typedef latch_meta_t::CounterType::Count | Count |
Public Member Functions | |
| BlockMutexPolicy () | |
| Default constructor. More... | |
| ~BlockMutexPolicy ()=default | |
| Destructor. More... | |
| void | init (const MutexType &mutex, latch_id_t id, const char *filename, uint32_t line) 1 |
| Called when the mutex is "created". More... | |
| void | destroy () 1 |
| Called when the mutex is destroyed. More... | |
| void | add (uint32_t n_spins, uint32_t n_waits) 1 |
| Called after a successful mutex acquire. More... | |
| void | locked (const MutexType &mutex, const char *filename, ulint line) 1 |
| Called when the mutex is locked. More... | |
| void | release (const MutexType &mutex) 1 |
| Called when the mutex is released. More... | |
| void | enter (const MutexType &mutex, const char *filename, ulint line) 1 |
| Called when an attempt is made to lock the mutex. More... | |
| std::string | print () const 1 |
| Print the information about the latch. More... | |
| latch_id_t | get_id () const |
| std::string | to_string () const |
Public Member Functions inherited from MutexDebug< Mutex > | |
| MutexDebug () | |
| Constructor. More... | |
| virtual | ~MutexDebug ()=default |
| void | destroy () 1 |
| Mutex is being destroyed. More... | |
| void | init (latch_id_t id) 1 |
| Called when the mutex is "created". More... | |
| void | enter (const Mutex *mutex, const char *filename, ulint line) 1 |
| Called when an attempt is made to lock the mutex. More... | |
| void | locked (const Mutex *mutex, const char *filename, ulint line) 1 |
| Called when the mutex is locked. More... | |
| void | release (const Mutex *mutex) 1 |
| Called when the mutex is released. More... | |
| bool | is_owned () const 1 |
| const char * | get_enter_filename () const 1 |
| ulint | get_enter_line () const 1 |
| std::thread::id | get_thread_id () const 1 |
Private Types | |
| typedef latch_meta_t::CounterType | Counter |
Private Attributes | |
| Counter::Count * | m_count |
| The user visible counters, registered with the meta-data. More... | |
| latch_id_t | m_id |
| Latch meta data ID. More... | |
Additional Inherited Members | |
Public Attributes inherited from MutexDebug< Mutex > | |
| uint32_t | m_magic_n |
| Magic number to check for memory corruption. More... | |
| Context | m_context |
| Latch state of the mutex owner. More... | |
Track aggregate metrics policy, used by the page mutex.
There are just too many of them to count individually.
| typedef latch_meta_t::CounterType::Count BlockMutexPolicy< Mutex >::Count |
|
private |
| typedef Mutex BlockMutexPolicy< Mutex >::MutexType |
|
inline |
Default constructor.
|
default |
Destructor.
|
inline |
Called after a successful mutex acquire.
| [in] | n_spins | Number of times the thread did spins while trying to acquire the mutex |
| [in] | n_waits | Number of times the thread waited in some type of OS queue |
|
inline |
Called when the mutex is destroyed.
|
inline |
Called when an attempt is made to lock the mutex.
| [in] | mutex | Mutex instance to be locked |
| [in] | filename | Filename from where it was called |
| [in] | line | Line number from where it was called |
|
inline |
|
inline |
Called when the mutex is "created".
Note: Not from the constructor but when the mutex is initialised.
| [in] | mutex | Mutex instance to track |
| [in] | id | Mutex ID |
| [in] | filename | File where mutex was created |
| [in] | line | Line in filename |
|
inline |
Called when the mutex is locked.
| [in] | mutex | Mutex instance that is locked |
| [in] | filename | Filename from where it was called |
| [in] | line | Line number from where it was called |
| std::string BlockMutexPolicy< Mutex >::print | ( | ) | const |
Print the information about the latch.
|
inline |
Called when the mutex is released.
| [in] | mutex | Mutex instance that is released |
| std::string BlockMutexPolicy< Mutex >::to_string |
|
private |
The user visible counters, registered with the meta-data.
|
private |
Latch meta data ID.