CUBRID Engine  latest
perf_monitor.c File Reference
#include <stdio.h>
#include <time.h>
#include <assert.h>
#include <sys/time.h>
#include <sys/resource.h>
#include "perf_monitor.h"
#include "error_manager.h"
#include "object_representation.h"
#include "memory_alloc.h"
#include "server_interface.h"
#include "thread_worker_pool.hpp"
#include <cstring>
#include "network_interface_cl.h"
Include dependency graph for perf_monitor.c:

Go to the source code of this file.

Macros

#define PSTAT_VALUE_CUSTOM   0x00000001
 
#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(id, name)   { id, name, PSTAT_PEEK_SINGLE_VALUE, 0, 0, NULL, NULL, NULL }
 
#define PSTAT_METADATA_INIT_COUNTER_TIMER(id, name)   { id, name, PSTAT_COUNTER_TIMER_VALUE, 0, 0, NULL, NULL, NULL }
 
#define PSTAT_METADATA_INIT_COMPUTED_RATIO(id, name)   { id, name, PSTAT_COMPUTED_RATIO_VALUE, 0, 0, NULL, NULL, NULL }
 
#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 PERFMON_VALUES_MEMSIZE   (pstat_Global.n_stat_values * sizeof (UINT64))
 

Functions

static int f_load_Num_data_page_fix_ext (void)
 
static int f_load_Num_data_page_promote_ext (void)
 
static int f_load_Num_data_page_promote_time_ext (void)
 
static int f_load_Num_data_page_unfix_ext (void)
 
static int f_load_Time_data_page_lock_acquire_time (void)
 
static int f_load_Time_data_page_hold_acquire_time (void)
 
static int f_load_Time_data_page_fix_acquire_time (void)
 
static int f_load_Num_mvcc_snapshot_ext (void)
 
static int f_load_Time_obj_lock_acquire_time (void)
 
static int f_load_Num_dwb_flushed_block_volumes (void)
 
static int f_load_Time_get_snapshot_acquire_time (void)
 
static int f_load_Count_get_snapshot_retry (void)
 
static int f_load_Time_tran_complete_time (void)
 
static int f_load_Time_get_oldest_mvcc_acquire_time (void)
 
static int f_load_Count_get_oldest_mvcc_retry (void)
 
static int f_load_thread_stats (void)
 
static int f_load_thread_daemon_stats (void)
 
static void f_dump_in_file_Num_data_page_fix_ext (FILE *, const UINT64 *stat_vals)
 
static void f_dump_in_file_Num_data_page_promote_ext (FILE *, const UINT64 *stat_vals)
 
static void f_dump_in_file_Num_data_page_promote_time_ext (FILE *, const UINT64 *stat_vals)
 
static void f_dump_in_file_Num_data_page_unfix_ext (FILE *, const UINT64 *stat_vals)
 
static void f_dump_in_file_Time_data_page_lock_acquire_time (FILE *, const UINT64 *stat_vals)
 
static void f_dump_in_file_Time_data_page_hold_acquire_time (FILE *, const UINT64 *stat_vals)
 
static void f_dump_in_file_Time_data_page_fix_acquire_time (FILE *, const UINT64 *stat_vals)
 
static void f_dump_in_file_Num_mvcc_snapshot_ext (FILE *, const UINT64 *stat_vals)
 
static void f_dump_in_file_Time_obj_lock_acquire_time (FILE *, const UINT64 *stat_vals)
 
static void f_dump_in_file_thread_stats (FILE *f, const UINT64 *stat_vals)
 
static void f_dump_in_file_thread_daemon_stats (FILE *f, const UINT64 *stat_vals)
 
static void f_dump_in_file_Num_dwb_flushed_block_volumes (FILE *, const UINT64 *stat_vals)
 
static void f_dump_in_buffer_Num_data_page_fix_ext (char **, const UINT64 *stat_vals, int *remaining_size)
 
static void f_dump_in_buffer_Num_data_page_promote_ext (char **, const UINT64 *stat_vals, int *remaining_size)
 
