MySQL 5.6.14 Source Code Document
|
#include "os0file.h"
#include "mach0data.h"
#include "srv0mon.h"
#include "srv0srv.h"
#include "buf0buf.h"
#include "trx0sys.h"
#include "trx0rseg.h"
#include "lock0lock.h"
#include "ibuf0ibuf.h"
Go to the source code of this file.
Macros | |
#define | MONITOR_BUF_PAGE(name, description, code, op, op_code) |
#define | MONITOR_BUF_PAGE_READ(name, description, code) MONITOR_BUF_PAGE(name, description, code, "read", PAGE_READ) |
#define | MONITOR_BUF_PAGE_WRITTEN(name, description, code) MONITOR_BUF_PAGE(name, description, code, "written", PAGE_WRITTEN) |
Functions | |
UNIV_INTERN void | srv_mon_create (void) |
UNIV_INTERN void | srv_mon_free (void) |
UNIV_INTERN monitor_info_t * | srv_mon_get_info (monitor_id_t monitor_id) |
UNIV_INTERN const char * | srv_mon_get_name (monitor_id_t monitor_id) |
UNIV_INTERN void | srv_mon_set_module_control (monitor_id_t module_id, mon_option_t set_option) |
UNIV_INTERN void | srv_mon_process_existing_counter (monitor_id_t monitor_id, mon_option_t set_option) |
UNIV_INTERN void | srv_mon_reset (monitor_id_t monitor) |
UNIV_INTERN void | srv_mon_default_on (void) |
Variables | |
UNIV_INTERN monitor_value_t | innodb_counter_value [NUM_MONITOR] |
UNIV_INTERN ulint | monitor_set_tbl [(NUM_MONITOR+NUM_BITS_ULINT-1)/NUM_BITS_ULINT] |
ib_mutex_t | monitor_mutex |
UNIV_INTERN mysql_pfs_key_t | monitor_mutex_key |
Definition at line 43 of file srv0mon.cc.
UNIV_INTERN void srv_mon_create | ( | void | ) |
Initialize the monitor subsystem.
Definition at line 1221 of file srv0mon.cc.
UNIV_INTERN void srv_mon_default_on | ( | void | ) |
Turn on monitor counters that are marked as default ON.
Definition at line 1895 of file srv0mon.cc.
UNIV_INTERN void srv_mon_free | ( | void | ) |
Close the monitor subsystem.
Definition at line 1230 of file srv0mon.cc.
UNIV_INTERN monitor_info_t* srv_mon_get_info | ( | monitor_id_t | monitor_id | ) |
Get a monitor's "monitor_info" by its monitor id (index into the innodb_counter_info array.
monitor_id | id indexing into the innodb_counter_info array |
Definition at line 1244 of file srv0mon.cc.
UNIV_INTERN const char* srv_mon_get_name | ( | monitor_id_t | monitor_id | ) |
Get monitor's name by its monitor id (indexing into the innodb_counter_info array.
monitor_id | id index into the innodb_counter_info array |
Definition at line 1263 of file srv0mon.cc.
UNIV_INTERN void srv_mon_process_existing_counter | ( | monitor_id_t | monitor_id, |
mon_option_t | set_option | ||
) |
This function consolidates some existing server counters used by "system status variables". These existing system variables do not have mechanism to start/stop and reset the counters, so we simulate these controls by remembering the corresponding counter values when the corresponding monitors are turned on/off/reset, and do appropriate mathematics to deduct the actual value. Please also refer to srv_export_innodb_status() for related global counters used by the existing status variables.
monitor_id | in: the monitor's ID as in monitor_counter_id |
set_option | in: Turn on/off reset the counter |
Definition at line 1418 of file srv0mon.cc.
UNIV_INTERN void srv_mon_reset | ( | monitor_id_t | monitor | ) |
Reset a monitor, create a new base line with the current monitor value. This baseline is recorded by MONITOR_VALUE_RESET(monitor)
monitor | in: monitor id |
Definition at line 1847 of file srv0mon.cc.
UNIV_INTERN void srv_mon_set_module_control | ( | monitor_id_t | module_id, |
mon_option_t | set_option | ||
) |
Turn on/off, reset monitor counters in a module. If module_id is MONITOR_ALL_COUNTER then turn on all monitor counters. turned on because it has already been turned on.
module_id | in: Module ID as in monitor_counter_id. If it is set to MONITOR_ALL_COUNTER, this means we shall turn on all the counters |
set_option | in: Turn on/off reset the counter |
Definition at line 1281 of file srv0mon.cc.
UNIV_INTERN monitor_value_t innodb_counter_value[NUM_MONITOR] |
The actual monitor counter array that records each monintor counter
value
Definition at line 1202 of file srv0mon.cc.
ib_mutex_t monitor_mutex |
Mutex protecting atomic operations on platforms that lack
built-in operations for atomic memory access
Definition at line 1212 of file srv0mon.cc.
UNIV_INTERN mysql_pfs_key_t monitor_mutex_key |
Key to register monitor_mutex with performance schema
Definition at line 1215 of file srv0mon.cc.
UNIV_INTERN ulint monitor_set_tbl[(NUM_MONITOR+NUM_BITS_ULINT-1)/NUM_BITS_ULINT] |
This "monitor_set_tbl" is a bitmap records whether a particular monitor
counter has been turned on or off
Definition at line 1207 of file srv0mon.cc.