MySQL 8.0.40
Source Code Documentation
|
Collect the metrics per mutex instance, no aggregation. More...
#include <sync0policy.h>
Public Types | |
typedef Mutex | MutexType |
Public Member Functions | |
GenericPolicy () 1 | |
Constructor. More... | |
~GenericPolicy ()=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 | enter (const MutexType &mutex, const char *filename, ulint line) 1 |
Called when an attempt is made to lock the mutex. 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... | |
std::string | print () const 1 |
Print the information about the latch. More... | |
latch_id_t | get_id () const 1 |
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... | |
Collect the metrics per mutex instance, no aggregation.
|
private |
typedef Mutex GenericPolicy< Mutex >::MutexType |
|
inline |
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 GenericPolicy< 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 GenericPolicy< Mutex >::to_string |
|
private |
The user visible counters, registered with the meta-data.
|
private |
Latch meta data ID.