static void f_dump_in_buffer_Num_data_page_promote_time_ext (char **, const UINT64 *stat_vals, int *remaining_size)
 
static void f_dump_in_buffer_Num_data_page_unfix_ext (char **, const UINT64 *stat_vals, int *remaining_size)
 
static void f_dump_in_buffer_Time_data_page_lock_acquire_time (char **, const UINT64 *stat_vals, int *remaining_size)
 
static void f_dump_in_buffer_Time_data_page_hold_acquire_time (char **, const UINT64 *stat_vals, int *remaining_size)
 
static void f_dump_in_buffer_Time_data_page_fix_acquire_time (char **, const UINT64 *stat_vals, int *remaining_size)
 
static void f_dump_in_buffer_Num_mvcc_snapshot_ext (char **, const UINT64 *stat_vals, int *remaining_size)
 
static void f_dump_in_buffer_Time_obj_lock_acquire_time (char **, const UINT64 *stat_vals, int *remaining_size)
 
static void f_dump_in_buffer_thread_stats (char **s, const UINT64 *stat_vals, int *remaining_size)
 
static void f_dump_in_buffer_thread_daemon_stats (char **s, const UINT64 *stat_vals, int *remaining_size)
 
static void f_dump_in_buffer_Num_dwb_flushed_block_volumes (char **s, const UINT64 *stat_vals, int *remaining_size)
 
static void perfmon_stat_dump_in_file_fix_page_array_stat (FILE *, const UINT64 *stats_ptr)
 
static void perfmon_stat_dump_in_file_promote_page_array_stat (FILE *, const UINT64 *stats_ptr)
 
static void perfmon_stat_dump_in_file_unfix_page_array_stat (FILE *, const UINT64 *stats_ptr)
 
static void perfmon_stat_dump_in_file_page_lock_time_array_stat (FILE *, const UINT64 *stats_ptr)
 
static void perfmon_stat_dump_in_file_page_hold_time_array_stat (FILE *, const UINT64 *stats_ptr)
 
static void perfmon_stat_dump_in_file_page_fix_time_array_stat (FILE *, const UINT64 *stats_ptr)
 
static void perfmon_stat_dump_in_file_snapshot_array_stat (FILE *, const UINT64 *stats_ptr)
 
static void perfmon_stat_dump_in_file_thread_stats (FILE *stream, const UINT64 *stats_ptr)
 
static void perfmon_stat_dump_in_file_thread_daemon_stats (FILE *stream, const UINT64 *stats_ptr)
 
