File perf_monitor.c¶
FileList > base > perf_monitor.c
Go to the source code of this file
#include <stdio.h>#include <time.h>#include <assert.h>#include <sys/time.h>#include <sys/resource.h>#include "trace_log.h"#include "perf_monitor.h"#include "error_manager.h"#include "object_representation.h"#include "thread_daemon.hpp"#include "thread_manager.hpp"#include <cstring>#include <string.h>#include <errno.h>#include <sys/types.h>#include <sys/shm.h>#include <sys/ipc.h>#include <sys/stat.h>#include "connection_defs.h"#include "environment_variable.h"#include "connection_error.h"#include "databases_file.h"#include "log_impl.h"#include "session.h"#include "log_manager.h"#include "server_support.h"#include "system_parameter.h"#include "xserver_interface.h"#include "heap_file.h"#include "vacuum.h"#include "xasl_cache.h"#include "load_worker_manager.hpp"#include "memory_wrapper.hpp"
Public Attributes¶
| Type | Name |
|---|---|
| bool | perfmon_Iscollecting_stats = [**false**](broker__monitor_8c.md#function-timeout) |
| const char * | perfmon_Portable_worker_stat_names = /* multi line expression */ |
| PSTAT_GLOBAL | pstat_Global |
| PSTAT_METADATA | pstat_Metadata |
Public Static Attributes¶
| Type | Name |
|---|---|
| const size_t | PERFMON_PORTABLE_DAEMON_COUNT = [**sizeof**](broker__monitor_8c.md#function-timeout) ([**perfmon\_Portable\_daemon\_names**](perf__monitor_8c.md#variable-perfmon_portable_daemon_names)) / [**sizeof**](broker__monitor_8c.md#function-timeout) ([**const**](broker__monitor_8c.md#function-timeout) [**char**](broker__monitor_8c.md#function-timeout) \*) |
| const size_t | PERFMON_PORTABLE_DAEMON_STAT_COUNT = /* multi line expression */ |
| const size_t | PERFMON_PORTABLE_WORKER_STAT_COUNT = /* multi line expression */ |
| const char * | perfmon_Portable_daemon_names = /* multi line expression */ |
| const char * | perfmon_Portable_daemon_stat_names = /* multi line expression */ |
| PERFMON_CLIENT_STAT_INFO | perfmon_Stat_info |
Public Functions¶
Public Static Functions¶
Macros¶
| Type | Name |
|---|---|
| define | PERFMON_VALUES_MEMSIZE (pstat\_Global.n\_stat\_values \* [**sizeof**](broker__monitor_8c.md#function-timeout) ([**UINT64**](broker__monitor_8c.md#function-timeout))) |
| define | PSTAT_METADATA_INIT_COMPLEX (id, name, f_dump_in_file, f_dump_in_buffer, f_load) { [**id**](thread__worker__pool__impl_8hpp.md#enum-id), name, PSTAT\_COMPLEX\_VALUE, 0, 0, f\_dump\_in\_file, f\_dump\_in\_buffer, f\_load } |
| define | PSTAT_METADATA_INIT_COMPUTED_RATIO (id, name) { [**id**](thread__worker__pool__impl_8hpp.md#enum-id), name, PSTAT\_COMPUTED\_RATIO\_VALUE, 0, 0, [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null) } |
| define | PSTAT_METADATA_INIT_COUNTER_TIMER (id, name) { [**id**](thread__worker__pool__impl_8hpp.md#enum-id), name, PSTAT\_COUNTER\_TIMER\_VALUE, 0, 0, [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null) } |
| define | PSTAT_METADATA_INIT_SINGLE_ACC (id, name) { [**id**](thread__worker__pool__impl_8hpp.md#enum-id), name, PSTAT\_ACCUMULATE\_SINGLE\_VALUE, 0, 0, [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null) } |
| define | PSTAT_METADATA_INIT_SINGLE_PEEK (id, name) { [**id**](thread__worker__pool__impl_8hpp.md#enum-id), name, PSTAT\_PEEK\_SINGLE\_VALUE, 0, 0, [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null) } |
| define | PSTAT_VALUE_CUSTOM 0x00000001 |
Public Attributes Documentation¶
variable perfmon_Iscollecting_stats¶
variable perfmon_Portable_worker_stat_names¶
variable pstat_Global¶
variable pstat_Metadata¶
Public Static Attributes Documentation¶
variable PERFMON_PORTABLE_DAEMON_COUNT¶
variable PERFMON_PORTABLE_DAEMON_STAT_COUNT¶
variable PERFMON_PORTABLE_WORKER_STAT_COUNT¶
variable perfmon_Portable_daemon_names¶
variable perfmon_Portable_daemon_stat_names¶
variable perfmon_Stat_info¶
Public Functions Documentation¶
function perfmon_allocate_packed_values_buffer¶
function perfmon_allocate_values¶
function perfmon_calc_diff_stats¶
int perfmon_calc_diff_stats (
UINT64 * stats_diff,
UINT64 * new_stats,
UINT64 * old_stats,
bool need_pgbuf_stat
)
function perfmon_calc_diff_stats_for_trace¶
int perfmon_calc_diff_stats_for_trace (
UINT64 * stats_diff,
UINT64 * new_stats,
UINT64 * old_stats
)
function perfmon_copy_values¶
function perfmon_db_flushed_block_volumes¶
function perfmon_destroy_parallel_stats¶
function perfmon_er_log_current_stats¶
function perfmon_finalize¶
function perfmon_get_current_times¶
void perfmon_get_current_times (
time_t * cpu_user_time,
time_t * cpu_sys_time,
time_t * elapsed_time
)
function perfmon_get_from_statistic¶
function perfmon_get_global_stats¶
function perfmon_get_number_of_statistic_values¶
function perfmon_get_stats¶
function perfmon_get_stats_and_clear¶
function perfmon_initialize¶
function perfmon_initialize_parallel_stats¶
function perfmon_lk_waited_time_on_objects¶
function perfmon_mvcc_snapshot¶
function perfmon_pack_stats¶
function perfmon_pbx_fix¶
void perfmon_pbx_fix (
THREAD_ENTRY * thread_p,
int page_type,
int page_found_mode,
int latch_mode,
int cond_type
)
function perfmon_pbx_fix_acquire_time¶
void perfmon_pbx_fix_acquire_time (
THREAD_ENTRY * thread_p,
int page_type,
int page_found_mode,
int latch_mode,
int cond_type,
UINT64 amount
)
function perfmon_pbx_hold_acquire_time¶
void perfmon_pbx_hold_acquire_time (
THREAD_ENTRY * thread_p,
int page_type,
int page_found_mode,
int latch_mode,
UINT64 amount
)
function perfmon_pbx_lock_acquire_time¶
void perfmon_pbx_lock_acquire_time (
THREAD_ENTRY * thread_p,
int page_type,
int page_found_mode,
int latch_mode,
int cond_type,
UINT64 amount
)
function perfmon_pbx_promote¶
void perfmon_pbx_promote (
THREAD_ENTRY * thread_p,
int page_type,
int promote_cond,
int holder_latch,
int success,
UINT64 amount
)
function perfmon_pbx_unfix¶
void perfmon_pbx_unfix (
THREAD_ENTRY * thread_p,
int page_type,
int buf_dirty,
int dirtied_by_holder,
int holder_latch
)
function perfmon_print_global_stats¶
function perfmon_print_stats¶
function perfmon_reset_stats¶
function perfmon_server_dump_stats¶
function perfmon_server_dump_stats_to_buffer¶
void perfmon_server_dump_stats_to_buffer (
const UINT64 * stats,
char * buffer,
int buf_size,
const char * substr
)
function perfmon_server_is_stats_on¶
function perfmon_start_stats¶
function perfmon_start_watch¶
function perfmon_stop_stats¶
function perfmon_stop_watch¶
function perfmon_trace_dump_stats_to_buffer¶
void perfmon_trace_dump_stats_to_buffer (
const UINT64 * stats,
char * buffer,
int buf_size,
int trace_level
)
function perfmon_unpack_stats¶
function xperfmon_server_copy_global_stats¶
function xperfmon_server_copy_stats¶
void xperfmon_server_copy_stats (
THREAD_ENTRY * thread_p,
UINT64 * to_stats,
bool need_pgbuf_stat
)
function xperfmon_server_copy_stats_for_trace¶
Public Static Functions Documentation¶
function f_dump_in_buffer_Num_data_page_fix_ext¶
static void f_dump_in_buffer_Num_data_page_fix_ext (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_buffer_Num_data_page_promote_ext¶
static void f_dump_in_buffer_Num_data_page_promote_ext (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_buffer_Num_data_page_promote_time_ext¶
static void f_dump_in_buffer_Num_data_page_promote_time_ext (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_buffer_Num_data_page_unfix_ext¶
static void f_dump_in_buffer_Num_data_page_unfix_ext (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_buffer_Num_dwb_flushed_block_volumes¶
static void f_dump_in_buffer_Num_dwb_flushed_block_volumes (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_buffer_Num_mvcc_snapshot_ext¶
static void f_dump_in_buffer_Num_mvcc_snapshot_ext (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_buffer_Time_data_page_fix_acquire_time¶
static void f_dump_in_buffer_Time_data_page_fix_acquire_time (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_buffer_Time_data_page_hold_acquire_time¶
static void f_dump_in_buffer_Time_data_page_hold_acquire_time (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_buffer_Time_data_page_lock_acquire_time¶
static void f_dump_in_buffer_Time_data_page_lock_acquire_time (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_buffer_Time_obj_lock_acquire_time¶
static void f_dump_in_buffer_Time_obj_lock_acquire_time (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_buffer_thread_daemon_stats¶
static void f_dump_in_buffer_thread_daemon_stats (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_buffer_thread_stats¶
static void f_dump_in_buffer_thread_stats (
char ** s,
const UINT64 * stat_vals,
int * remaining_size
)
function f_dump_in_file_Num_data_page_fix_ext¶
function f_dump_in_file_Num_data_page_promote_ext¶
function f_dump_in_file_Num_data_page_promote_time_ext¶
function f_dump_in_file_Num_data_page_unfix_ext¶
function f_dump_in_file_Num_dwb_flushed_block_volumes¶
function f_dump_in_file_Num_mvcc_snapshot_ext¶
function f_dump_in_file_Time_data_page_fix_acquire_time¶
function f_dump_in_file_Time_data_page_hold_acquire_time¶
function f_dump_in_file_Time_data_page_lock_acquire_time¶
function f_dump_in_file_Time_obj_lock_acquire_time¶
function f_dump_in_file_thread_daemon_stats¶
function f_dump_in_file_thread_stats¶
function f_load_Count_get_oldest_mvcc_retry¶
function f_load_Count_get_snapshot_retry¶
function f_load_Num_data_page_fix_ext¶
function f_load_Num_data_page_promote_ext¶
function f_load_Num_data_page_promote_time_ext¶
function f_load_Num_data_page_unfix_ext¶
function f_load_Num_dwb_flushed_block_volumes¶
function f_load_Num_mvcc_snapshot_ext¶
function f_load_Time_data_page_fix_acquire_time¶
function f_load_Time_data_page_hold_acquire_time¶
function f_load_Time_data_page_lock_acquire_time¶
function f_load_Time_get_oldest_mvcc_acquire_time¶
function f_load_Time_get_snapshot_acquire_time¶
function f_load_Time_obj_lock_acquire_time¶
function f_load_Time_tran_complete_time¶
function f_load_thread_daemon_stats¶
function f_load_thread_stats¶
function perfmon_add_stat_at_offset¶
static void perfmon_add_stat_at_offset (
THREAD_ENTRY * thread_p,
PERF_STAT_ID psid,
const int offset,
UINT64 amount
)
function perfmon_get_module_type¶
function perfmon_get_peek_stats¶
function perfmon_peek_thread_daemon_stats¶
function perfmon_per_daemon_stat_count¶
function perfmon_print_timer_to_buffer¶
static void perfmon_print_timer_to_buffer (
char ** s,
int stat_index,
UINT64 * stats_ptr,
int * remained_size
)
function perfmon_print_timer_to_file¶
function perfmon_server_calc_stats¶
function perfmon_server_get_stats¶
function perfmon_stat_cond_type_name¶
function perfmon_stat_dump_in_buffer_fix_page_array_stat¶
static void perfmon_stat_dump_in_buffer_fix_page_array_stat (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_buffer_flushed_block_volumes_array_stat¶
static void perfmon_stat_dump_in_buffer_flushed_block_volumes_array_stat (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_buffer_mvcc_snapshot_array_stat¶
static void perfmon_stat_dump_in_buffer_mvcc_snapshot_array_stat (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_buffer_obj_lock_array_stat¶
static void perfmon_stat_dump_in_buffer_obj_lock_array_stat (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_buffer_page_fix_time_array_stat¶
static void perfmon_stat_dump_in_buffer_page_fix_time_array_stat (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_buffer_page_hold_time_array_stat¶
static void perfmon_stat_dump_in_buffer_page_hold_time_array_stat (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_buffer_page_lock_time_array_stat¶
static void perfmon_stat_dump_in_buffer_page_lock_time_array_stat (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_buffer_promote_page_array_stat¶
static void perfmon_stat_dump_in_buffer_promote_page_array_stat (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_buffer_snapshot_array_stat¶
static void perfmon_stat_dump_in_buffer_snapshot_array_stat (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_buffer_thread_daemon_stats¶
static void perfmon_stat_dump_in_buffer_thread_daemon_stats (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_buffer_thread_stats¶
static void perfmon_stat_dump_in_buffer_thread_stats (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_buffer_unfix_page_array_stat¶
static void perfmon_stat_dump_in_buffer_unfix_page_array_stat (
const UINT64 * stats_ptr,
char ** s,
int * remaining_size
)
function perfmon_stat_dump_in_file_fix_page_array_stat¶
static void perfmon_stat_dump_in_file_fix_page_array_stat (
FILE * stream,
const UINT64 * stats_ptr
)
function perfmon_stat_dump_in_file_flushed_block_volumes_array_stat¶
static void perfmon_stat_dump_in_file_flushed_block_volumes_array_stat (
FILE * stream,
const UINT64 * stats_ptr
)
function perfmon_stat_dump_in_file_mvcc_snapshot_array_stat¶
static void perfmon_stat_dump_in_file_mvcc_snapshot_array_stat (
FILE * stream,
const UINT64 * stats_ptr
)
function perfmon_stat_dump_in_file_obj_lock_array_stat¶
static void perfmon_stat_dump_in_file_obj_lock_array_stat (
FILE * stream,
const UINT64 * stats_ptr
)
function perfmon_stat_dump_in_file_page_fix_time_array_stat¶
static void perfmon_stat_dump_in_file_page_fix_time_array_stat (
FILE * stream,
const UINT64 * stats_ptr
)
function perfmon_stat_dump_in_file_page_hold_time_array_stat¶
static void perfmon_stat_dump_in_file_page_hold_time_array_stat (
FILE * stream,
const UINT64 * stats_ptr
)
function perfmon_stat_dump_in_file_page_lock_time_array_stat¶
static void perfmon_stat_dump_in_file_page_lock_time_array_stat (
FILE * stream,
const UINT64 * stats_ptr
)
function perfmon_stat_dump_in_file_promote_page_array_stat¶
static void perfmon_stat_dump_in_file_promote_page_array_stat (
FILE * stream,
const UINT64 * stats_ptr
)
function perfmon_stat_dump_in_file_snapshot_array_stat¶
static void perfmon_stat_dump_in_file_snapshot_array_stat (
FILE * stream,
const UINT64 * stats_ptr
)
function perfmon_stat_dump_in_file_thread_daemon_stats¶
static void perfmon_stat_dump_in_file_thread_daemon_stats (
FILE * stream,
const UINT64 * stats_ptr
)
function perfmon_stat_dump_in_file_thread_stats¶
function perfmon_stat_dump_in_file_unfix_page_array_stat¶
static void perfmon_stat_dump_in_file_unfix_page_array_stat (
FILE * stream,
const UINT64 * stats_ptr
)
function perfmon_stat_holder_latch_name¶
function perfmon_stat_lock_mode_name¶
function perfmon_stat_module_name¶
function perfmon_stat_page_mode_name¶
function perfmon_stat_page_type_name¶
function perfmon_stat_promote_cond_name¶
function perfmon_stat_snapshot_name¶
function perfmon_stat_snapshot_record_type¶
function perfmon_stat_thread_stat_name¶
function perfmon_thread_daemon_name¶
function perfmon_thread_daemon_stats_count¶
function thread_stats_count¶
Macro Definition Documentation¶
define PERFMON_VALUES_MEMSIZE¶
define PSTAT_METADATA_INIT_COMPLEX¶
#define PSTAT_METADATA_INIT_COMPLEX (
id,
name,
f_dump_in_file,
f_dump_in_buffer,
f_load
) `{ id , name, PSTAT_COMPLEX_VALUE , 0, 0, f_dump_in_file, f_dump_in_buffer, f_load }`
define PSTAT_METADATA_INIT_COMPUTED_RATIO¶
#define PSTAT_METADATA_INIT_COMPUTED_RATIO (
id,
name
) `{ id , name, PSTAT_COMPUTED_RATIO_VALUE , 0, 0, NULL , NULL , NULL }`
define PSTAT_METADATA_INIT_COUNTER_TIMER¶
#define PSTAT_METADATA_INIT_COUNTER_TIMER (
id,
name
) `{ id , name, PSTAT_COUNTER_TIMER_VALUE , 0, 0, NULL , NULL , NULL }`
define PSTAT_METADATA_INIT_SINGLE_ACC¶
#define PSTAT_METADATA_INIT_SINGLE_ACC (
id,
name
) `{ id , name, PSTAT_ACCUMULATE_SINGLE_VALUE , 0, 0, NULL , NULL , NULL }`
define PSTAT_METADATA_INIT_SINGLE_PEEK¶
#define PSTAT_METADATA_INIT_SINGLE_PEEK (
id,
name
) `{ id , name, PSTAT_PEEK_SINGLE_VALUE , 0, 0, NULL , NULL , NULL }`
define PSTAT_VALUE_CUSTOM¶
The documentation for this class was generated from the following file cubrid/src/base/perf_monitor.c