CUBRID Engine
latest
|
#include "memory_alloc.h"
#include "porting_inline.hpp"
#include "storage_common.h"
#include "thread_compat.hpp"
#include "tsc_timer.h"
#include <assert.h>
#include <stdio.h>
#include <sys/time.h>
#include <time.h>
Go to the source code of this file.
Classes | |
struct | pstat_global |
struct | pstat_metadata |
struct | diag_sys_config |
struct | t_diag_monitor_db_value |
struct | t_diag_monitor_cas_value |
struct | monitor_cas_config |
struct | monitor_server_config |
struct | t_client_monitor_config |
struct | t_shm_diag_info_server |
Typedefs | |
typedef struct pstat_global | PSTAT_GLOBAL |
typedef struct pstat_metadata | PSTAT_METADATA |
typedef void(* | PSTAT_DUMP_IN_FILE_FUNC) (FILE *, const UINT64 *stat_vals) |
typedef void(* | PSTAT_DUMP_IN_BUFFER_FUNC) (char **, const UINT64 *stat_vals, int *remaining_size) |
typedef int(* | PSTAT_LOAD_FUNC) (void) |
typedef struct diag_sys_config | DIAG_SYS_CONFIG |
typedef struct t_diag_monitor_db_value | T_DIAG_MONITOR_DB_VALUE |
typedef struct t_diag_monitor_cas_value | T_DIAG_MONITOR_CAS_VALUE |
typedef struct monitor_cas_config | MONITOR_CAS_CONFIG |
typedef struct monitor_server_config | MONITOR_SERVER_CONFIG |
typedef struct t_client_monitor_config | T_CLIENT_MONITOR_CONFIG |
typedef struct t_shm_diag_info_server | T_SHM_DIAG_INFO_SERVER |
typedef enum t_diag_shm_mode | T_DIAG_SHM_MODE |
typedef enum t_diag_server_type | T_DIAG_SERVER_TYPE |
Variables | |
int | log_Tran_index |
PSTAT_GLOBAL | pstat_Global |
PSTAT_METADATA | pstat_Metadata [] |
#define LOG_FIND_THREAD_TRAN_INDEX | ( | thrd | ) | (log_Tran_index) |
Definition at line 158 of file perf_monitor.h.
Referenced by boot_can_compact(), boot_compact_start(), boot_compact_stop(), event_log_many_ioreads(), event_log_slow_query(), event_log_temp_expand_pages(), fileio_write_backup_node(), heap_mark_class_as_modified(), locator_check_btree_entries(), locator_check_unique_btree_entries(), locator_defence_drop_class_name_entry(), locator_delete_force_internal(), locator_drop_class_name_entry(), locator_drop_transient_class_name_entries(), locator_force_for_multi_update(), locator_lock_and_return_object(), locator_permoid_class_name(), locator_repair_btree_by_delete(), locator_repair_btree_by_insert(), locator_return_object_assign(), locator_savepoint_class_name_entry(), locator_savepoint_transient_class_name_entries(), locator_update_index(), lock_classes_lock_hint(), lock_demote_class_lock(), lock_has_xlock(), lock_hold_object_instant(), lock_initialize_composite_lock(), lock_notify_isolation_incons(), lock_object(), lock_rep_read_tran(), lock_scan(), lock_subclass(), lock_unlock_all(), lock_unlock_all_shared_get_all_exclusive(), lock_unlock_classes_lock_hint(), lock_unlock_object(), lock_unlock_object_lock_internal(), lock_unlock_objects_lock_set(), log_2pc_attach_global_tran(), log_2pc_prepare(), log_2pc_prepare_global_tran(), log_2pc_recovery(), log_2pc_send_abort_decision(), log_2pc_start(), log_abort(), log_abort_partial(), log_add_to_modified_class_list(), log_append_dboutside_redo(), log_append_empty_record(), log_append_ha_server_state(), log_append_postpone(), log_append_redo_crumbs(), log_append_run_postpone(), log_append_savepoint(), log_append_undo_crumbs(), log_append_undoredo_crumbs(), log_check_system_op_is_started(), log_commit(), log_complete(), log_complete_for_2pc(), log_final(), log_get_parent_lsa_system_op(), log_is_class_being_modified(), log_is_tran_in_system_op(), log_recovery(), log_skip_logging(), log_sysop_get_tran_index_and_tdes(), log_sysop_start(), log_undo_rec_restartable(), log_update_global_btid_online_index_stats(), login_user(), logtb_complete_mvcc(), logtb_find_current_client_hostname(), logtb_find_current_client_name(), logtb_find_current_client_type(), logtb_find_current_isolation(), logtb_find_current_mvccid(), logtb_find_current_tranid(), logtb_find_tran_index(), logtb_free_tran_index(), logtb_get_current_mvccid(), logtb_get_mvcc_snapshot(), logtb_has_updated(), logtb_invalidate_snapshot_data(), logtb_is_active(), logtb_is_current_active(), logtb_is_current_mvccid(), logtb_is_interrupted(), logtb_is_tran_modification_disabled(), logtb_istran_finished(), logtb_load_global_statistics_to_tran(), logtb_set_current_user_active(), logtb_set_current_user_name(), logtb_tran_create_btid_unique_stats(), logtb_tran_create_class_cos(), logtb_tran_find_btid_stats(), logtb_tran_find_class_cos(), logtb_tran_reset_count_optim_state(), logtb_tran_update_all_global_unique_stats(), logtb_tran_update_stats_online_index_rb(), logwr_log_ha_filestat_to_string(), mvcc_is_active_id(), perfmon_finalize(), pgbuf_allocate_bcb(), pgbuf_bcb_flush_with_wal(), pgbuf_block_bcb(), pgbuf_claim_bcb_for_fix(), pgbuf_find_current_wait_msecs(), pgbuf_fix_debug(), pgbuf_latch_bcb_upon_fix(), px_sort_assign(), qexec_evaluate_aggregates_optimize(), qexec_execute_insert(), qexec_execute_mainblock_internal(), qexec_execute_query(), qexec_execute_selupd_list(), qfile_end_use_of_list_cache_entry(), qfile_lookup_list_cache_entry(), qfile_update_list_cache_entry(), qmgr_add_modified_class(), qmgr_add_query_entry(), qmgr_clear_trans_wakeup(), qmgr_create_new_temp_file(), qmgr_create_result_file(), qmgr_delete_query_entry(), qmgr_free_list_temp_file(), qmgr_free_query_temp_file(), qmgr_get_current_query_id(), qmgr_get_new_page(), qmgr_get_old_page(), qmgr_get_query_entry(), sbtree_load_index(), scan_next_heap_scan(), scan_next_index_lookup_heap(), serial_update_serial_object(), spage_save_space(), test_mvcc_get_snapshot(), test_new_mvcc_complete(), xboot_restart_from_backup(), xboot_unregister_client(), xchksum_insert_repl_log_and_demote_table_lock(), xlocator_delete_class_name(), xlocator_find_class_oid(), xlocator_find_lockhint_class_oids(), xlocator_get_reserved_class_name_oid(), xlocator_rename_class_name(), xlocator_reserve_class_name(), xlocator_upgrade_instances_domain(), xlogtb_reset_isolation(), xlogtb_reset_wait_msecs(), xlogtb_set_interrupt(), xlogtb_set_suppress_repl_on_transaction(), xqfile_get_list_file_page(), xqmgr_end_query(), xqmgr_execute_query(), xqmgr_prepare_and_execute_query(), xtran_server_abort(), xtran_server_commit(), xtran_server_end_topop(), xtx_add_lob_locator(), xtx_change_state_of_locator(), xtx_drop_lob_locator(), and xtx_find_lob_locator().
#define LOG_TRAN_INDEX |
Definition at line 145 of file perf_monitor.h.
#define MAX_DIAG_DATA_VALUE 0xfffffffffffffLL |
Definition at line 50 of file perf_monitor.h.
Referenced by fn_end_tran(), fn_execute_array(), fn_execute_internal(), process_request(), query_cancel(), update_error_query_count(), update_query_execution_count(), and ux_auto_commit().
#define MAX_SERVER_NAMELENGTH 256 |
Definition at line 53 of file perf_monitor.h.
#define MAX_SERVER_THREAD_COUNT 500 |
Definition at line 52 of file perf_monitor.h.
#define MONITOR_WAITING_THREAD | ( | elapsed | ) | (0) |
Definition at line 1375 of file perf_monitor.h.
Referenced by csect_demote_critical_section(), csect_enter_critical_section(), csect_enter_critical_section_as_reader(), csect_promote_critical_section(), fileio_read(), fileio_read_pages(), fileio_synchronize(), fileio_unformat_and_rename(), fileio_write(), fileio_write_pages(), lock_classes_lock_hint(), lock_object(), lock_scan(), and lock_subclass().
#define PERF_DWB_FLUSHED_BLOCK_VOLUMES_CNT 10 |
Definition at line 133 of file perf_monitor.h.
Referenced by f_load_Num_dwb_flushed_block_volumes(), perfmon_stat_dump_in_buffer_flushed_block_volumes_array_stat(), and perfmon_stat_dump_in_file_flushed_block_volumes_array_stat().
#define PERF_MVCC_SNAPSHOT_COUNTERS (PERF_SNAPSHOT_CNT * PERF_SNAPSHOT_RECORD_TYPE_CNT * PERF_SNAPSHOT_VISIBILITY_CNT) |
Definition at line 125 of file perf_monitor.h.
Referenced by f_load_Num_mvcc_snapshot_ext(), perfmon_stat_dump_in_buffer_mvcc_snapshot_array_stat(), and perfmon_stat_dump_in_file_mvcc_snapshot_array_stat().
#define PERF_MVCC_SNAPSHOT_OFFSET | ( | snapshot, | |
rec_type, | |||
visibility | |||
) |
Definition at line 128 of file perf_monitor.h.
Referenced by perfmon_stat_dump_in_buffer_mvcc_snapshot_array_stat(), and perfmon_stat_dump_in_file_mvcc_snapshot_array_stat().
#define PERF_OBJ_LOCK_STAT_COUNTERS (SCH_M_LOCK + 1) |
Definition at line 132 of file perf_monitor.h.
Referenced by f_load_Time_obj_lock_acquire_time().
#define PERF_PAGE_FIX_COUNTERS ((PERF_MODULE_CNT) * (PERF_PAGE_CNT) * (PERF_PAGE_MODE_CNT) * (PERF_HOLDER_LATCH_CNT) * (PERF_CONDITIONAL_FIX_CNT)) |
Definition at line 76 of file perf_monitor.h.
Referenced by f_load_Num_data_page_fix_ext(), perfmon_server_calc_stats(), perfmon_stat_dump_in_buffer_fix_page_array_stat(), perfmon_stat_dump_in_buffer_page_lock_time_array_stat(), perfmon_stat_dump_in_file_fix_page_array_stat(), and perfmon_stat_dump_in_file_page_lock_time_array_stat().
#define PERF_PAGE_FIX_STAT_OFFSET | ( | module, | |
page_type, | |||
page_found_mode, | |||
latch_mode, | |||
cond_type | |||
) |
Definition at line 93 of file perf_monitor.h.
Referenced by perfmon_server_calc_stats(), perfmon_stat_dump_in_buffer_fix_page_array_stat(), perfmon_stat_dump_in_buffer_page_lock_time_array_stat(), perfmon_stat_dump_in_file_fix_page_array_stat(), and perfmon_stat_dump_in_file_page_lock_time_array_stat().
#define PERF_PAGE_FIX_TIME_COUNTERS PERF_PAGE_FIX_COUNTERS |
Definition at line 91 of file perf_monitor.h.
Referenced by f_load_Time_data_page_fix_acquire_time(), and perfmon_server_calc_stats().
#define PERF_PAGE_FIX_TIME_OFFSET | ( | module, | |
page_type, | |||
page_found_mode, | |||
latch_mode, | |||
cond_type | |||
) | PERF_PAGE_FIX_STAT_OFFSET (module, page_type, page_found_mode, latch_mode, cond_type) |
Definition at line 122 of file perf_monitor.h.
Referenced by perfmon_server_calc_stats().
#define PERF_PAGE_HOLD_TIME_COUNTERS ((PERF_MODULE_CNT) * (PERF_PAGE_CNT) * (PERF_PAGE_MODE_CNT) * (PERF_HOLDER_LATCH_CNT)) |
Definition at line 88 of file perf_monitor.h.
Referenced by f_load_Time_data_page_hold_acquire_time(), perfmon_server_calc_stats(), perfmon_stat_dump_in_buffer_page_hold_time_array_stat(), and perfmon_stat_dump_in_file_page_hold_time_array_stat().
#define PERF_PAGE_HOLD_TIME_OFFSET | ( | module, | |
page_type, | |||
page_found_mode, | |||
latch_mode | |||
) |
Definition at line 116 of file perf_monitor.h.
Referenced by perfmon_server_calc_stats(), perfmon_stat_dump_in_buffer_page_hold_time_array_stat(), and perfmon_stat_dump_in_file_page_hold_time_array_stat().
#define PERF_PAGE_LOCK_TIME_COUNTERS PERF_PAGE_FIX_COUNTERS |
Definition at line 86 of file perf_monitor.h.
Referenced by f_load_Time_data_page_lock_acquire_time(), and perfmon_server_calc_stats().
#define PERF_PAGE_LOCK_TIME_OFFSET | ( | module, | |
page_type, | |||
page_found_mode, | |||
latch_mode, | |||
cond_type | |||
) | PERF_PAGE_FIX_STAT_OFFSET (module, page_type, page_found_mode, latch_mode, cond_type) |
Definition at line 113 of file perf_monitor.h.
Referenced by perfmon_server_calc_stats().
#define PERF_PAGE_PROMOTE_COUNTERS ((PERF_MODULE_CNT) * (PERF_PAGE_CNT) * (PERF_PROMOTE_CONDITION_CNT) * (PERF_HOLDER_LATCH_CNT) * (2 /* success */)) |
Definition at line 79 of file perf_monitor.h.
Referenced by f_load_Num_data_page_promote_ext(), f_load_Num_data_page_promote_time_ext(), perfmon_server_calc_stats(), perfmon_stat_dump_in_buffer_promote_page_array_stat(), and perfmon_stat_dump_in_file_promote_page_array_stat().
#define PERF_PAGE_PROMOTE_STAT_OFFSET | ( | module, | |
page_type, | |||
promote_cond, | |||
holder_latch, | |||
success | |||
) |
Definition at line 99 of file perf_monitor.h.
Referenced by perfmon_server_calc_stats(), perfmon_stat_dump_in_buffer_promote_page_array_stat(), and perfmon_stat_dump_in_file_promote_page_array_stat().
#define PERF_PAGE_UNFIX_COUNTERS ((PERF_MODULE_CNT) * (PERF_PAGE_CNT) * 2 * 2 * (PERF_HOLDER_LATCH_CNT)) |
Definition at line 83 of file perf_monitor.h.
Referenced by f_load_Num_data_page_unfix_ext(), perfmon_server_calc_stats(), perfmon_stat_dump_in_buffer_unfix_page_array_stat(), and perfmon_stat_dump_in_file_unfix_page_array_stat().
#define PERF_PAGE_UNFIX_STAT_OFFSET | ( | module, | |
page_type, | |||
buf_dirty, | |||
dirtied_by_holder, | |||
holder_latch | |||
) |
Definition at line 106 of file perf_monitor.h.
Referenced by perfmon_server_calc_stats(), perfmon_stat_dump_in_buffer_unfix_page_array_stat(), and perfmon_stat_dump_in_file_unfix_page_array_stat().
#define PSTAT_COUNTER_TIMER_AVG_TIME_VALUE | ( | startvalp | ) | ((startvalp) + 3) |
Definition at line 141 of file perf_monitor.h.
Referenced by perfmon_print_timer_to_buffer(), perfmon_print_timer_to_file(), and perfmon_server_calc_stats().
#define PSTAT_COUNTER_TIMER_COUNT_VALUE | ( | startvalp | ) | (startvalp) |
Definition at line 138 of file perf_monitor.h.
Referenced by perfmon_print_timer_to_buffer(), perfmon_print_timer_to_file(), and perfmon_server_calc_stats().
#define PSTAT_COUNTER_TIMER_MAX_TIME_VALUE | ( | startvalp | ) | ((startvalp) + 2) |
Definition at line 140 of file perf_monitor.h.
Referenced by perfmon_print_timer_to_buffer(), and perfmon_print_timer_to_file().
#define PSTAT_COUNTER_TIMER_TOTAL_TIME_VALUE | ( | startvalp | ) | ((startvalp) + 1) |
Definition at line 139 of file perf_monitor.h.
Referenced by perfmon_print_timer_to_buffer(), perfmon_print_timer_to_file(), and perfmon_server_calc_stats().
#define SAFE_DIV | ( | a, | |
b | |||
) | ((b) == 0 ? 0 : (a) / (b)) |
Definition at line 135 of file perf_monitor.h.
Referenced by perfmon_server_calc_stats().
#define SH_MODE 0644 |
Definition at line 54 of file perf_monitor.h.
#define TO_MSEC | ( | elapsed | ) | ((int)(((elapsed).tv_sec * 1000) + (int) ((elapsed).tv_usec / 1000))) |
Definition at line 1366 of file perf_monitor.h.
Referenced by event_log_slow_query(), event_log_temp_expand_pages(), qdump_print_xasl(), and scan_dump_key_into_tuple().
typedef struct diag_sys_config DIAG_SYS_CONFIG |
Definition at line 726 of file perf_monitor.h.
typedef struct monitor_cas_config MONITOR_CAS_CONFIG |
Definition at line 762 of file perf_monitor.h.
typedef struct monitor_server_config MONITOR_SERVER_CONFIG |
Definition at line 769 of file perf_monitor.h.
typedef void(* PSTAT_DUMP_IN_BUFFER_FUNC) (char **, const UINT64 *stat_vals, int *remaining_size) |
Definition at line 705 of file perf_monitor.h.
typedef void(* PSTAT_DUMP_IN_FILE_FUNC) (FILE *, const UINT64 *stat_vals) |
Definition at line 704 of file perf_monitor.h.
typedef struct pstat_global PSTAT_GLOBAL |
Definition at line 656 of file perf_monitor.h.
typedef int(* PSTAT_LOAD_FUNC) (void) |
Definition at line 706 of file perf_monitor.h.
typedef struct pstat_metadata PSTAT_METADATA |
Definition at line 702 of file perf_monitor.h.
typedef struct t_client_monitor_config T_CLIENT_MONITOR_CONFIG |
Definition at line 776 of file perf_monitor.h.
typedef struct t_diag_monitor_cas_value T_DIAG_MONITOR_CAS_VALUE |
Definition at line 751 of file perf_monitor.h.
typedef struct t_diag_monitor_db_value T_DIAG_MONITOR_DB_VALUE |
Definition at line 734 of file perf_monitor.h.
typedef enum t_diag_server_type T_DIAG_SERVER_TYPE |
Definition at line 809 of file perf_monitor.h.
typedef enum t_diag_shm_mode T_DIAG_SHM_MODE |
Definition at line 800 of file perf_monitor.h.
typedef struct t_shm_diag_info_server T_SHM_DIAG_INFO_SERVER |
Definition at line 785 of file perf_monitor.h.
Enumerator | |
---|---|
PERF_CONDITIONAL_FIX | |
PERF_UNCONDITIONAL_FIX_NO_WAIT | |
PERF_UNCONDITIONAL_FIX_WITH_WAIT | |
PERF_CONDITIONAL_FIX_CNT |
Definition at line 180 of file perf_monitor.h.
enum PERF_HOLDER_LATCH |
Enumerator | |
---|---|
PERF_HOLDER_LATCH_READ | |
PERF_HOLDER_LATCH_WRITE | |
PERF_HOLDER_LATCH_MIXED | |
PERF_HOLDER_LATCH_CNT |
Definition at line 171 of file perf_monitor.h.
enum PERF_MODULE_TYPE |
Enumerator | |
---|---|
PERF_MODULE_SYSTEM | |
PERF_MODULE_USER | |
PERF_MODULE_VACUUM | |
PERF_MODULE_CNT |
Definition at line 162 of file perf_monitor.h.
enum PERF_PAGE_MODE |
Enumerator | |
---|---|
PERF_PAGE_MODE_OLD_LOCK_WAIT | |
PERF_PAGE_MODE_OLD_NO_WAIT | |
PERF_PAGE_MODE_NEW_LOCK_WAIT | |
PERF_PAGE_MODE_NEW_NO_WAIT | |
PERF_PAGE_MODE_OLD_IN_BUFFER | |
PERF_PAGE_MODE_CNT |
Definition at line 197 of file perf_monitor.h.
enum PERF_PAGE_TYPE |
Definition at line 209 of file perf_monitor.h.
Enumerator | |
---|---|
PERF_PROMOTE_ONLY_READER | |
PERF_PROMOTE_SHARED_READER | |
PERF_PROMOTE_CONDITION_CNT |
Definition at line 189 of file perf_monitor.h.
Definition at line 242 of file perf_monitor.h.
enum PERF_SNAPSHOT_TYPE |
Enumerator | |
---|---|
PERF_SNAPSHOT_SATISFIES_DELETE | |
PERF_SNAPSHOT_SATISFIES_DIRTY | |
PERF_SNAPSHOT_SATISFIES_SNAPSHOT | |
PERF_SNAPSHOT_SATISFIES_VACUUM | |
PERF_SNAPSHOT_CNT |
Definition at line 232 of file perf_monitor.h.
Enumerator | |
---|---|
PERF_SNAPSHOT_INVISIBLE | |
PERF_SNAPSHOT_VISIBLE | |
PERF_SNAPSHOT_VISIBILITY_CNT |
Definition at line 260 of file perf_monitor.h.
enum PERF_STAT_ID |
Definition at line 268 of file perf_monitor.h.
Definition at line 57 of file perf_monitor.h.
enum PSTAT_VALUE_TYPE |
Enumerator | |
---|---|
PSTAT_ACCUMULATE_SINGLE_VALUE | |
PSTAT_PEEK_SINGLE_VALUE | |
PSTAT_COUNTER_TIMER_VALUE | |
PSTAT_COMPUTED_RATIO_VALUE | |
PSTAT_COMPLEX_VALUE |
Definition at line 679 of file perf_monitor.h.
enum t_diag_server_type |
Enumerator | |
---|---|
DIAG_SERVER_DB | |
DIAG_SERVER_CAS | |
DIAG_SERVER_DRIVER | |
DIAG_SERVER_RESOURCE |
Definition at line 802 of file perf_monitor.h.
enum t_diag_shm_mode |
Enumerator | |
---|---|
DIAG_SHM_MODE_ADMIN | |
DIAG_SHM_MODE_MONITOR |
Definition at line 795 of file perf_monitor.h.
STATIC_INLINE void perfmon_add_at_offset | ( | THREAD_ENTRY * | thread_p, |
int | offset, | ||
UINT64 | amount | ||
) |
STATIC_INLINE void perfmon_add_at_offset_to_global | ( | int | offset, |
UINT64 | amount | ||
) |
STATIC_INLINE void perfmon_add_stat | ( | THREAD_ENTRY * | thread_p, |
PERF_STAT_ID | psid, | ||
UINT64 | amount | ||
) |
Referenced by mvcctable::build_mvcc_info(), mvcctable::compute_oldest_visible_mvccid(), dwb_flush_block(), dwb_write_block(), fileio_flush_control_add_tokens(), fileio_write_pages(), logpb_flush_all_append_pages(), logpb_prior_lsa_append_all_list(), logtb_complete_mvcc(), pgbuf_delete_from_hash_chain(), pgbuf_flush_victim_candidates(), pgbuf_insert_into_hash_chain(), pgbuf_lock_page(), pgbuf_search_hash_chain(), pgbuf_unlock_page(), vacuum_process_log_block(), and vacuum_produce_log_block_data().
STATIC_INLINE void perfmon_add_stat_to_global | ( | PERF_STAT_ID | psid, |
UINT64 | amount | ||
) |
STATIC_INLINE void perfmon_add_timeval | ( | struct timeval * | total, |
struct timeval * | start, | ||
struct timeval * | end | ||
) |
Definition at line 1349 of file perf_monitor.h.
char* perfmon_allocate_packed_values_buffer | ( | void | ) |
Definition at line 3713 of file perf_monitor.c.
References ARG_FILE_LINE, ASSERT_ALIGN, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), MAX_ALIGNMENT, NULL, and PERFMON_VALUES_MEMSIZE.
Referenced by smnt_server_copy_global_stats(), and smnt_server_copy_stats().
UINT64* perfmon_allocate_values | ( | void | ) |
Definition at line 3695 of file perf_monitor.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), NULL, and PERFMON_VALUES_MEMSIZE.
Referenced by perfmon_stat_dump_in_buffer_thread_daemon_stats(), smnt_server_copy_global_stats(), smnt_server_copy_stats(), and sqmgr_execute_query().
int perfmon_calc_diff_stats | ( | UINT64 * | stats_diff, |
UINT64 * | new_stats, | ||
UINT64 * | old_stats | ||
) |
Definition at line 1305 of file perf_monitor.c.
References assert, ER_FAILED, i, pstat_metadata::n_vals, NO_ERROR, perfmon_server_calc_stats(), PSTAT_ACCUMULATE_SINGLE_VALUE, PSTAT_COMPLEX_VALUE, PSTAT_COMPUTED_RATIO_VALUE, PSTAT_COUNT, PSTAT_COUNTER_TIMER_VALUE, PSTAT_PB_AVOID_VICTIM_CNT, PSTAT_PEEK_SINGLE_VALUE, and pstat_metadata::start_offset.
Referenced by sqmgr_execute_query().
void perfmon_copy_values | ( | UINT64 * | src, |
UINT64 * | dest | ||
) |
Definition at line 3735 of file perf_monitor.c.
References PERFMON_VALUES_MEMSIZE.
STATIC_INLINE void perfmon_diff_timeval | ( | struct timeval * | elapsed, |
struct timeval * | start, | ||
struct timeval * | end | ||
) |
Definition at line 1336 of file perf_monitor.h.
References STATIC_INLINE.
Referenced by lock_is_local_deadlock_detection_interval_up(), and pgbuf_get_page_flush_interval().
void perfmon_finalize | ( | void | ) |
Definition at line 3123 of file perf_monitor.c.
References assert, free_and_init, pstat_global::global_stats, pstat_global::initialized, pstat_global::is_watching, LOG_FIND_THREAD_TRAN_INDEX, pstat_global::n_trans, pstat_global::n_watchers, NULL, PERFMON_VALUES_MEMSIZE, pthread_mutex_destroy, pthread_mutex_lock, pthread_mutex_unlock, STATIC_INLINE, pstat_global::tran_stats, and pstat_global::watch_lock.
Referenced by boot_client_all_finalize(), boot_initialize_client(), boot_server_all_finalize(), and perfmon_initialize().
STATIC_INLINE int perfmon_get_activation_flag | ( | void | ) |
Referenced by pgbuf_delete_from_hash_chain(), pgbuf_get_page_type_for_stat(), pgbuf_insert_into_hash_chain(), and pgbuf_unlock_page().
void perfmon_get_current_times | ( | time_t * | cpu_usr_time, |
time_t * | cpu_sys_time, | ||
time_t * | elapsed_time | ||
) |
Definition at line 1565 of file perf_monitor.c.
References NULL.
int perfmon_get_number_of_statistic_values | ( | void | ) |
Definition at line 3685 of file perf_monitor.c.
References pstat_global::n_stat_values.
Referenced by perfmon_server_copy_global_stats(), perfmon_server_copy_stats(), smnt_server_copy_global_stats(), and smnt_server_copy_stats().
STATIC_INLINE void perfmon_inc_stat | ( | THREAD_ENTRY * | thread_p, |
PERF_STAT_ID | psid | ||
) |
Referenced by btree_delete_internal(), btree_get_next_key_info(), btree_get_stats(), btree_insert_internal(), btree_key_online_index_IB_insert_list(), btree_merge_node(), btree_merge_root(), btree_split_node(), btree_split_root(), btree_update(), file_perm_alloc(), file_perm_dealloc(), fileio_create(), fileio_read(), fileio_read_pages(), fileio_synchronize(), fileio_synchronize_all(), fileio_write(), heap_delete_bigone(), heap_delete_home(), heap_delete_relocation(), heap_insert_logical(), heap_stats_add_bestspace(), heap_update_bigone(), heap_update_home(), heap_update_relocation(), log_abort(), log_append_savepoint(), log_commit(), log_sysop_do_postpone(), log_sysop_end_final(), log_sysop_start(), log_tran_do_postpone(), logpb_archive_active_log(), logpb_checkpoint(), logpb_copy_page(), logpb_fetch_from_archive(), logpb_flush_log_for_wal(), logpb_locate_page(), logpb_prior_lsa_append_all_list(), logpb_read_page_from_active_log(), logpb_read_page_from_file(), logpb_start_append(), logpb_write_page_to_disk(), logtb_set_tran_index_interrupt(), net_server_request(), pgbuf_allocate_bcb(), pgbuf_assign_direct_victim(), pgbuf_bcb_flush_with_wal(), pgbuf_claim_bcb_for_fix(), pgbuf_copy_from_area(), pgbuf_copy_to_area(), pgbuf_delete_from_hash_chain(), pgbuf_fix_debug(), pgbuf_get_bcb_from_invalid_list(), pgbuf_get_victim_candidates_from_lru(), pgbuf_get_victim_from_lru_list(), pgbuf_insert_into_hash_chain(), pgbuf_lock_page(), pgbuf_lru_boost_bcb(), pgbuf_lru_fall_bcb_to_zone_3(), pgbuf_search_hash_chain(), pgbuf_set_dirty_buffer_ptr(), pgbuf_unlatch_bcb_upon_unfix(), pgbuf_unlatch_void_zone_bcb(), pgbuf_unlock_page(), prior_lsa_next_record_internal(), qexec_close_scan(), qexec_execute_mainblock_internal(), qexec_execute_merge(), qexec_open_scan(), scan_init_multi_range_optimization(), scan_next_index_scan(), vacuum_fetch_log_page(), vacuum_heap_record(), vacuum_heap_record_insid_and_prev_version(), xcache_cleanup(), xcache_entry_mark_deleted(), xcache_find_sha1(), xcache_find_xasl_id_for_execute(), xcache_insert(), xlocator_force(), xlocator_repl_force(), xqmgr_execute_query(), and xsession_get_prepared_statement().
STATIC_INLINE void perfmon_inc_stat_to_global | ( | PERF_STAT_ID | psid | ) |
int perfmon_initialize | ( | int | num_trans | ) |
Definition at line 2990 of file perf_monitor.c.
References pstat_global::activation_flag, ARG_FILE_LINE, assert, ASSERT_ERROR, bool, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), pstat_metadata::f_load, pstat_global::global_stats, pstat_global::initialized, pstat_global::is_watching, pstat_global::n_stat_values, pstat_global::n_trans, pstat_metadata::n_vals, pstat_global::n_watchers, NO_ERROR, NULL, perfmon_finalize(), PERFMON_VALUES_MEMSIZE, prm_get_bool_value(), prm_get_integer_value(), PRM_ID_EXTENDED_STATISTICS_ACTIVATION, PRM_ID_STATS_ON, PSTAT_ACCUMULATE_SINGLE_VALUE, PSTAT_COMPLEX_VALUE, PSTAT_COMPUTED_RATIO_VALUE, PSTAT_COUNT, PSTAT_COUNTER_TIMER_VALUE, PSTAT_PEEK_SINGLE_VALUE, pthread_mutex_init, pstat_metadata::start_offset, pstat_global::tran_stats, and pstat_global::watch_lock.
Referenced by boot_initialize_client(), boot_restart_client(), boot_restart_server(), and xboot_delete().
STATIC_INLINE bool perfmon_is_perf_tracking | ( | void | ) |
Referenced by mvcctable::build_mvcc_info(), logpb_copy_page(), logpb_locate_page(), logtb_complete_mvcc(), pgbuf_delete_from_hash_chain(), pgbuf_fix_debug(), pgbuf_get_page_flush_interval(), pgbuf_insert_into_hash_chain(), pgbuf_promote_read_latch_debug(), pgbuf_unfix_debug(), and pgbuf_unlock_page().
STATIC_INLINE bool perfmon_is_perf_tracking_and_active | ( | int | activation_flag | ) |
Referenced by dwb_flush_block(), mvcc_satisfies_delete(), mvcc_satisfies_dirty(), mvcc_satisfies_snapshot(), mvcc_satisfies_vacuum(), pgbuf_adjust_quotas(), pgbuf_allocate_bcb(), pgbuf_assign_direct_victim(), pgbuf_bcb_flush_with_wal(), pgbuf_delete_from_hash_chain(), pgbuf_flush_victim_candidates(), pgbuf_get_victim(), pgbuf_get_victim_from_lru_list(), pgbuf_insert_into_hash_chain(), pgbuf_lfcq_get_victim_from_private_lru(), pgbuf_lfcq_get_victim_from_shared_lru(), pgbuf_lock_page(), pgbuf_lru_add_victim_candidate(), pgbuf_lru_fall_bcb_to_zone_3(), pgbuf_search_hash_chain(), pgbuf_unlatch_bcb_upon_unfix(), pgbuf_unlatch_void_zone_bcb(), and pgbuf_unlock_page().
STATIC_INLINE bool perfmon_is_perf_tracking_force | ( | bool | always_collect | ) |
char* perfmon_pack_stats | ( | char * | buf, |
UINT64 * | stats | ||
) |
Definition at line 3751 of file perf_monitor.c.
References i, pstat_global::n_stat_values, OR_INT64_SIZE, and OR_PUT_INT64.
Referenced by smnt_server_copy_global_stats(), and smnt_server_copy_stats().
Definition at line 1482 of file perf_monitor.c.
References pstat_metadata::f_dump_in_file, i, NULL, perfmon_print_timer_to_file(), PSTAT_COMPLEX_VALUE, PSTAT_COMPUTED_RATIO_VALUE, PSTAT_COUNT, PSTAT_COUNTER_TIMER_VALUE, pstat_metadata::start_offset, and pstat_metadata::stat_name.
void perfmon_server_dump_stats_to_buffer | ( | const UINT64 * | stats, |
char * | buffer, | ||
int | buf_size, | ||
const char * | substr | ||
) |
Definition at line 1372 of file perf_monitor.c.
References assert, pstat_metadata::f_dump_in_buffer, i, NULL, p, perfmon_print_timer_to_buffer(), PSTAT_COMPLEX_VALUE, PSTAT_COMPUTED_RATIO_VALUE, PSTAT_COUNT, PSTAT_COUNTER_TIMER_VALUE, pstat_metadata::start_offset, and pstat_metadata::stat_name.
Referenced by er_log_slow_query(), and perfmon_stat_dump_in_buffer_thread_daemon_stats().
STATIC_INLINE void perfmon_set_at_offset | ( | THREAD_ENTRY * | thread_p, |
int | offset, | ||
int | statval, | ||
bool | check_watchers | ||
) |
STATIC_INLINE void perfmon_set_at_offset_to_global | ( | int | offset, |
int | statval | ||
) |
STATIC_INLINE void perfmon_set_stat | ( | THREAD_ENTRY * | thread_p, |
PERF_STAT_ID | psid, | ||
int | statval, | ||
bool | check_watchers | ||
) |
STATIC_INLINE void perfmon_set_stat_to_global | ( | PERF_STAT_ID | psid, |
int | statval | ||
) |
STATIC_INLINE void perfmon_time_at_offset | ( | THREAD_ENTRY * | thread_p, |
int | offset, | ||
UINT64 | timediff | ||
) |
STATIC_INLINE void perfmon_time_bulk_at_offset | ( | THREAD_ENTRY * | thread_p, |
int | offset, | ||
UINT64 | timediff, | ||
UINT64 | count | ||
) |
STATIC_INLINE void perfmon_time_stat | ( | THREAD_ENTRY * | thread_p, |
PERF_STAT_ID | psid, | ||
UINT64 | timediff | ||
) |
char* perfmon_unpack_stats | ( | char * | buf, |
UINT64 * | stats | ||
) |
Definition at line 3777 of file perf_monitor.c.
References i, pstat_global::n_stat_values, OR_GET_INT64, OR_INT64_SIZE, and STATIC_INLINE.
Referenced by perfmon_server_copy_global_stats(), and perfmon_server_copy_stats().
int log_Tran_index |
Definition at line 43 of file log_global.c.
Referenced by log_abort_all_active_transaction().
PSTAT_GLOBAL pstat_Global |
PSTAT_METADATA pstat_Metadata[] |
Referenced by event_log_many_ioreads(), event_log_slow_query(), and sqmgr_execute_query().