static void perfmon_stat_dump_in_buffer_fix_page_array_stat (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_stat_dump_in_buffer_promote_page_array_stat (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_stat_dump_in_buffer_unfix_page_array_stat (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_stat_dump_in_buffer_page_lock_time_array_stat (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_stat_dump_in_buffer_page_hold_time_array_stat (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_stat_dump_in_buffer_page_fix_time_array_stat (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_stat_dump_in_buffer_snapshot_array_stat (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_stat_dump_in_buffer_thread_stats (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_stat_dump_in_buffer_thread_daemon_stats (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_print_timer_to_file (FILE *stream, int stat_index, UINT64 *stats_ptr)
 
static void perfmon_print_timer_to_buffer (char **s, int stat_index, UINT64 *stats_ptr, int *remained_size)
 
STATIC_INLINE size_t thread_stats_count (void)
 
STATIC_INLINE void perfmon_add_stat_at_offset (THREAD_ENTRY *thread_p, PERF_STAT_ID psid, const int offset, UINT64 amount) __attribute__((ALWAYS_INLINE))
 
static void perfmon_server_calc_stats (UINT64 *stats)
 
STATIC_INLINE const char * perfmon_stat_module_name (const int module) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE const char * perfmon_stat_page_type_name (const int page_type) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE const char * perfmon_stat_page_mode_name (const int page_mode) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE const char * perfmon_stat_holder_latch_name (const int holder_latch) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE const char * perfmon_stat_cond_type_name (const int cond_type) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE const char * perfmon_stat_promote_cond_name (const int cond_type) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE const char * perfmon_stat_snapshot_name (const int snapshot) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE const char * perfmon_stat_snapshot_record_type (const int rec_type) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE const char * perfmon_stat_lock_mode_name (const int lock_mode) __attribute__((ALWAYS_INLINE))
 
static const char * perfmon_stat_thread_stat_name (size_t index)
 
STATIC_INLINE void perfmon_get_peek_stats (UINT64 *stats) __attribute__((ALWAYS_INLINE))
 
int perfmon_calc_diff_stats (UINT64 *stats_diff, UINT64 *new_stats, UINT64 *old_stats)
 
void perfmon_server_dump_stats_to_buffer (const UINT64 *stats, char *buffer, int buf_size, const char *substr)
 
void perfmon_server_dump_stats (const UINT64 *stats, FILE *stream, const char *substr)
 
void perfmon_get_current_times (time_t *cpu_user_time, time_t *cpu_sys_time, time_t *elapsed_time)
 
static void perfmon_stat_dump_in_buffer_mvcc_snapshot_array_stat (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_stat_dump_in_file_mvcc_snapshot_array_stat (FILE *stream, const UINT64 *stats_ptr)
 
static void perfmon_stat_dump_in_buffer_obj_lock_array_stat (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_stat_dump_in_file_obj_lock_array_stat (FILE *stream, const UINT64 *stats_ptr)
 
static void perfmon_stat_dump_in_buffer_flushed_block_volumes_array_stat (const UINT64 *stats_ptr, char **s, int *remaining_size)
 
static void perfmon_stat_dump_in_file_flushed_block_volumes_array_stat (FILE *stream, const UINT64 *stats_ptr)
 
int perfmon_initialize (int num_trans)
 
void perfmon_finalize (void)
 
int perfmon_get_number_of_statistic_values (void)
 
UINT64 * perfmon_allocate_values (void)
 
char * perfmon_allocate_packed_values_buffer (void)
 
void perfmon_copy_values (UINT64 *dest, UINT64 *src)
 
char * perfmon_pack_stats (char *buf, UINT64 *stats)
 
char * perfmon_unpack_stats (char *buf, UINT64 *stats)
 
static size_t perfmon_per_daemon_stat_count (void)
 
static size_t perfmon_thread_daemon_stats_count (void)
 
static const char * perfmon_thread_daemon_name (size_t index)
 

Variables

const char * perfmon_Portable_worker_stat_names []
 
static const size_t PERFMON_PORTABLE_WORKER_STAT_COUNT
 
static const char * perfmon_Portable_daemon_stat_names []
 
static const size_t PERFMON_PORTABLE_DAEMON_STAT_COUNT
 
static const char * perfmon_Portable_daemon_names []
 
static const size_t PERFMON_PORTABLE_DAEMON_COUNT = sizeof (perfmon_Portable_daemon_names) / sizeof (const char *)
 

Macro Definition Documentation

#define PERFMON_VALUES_MEMSIZE   (pstat_Global.n_stat_values * sizeof (UINT64))
#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 }

Definition at line 110 of file perf_monitor.c.

#define PSTAT_METADATA_INIT_COMPUTED_RATIO (   id,
  name 
)    { id, name, PSTAT_COMPUTED_RATIO_VALUE, 0, 0, NULL, NULL, NULL }

Definition at line 108 of file perf_monitor.c.

#define PSTAT_METADATA_INIT_COUNTER_TIMER (   id,
  name 
)    { id, name, PSTAT_COUNTER_TIMER_VALUE, 0, 0, NULL, NULL, NULL }

Definition at line 107 of file perf_monitor.c.

#define PSTAT_METADATA_INIT_SINGLE_ACC (   id,
  name 
)    { id, name, PSTAT_ACCUMULATE_SINGLE_VALUE, 0, 0, NULL, NULL, NULL }

Definition at line 104 of file perf_monitor.c.

#define PSTAT_METADATA_INIT_SINGLE_PEEK (   id,
  name 
)    { id, name, PSTAT_PEEK_SINGLE_VALUE, 0, 0, NULL, NULL, NULL }

Definition at line 105 of file perf_monitor.c.

#define PSTAT_VALUE_CUSTOM   0x00000001

Definition at line 102 of file perf_monitor.c.

Function Documentation

static void f_dump_in_buffer_Num_data_page_fix_ext ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_buffer_Num_data_page_promote_ext ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_buffer_Num_data_page_promote_time_ext ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_buffer_Num_data_page_unfix_ext ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_buffer_Num_dwb_flushed_block_volumes ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_buffer_Num_mvcc_snapshot_ext ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_buffer_thread_daemon_stats ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_buffer_thread_stats ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_buffer_Time_data_page_fix_acquire_time ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_buffer_Time_data_page_hold_acquire_time ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_buffer_Time_data_page_lock_acquire_time ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_buffer_Time_obj_lock_acquire_time ( char **  s,
const UINT64 *  stat_vals,
int *  remaining_size 
)
static
static void f_dump_in_file_Num_data_page_fix_ext ( FILE *  f,
const UINT64 *  stat_vals 
)
static

Definition at line 3398 of file perf_monitor.c.

References perfmon_stat_dump_in_file_fix_page_array_stat().

static void f_dump_in_file_Num_data_page_promote_ext ( FILE *  f,
const UINT64 *  stat_vals 
)
static
static void f_dump_in_file_Num_data_page_promote_time_ext ( FILE *  f,
const UINT64 *  stat_vals 
)
static
static void f_dump_in_file_Num_data_page_unfix_ext ( FILE *  f,
const UINT64 *  stat_vals 
)
static
static void f_dump_in_file_Num_dwb_flushed_block_volumes ( FILE *  f,
const UINT64 *  stat_vals 
)
static
static void f_dump_in_file_Num_mvcc_snapshot_ext ( FILE *  f,
const UINT64 *  stat_vals 
)
static
static void f_dump_in_file_thread_daemon_stats ( FILE *  f,
const UINT64 *  stat_vals 
)
static
static void f_dump_in_file_thread_stats ( FILE *  f,
const UINT64 *  stat_vals 
)
static
static void f_dump_in_file_Time_data_page_fix_acquire_time ( FILE *  f,
const UINT64 *  stat_vals 
)
static
static void f_dump_in_file_Time_data_page_hold_acquire_time ( FILE *  f,
const UINT64 *  stat_vals 
)
static
static void f_dump_in_file_Time_data_page_lock_acquire_time ( FILE *  f,
const UINT64 *  stat_vals 
)
static
static void f_dump_in_file_Time_obj_lock_acquire_time ( FILE *  f,
const UINT64 *  stat_vals 
)
static
static int f_load_Count_get_oldest_mvcc_retry ( void  )
static

Definition at line 3386 of file perf_monitor.c.

References PERF_MODULE_CNT.

static int f_load_Count_get_snapshot_retry ( void  )
static

Definition at line 3355 of file perf_monitor.c.

References PERF_MODULE_CNT.

static int f_load_Num_data_page_fix_ext ( void  )
static

Definition at line 3245 of file perf_monitor.c.

References PERF_PAGE_FIX_COUNTERS.

static int f_load_Num_data_page_promote_ext ( void  )
static

Definition at line 3255 of file perf_monitor.c.

References PERF_PAGE_PROMOTE_COUNTERS.

static int f_load_Num_data_page_promote_time_ext ( void  )
static

Definition at line 3265 of file perf_monitor.c.

References PERF_PAGE_PROMOTE_COUNTERS.

static int f_load_Num_data_page_unfix_ext ( void  )
static

Definition at line 3275 of file perf_monitor.c.

References PERF_PAGE_UNFIX_COUNTERS.

static int f_load_Num_dwb_flushed_block_volumes ( void  )
static

Definition at line 3335 of file perf_monitor.c.

References PERF_DWB_FLUSHED_BLOCK_VOLUMES_CNT.

static int f_load_Num_mvcc_snapshot_ext ( void  )
static

Definition at line 3315 of file perf_monitor.c.

References PERF_MVCC_SNAPSHOT_COUNTERS.

static int f_load_thread_daemon_stats ( void  )
static

Definition at line 4131 of file perf_monitor.c.

References perfmon_thread_daemon_stats_count().

static int f_load_thread_stats ( void  )
static

Definition at line 3945 of file perf_monitor.c.

References thread_stats_count().

static int f_load_Time_data_page_fix_acquire_time ( void  )
static

Definition at line 3305 of file perf_monitor.c.

References PERF_PAGE_FIX_TIME_COUNTERS.

static int f_load_Time_data_page_hold_acquire_time ( void  )
static

Definition at line 3295 of file perf_monitor.c.

References PERF_PAGE_HOLD_TIME_COUNTERS.

static int f_load_Time_data_page_lock_acquire_time ( void  )
static

Definition at line 3285 of file perf_monitor.c.

References PERF_PAGE_LOCK_TIME_COUNTERS.

static int f_load_Time_get_oldest_mvcc_acquire_time ( void  )
static

Definition at line 3376 of file perf_monitor.c.

References PERF_MODULE_CNT.

static int f_load_Time_get_snapshot_acquire_time ( void  )
static

Definition at line 3345 of file perf_monitor.c.

References PERF_MODULE_CNT.

static int f_load_Time_obj_lock_acquire_time ( void  )
static

Definition at line 3325 of file perf_monitor.c.

References PERF_OBJ_LOCK_STAT_COUNTERS.

static int f_load_Time_tran_complete_time ( void  )
static

Definition at line 3365 of file perf_monitor.c.

References PERF_MODULE_CNT.

STATIC_INLINE void perfmon_add_stat_at_offset ( THREAD_ENTRY thread_p,
PERF_STAT_ID  psid,
const int  offset,
UINT64  amount 
)
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().

Here is the caller graph for this function:

UINT64* perfmon_allocate_values ( void  )
int perfmon_calc_diff_stats ( UINT64 *  stats_diff,
UINT64 *  new_stats,
UINT64 *  old_stats 
)
void perfmon_copy_values ( UINT64 *  dest,
UINT64 *  src 
)

Definition at line 3735 of file perf_monitor.c.

References PERFMON_VALUES_MEMSIZE.

void perfmon_get_current_times ( time_t *  cpu_user_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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

static void perfmon_print_timer_to_buffer ( char **  s,
int  stat_index,
UINT64 *  stats_ptr,
int *  remained_size 
)
static
static void perfmon_print_timer_to_file ( FILE *  stream,
int  stat_index,
UINT64 *  stats_ptr 
)
static
static void perfmon_server_calc_stats ( UINT64 *  stats)
static

Definition at line 1596 of file perf_monitor.c.

References assert, css_get_thread_stats(), i, PAGE_LOG, PERF_CONDITIONAL_FIX, PERF_CONDITIONAL_FIX_CNT, PERF_HOLDER_LATCH_CNT, PERF_HOLDER_LATCH_READ, PERF_MODULE_CNT, PERF_MODULE_SYSTEM, PERF_MODULE_VACUUM, PERF_PAGE_CNT, PERF_PAGE_FIX_COUNTERS, PERF_PAGE_FIX_STAT_OFFSET, PERF_PAGE_FIX_TIME_COUNTERS, PERF_PAGE_FIX_TIME_OFFSET, PERF_PAGE_HOLD_TIME_COUNTERS, PERF_PAGE_HOLD_TIME_OFFSET, PERF_PAGE_LOCK_TIME_COUNTERS, PERF_PAGE_LOCK_TIME_OFFSET, PERF_PAGE_MODE_CNT, PERF_PAGE_MODE_NEW_LOCK_WAIT, PERF_PAGE_MODE_NEW_NO_WAIT, PERF_PAGE_MODE_OLD_IN_BUFFER, PERF_PAGE_MODE_OLD_LOCK_WAIT, PERF_PAGE_PROMOTE_COUNTERS, PERF_PAGE_PROMOTE_STAT_OFFSET, PERF_PAGE_UNFIX_COUNTERS, PERF_PAGE_UNFIX_STAT_OFFSET, PERF_PAGE_UNKNOWN, PERF_PROMOTE_CONDITION_CNT, PERF_PROMOTE_ONLY_READER, pgbuf_peek_stats(), PSTAT_COUNT, PSTAT_COUNTER_TIMER_AVG_TIME_VALUE, PSTAT_COUNTER_TIMER_COUNT_VALUE, PSTAT_COUNTER_TIMER_TOTAL_TIME_VALUE, PSTAT_COUNTER_TIMER_VALUE, PSTAT_LOAD_THREAD_STATS, PSTAT_LOG_HIT_RATIO, PSTAT_LOG_NUM_FETCHES, PSTAT_LOG_NUM_IOREADS, PSTAT_PB_AVOID_DEALLOC_CNT, PSTAT_PB_AVOID_VICTIM_CNT, PSTAT_PB_DIRTY_CNT, PSTAT_PB_FIXED_CNT, PSTAT_PB_FLUSHED_BCBS_WAIT_FOR_ASSIGN, PSTAT_PB_HIT_RATIO, PSTAT_PB_LFCQ_BIG_PRV_NUM, PSTAT_PB_LFCQ_PRV_NUM, PSTAT_PB_LFCQ_SHR_NUM, PSTAT_PB_LRU1_CNT, PSTAT_PB_LRU2_CNT, PSTAT_PB_LRU3_CNT, PSTAT_PB_NUM_FETCHES, PSTAT_PB_NUM_IOREADS, PSTAT_PB_PAGE_ALLOCATE_TIME_RATIO, PSTAT_PB_PAGE_FIX_ACQUIRE_TIME_10USEC, PSTAT_PB_PAGE_HOLD_ACQUIRE_TIME_10USEC, PSTAT_PB_PAGE_LOCK_ACQUIRE_TIME_10USEC, PSTAT_PB_PAGE_PROMOTE_FAILED, PSTAT_PB_PAGE_PROMOTE_SUCCESS, PSTAT_PB_PAGE_PROMOTE_TOTAL_TIME_10USEC, PSTAT_PB_PRIVATE_COUNT, PSTAT_PB_PRIVATE_QUOTA, PSTAT_PB_VACUUM_EFFICIENCY, PSTAT_PB_VACUUM_FETCH_RATIO, PSTAT_PB_VICT_CAND, PSTAT_PB_WAIT_THREADS_HIGH_PRIO, PSTAT_PB_WAIT_THREADS_LOW_PRIO, PSTAT_PBX_FIX_COUNTERS, PSTAT_PBX_FIX_TIME_COUNTERS, PSTAT_PBX_HOLD_TIME_COUNTERS, PSTAT_PBX_LOCK_TIME_COUNTERS, PSTAT_PBX_PROMOTE_COUNTERS, PSTAT_PBX_PROMOTE_TIME_COUNTERS, PSTAT_PBX_UNFIX_COUNTERS, PSTAT_THREAD_STATS, PSTAT_VACUUM_DATA_HIT_RATIO, SAFE_DIV, pstat_metadata::start_offset, STATIC_INLINE, success(), and cubload::worker_manager_get_stats().

Referenced by perfmon_calc_diff_stats().

Here is the caller graph for this function:

void perfmon_server_dump_stats ( const UINT64 *  stats,
FILE *  stream,
const char *  substr 
)
void perfmon_server_dump_stats_to_buffer ( const UINT64 *  stats,
char *  buffer,
int  buf_size,
const char *  substr 
)
static void perfmon_stat_dump_in_buffer_flushed_block_volumes_array_stat ( const UINT64 *  stats_ptr,
char **  s,
int *  remaining_size 
)
static

Definition at line 2847 of file perf_monitor.c.

References assert, NULL, and PERF_DWB_FLUSHED_BLOCK_VOLUMES_CNT.

static void perfmon_stat_dump_in_buffer_mvcc_snapshot_array_stat ( const UINT64 *  stats_ptr,
char **  s,
int *  remaining_size 
)
static
static void perfmon_stat_dump_in_buffer_obj_lock_array_stat ( const UINT64 *  stats_ptr,
char **  s,
int *  remaining_size 
)
static

Definition at line 2781 of file perf_monitor.c.

References assert, NA_LOCK, NULL, perfmon_stat_lock_mode_name(), and SCH_M_LOCK.

Referenced by f_dump_in_buffer_Time_obj_lock_acquire_time().

Here is the caller graph for this function:

static void perfmon_stat_dump_in_buffer_page_fix_time_array_stat ( const UINT64 *  stats_ptr,
char **  s,
int *  remaining_size 
)
static

Definition at line 2650 of file perf_monitor.c.

References perfmon_stat_dump_in_buffer_page_lock_time_array_stat().

Referenced by f_dump_in_buffer_Time_data_page_fix_acquire_time().

Here is the caller graph for this function:

static void perfmon_stat_dump_in_buffer_page_hold_time_array_stat ( const UINT64 *  stats_ptr,
char **  s,
int *  remaining_size 
)
static
static void perfmon_stat_dump_in_buffer_snapshot_array_stat ( const UINT64 *  stats_ptr,
char **  s,
int *  remaining_size 
)
static
static void perfmon_stat_dump_in_buffer_thread_daemon_stats ( const UINT64 *  stats_ptr,
char **  s,
int *  remaining_size 
)
static
static void perfmon_stat_dump_in_buffer_thread_stats ( const UINT64 *  stats_ptr,
char **  s,
int *  remaining_size 
)
static

Definition at line 4022 of file perf_monitor.c.

References assert, NULL, perfmon_stat_thread_stat_name(), and thread_stats_count().

Referenced by f_dump_in_buffer_thread_stats().

Here is the caller graph for this function:

static void perfmon_stat_dump_in_buffer_unfix_page_array_stat ( const UINT64 *  stats_ptr,
char **  s,
int *  remaining_size 
)
static
static void perfmon_stat_dump_in_file_flushed_block_volumes_array_stat ( FILE *  stream,
const UINT64 *  stats_ptr 
)
static

Definition at line 2888 of file perf_monitor.c.

References assert, NULL, and PERF_DWB_FLUSHED_BLOCK_VOLUMES_CNT.

Referenced by f_dump_in_file_Num_dwb_flushed_block_volumes().

Here is the caller graph for this function:

static void perfmon_stat_dump_in_file_mvcc_snapshot_array_stat ( FILE *  stream,
const UINT64 *  stats_ptr 
)
static
static void perfmon_stat_dump_in_file_obj_lock_array_stat ( FILE *  stream,
const UINT64 *  stats_ptr 
)
static

Definition at line 2819 of file perf_monitor.c.

References assert, NA_LOCK, NULL, perfmon_stat_lock_mode_name(), and SCH_M_LOCK.

Referenced by f_dump_in_file_Time_obj_lock_acquire_time().

Here is the caller graph for this function:

static void perfmon_stat_dump_in_file_page_fix_time_array_stat ( FILE *  stream,
const UINT64 *  stats_ptr 
)
static

Definition at line 2664 of file perf_monitor.c.

References perfmon_stat_dump_in_file_page_lock_time_array_stat().

Referenced by f_dump_in_file_Time_data_page_fix_acquire_time().

Here is the caller graph for this function:

static void perfmon_stat_dump_in_file_snapshot_array_stat ( FILE *  stream,
const UINT64 *  stats_ptr 
)
static
static void perfmon_stat_dump_in_file_thread_daemon_stats ( FILE *  stream,
const UINT64 *  stats_ptr 
)
static

Definition at line 4160 of file perf_monitor.c.

References assert, NULL, perfmon_per_daemon_stat_count(), PERFMON_PORTABLE_DAEMON_COUNT, and perfmon_thread_daemon_name().

Referenced by f_dump_in_file_thread_daemon_stats().

Here is the caller graph for this function:

static void perfmon_stat_dump_in_file_thread_stats ( FILE *  stream,
const UINT64 *  stats_ptr 
)
static

Definition at line 3980 of file perf_monitor.c.

References assert, NULL, perfmon_stat_thread_stat_name(), and thread_stats_count().

Referenced by f_dump_in_file_thread_stats().

Here is the caller graph for this function:

static void perfmon_stat_dump_in_file_unfix_page_array_stat ( FILE *  stream,
const UINT64 *  stats_ptr 
)
static
STATIC_INLINE const char * perfmon_stat_lock_mode_name ( const int  lock_mode)
STATIC_INLINE const char * perfmon_stat_promote_cond_name ( const int  cond_type)

Definition at line 2074 of file perf_monitor.c.

References PERF_PROMOTE_ONLY_READER, and PERF_PROMOTE_SHARED_READER.

Referenced by perfmon_stat_dump_in_buffer_promote_page_array_stat(), and perfmon_stat_dump_in_file_promote_page_array_stat().

Here is the caller graph for this function:

static const char * perfmon_stat_thread_stat_name ( size_t  index)
static

Definition at line 3951 of file perf_monitor.c.

Referenced by perfmon_stat_dump_in_buffer_thread_stats(), and perfmon_stat_dump_in_file_thread_stats().

Here is the caller graph for this function:

static const char* perfmon_thread_daemon_name ( size_t  index)
static

Definition at line 4124 of file perf_monitor.c.

References assert.

Referenced by perfmon_stat_dump_in_buffer_thread_daemon_stats(), and perfmon_stat_dump_in_file_thread_daemon_stats().

Here is the caller graph for this function:

static size_t perfmon_thread_daemon_stats_count ( void  )
static

Definition at line 4118 of file perf_monitor.c.

References perfmon_per_daemon_stat_count().

Referenced by f_load_thread_daemon_stats().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

static size_t thread_stats_count ( void  )

Definition at line 186 of file perf_monitor.c.

Referenced by f_load_thread_stats(), perfmon_stat_dump_in_buffer_thread_stats(), and perfmon_stat_dump_in_file_thread_stats().

Here is the caller graph for this function:

Variable Documentation

const size_t PERFMON_PORTABLE_DAEMON_COUNT = sizeof (perfmon_Portable_daemon_names) / sizeof (const char *)
static
const char* perfmon_Portable_daemon_names[]
static
Initial value:
=
{
"Page_flush_daemon_thread",
"Page_post_flush_daemon_thread",
"Page_flush_control_daemon_thread",
"Page_maintenance_daemon_thread",
"Deadlock_detect_daemon_thread",
"Log_flush_daemon_thread",
}

Definition at line 4080 of file perf_monitor.c.

const size_t PERFMON_PORTABLE_DAEMON_STAT_COUNT
static
Initial value:
=
sizeof (perfmon_Portable_daemon_stat_names) / sizeof (const char *)
static const char * perfmon_Portable_daemon_stat_names[]

Definition at line 4077 of file perf_monitor.c.

Referenced by perfmon_per_daemon_stat_count().

const char* perfmon_Portable_daemon_stat_names[]
static
Initial value:
=
{
"daemon_loop_count",
"daemon_execute_time",
"daemon_pause_time",
"looper_sleep_count",
"looper_sleep_time",
"looper_reset_count",
"waiter_wakeup_count",
"waiter_lock_wakeup_count",
"waiter_sleep_count",
"waiter_timeout_count",
"waiter_no_sleep_count",
"waiter_awake_count",
"waiter_wakeup_delay_time",
}

Definition at line 4054 of file perf_monitor.c.

const size_t PERFMON_PORTABLE_WORKER_STAT_COUNT
static
Initial value:
=
sizeof (perfmon_Portable_worker_stat_names) / sizeof (const char *)
const char * perfmon_Portable_worker_stat_names[]

Definition at line 3916 of file perf_monitor.c.

const char* perfmon_Portable_worker_stat_names[]
Initial value:
=
{
"Counter_start_thread",
"Timer_start_thread",
"Counter_create_context",
"Timer_create_context",
"Counter_execute_task",
"Timer_execute_task",
"Counter_retire_task",
"Timer_retire_task",
"Counter_found_task_in_queue",
"Timer_found_task_in_queue",
"Counter_wakeup_with_task",
"Timer_wakeup_with_task",
"Counter_recycle_context",
"Timer_recycle_context",
"Counter_retire_context",
"Timer_retire_context"
}

Definition at line 3897 of file perf_monitor.c.