File xasl_cache.c
FileList > cubrid > src > query > xasl_cache.c
Go to the source code of this file
#include "xasl_cache.h"
#include "binaryheap.h"
#include "compile_context.h"
#include "config.h"
#include "system_parameter.h"
#include "list_file.h"
#include "perf_monitor.h"
#include "query_executor.h"
#include "query_manager.h"
#include "statistics_sr.h"
#include "stream_to_xasl.h"
#include "thread_entry.hpp"
#include "thread_lockfree_hash_map.hpp"
#include "thread_manager.hpp"
#include "xasl_unpack_info.hpp"
#include "lock_table.h"
#include <algorithm>
#include <assert.h>
#include "memory_wrapper.hpp"
Classes
Public Types
Public Attributes
Public Static Attributes
Public Functions
| Type |
Name |
| bool |
xcache_can_entry_cache_list (XASL_CACHE_ENTRY * xcache_entry)
|
| void |
xcache_drop_all (THREAD_ENTRY * thread_p)
|
| void |
xcache_dump (THREAD_ENTRY * thread_p, FILE * fp)
|
| void |
xcache_finalize (THREAD_ENTRY * thread_p)
|
| int |
xcache_find_sha1 (THREAD_ENTRY * thread_p, const SHA1Hash * sha1, const XASL_CACHE_SEARCH_MODE search_mode, XASL_CACHE_ENTRY ** xcache_entry, xasl_cache_rt_check_result * rt_check)
|
| int |
xcache_find_xasl_id_for_execute (THREAD_ENTRY * thread_p, const XASL_ID * xid, XASL_CACHE_ENTRY ** xcache_entry, XASL_CLONE * xclone)
|
| int |
xcache_get_entry_count (void)
|
| int |
xcache_initialize (THREAD_ENTRY * thread_p)
|
| int |
xcache_insert (THREAD_ENTRY * thread_p, const compile_context * context, XASL_STREAM * stream, int n_oid, const OID * class_oids, const int * class_locks, const int * tcards, XASL_CACHE_ENTRY ** xcache_entry)
|
| int |
xcache_invalidate_qcaches (THREAD_ENTRY * thread_p, const OID * oid)
|
| void |
xcache_remove_by_oid (THREAD_ENTRY * thread_p, const OID * oid)
|
| void |
xcache_remove_by_sha1 (THREAD_ENTRY * thread_p, const char * sha1)
|
| void |
xcache_retire_clone (THREAD_ENTRY * thread_p, XASL_CACHE_ENTRY * xcache_entry, XASL_CLONE * xclone)
|
| void |
xcache_unfix (THREAD_ENTRY * thread_p, XASL_CACHE_ENTRY * xcache_entry)
|
| bool |
xcache_uses_clones (void)
|
Public Static Functions
| Type |
Name |
| bool |
xcache_check_recompilation_threshold (THREAD_ENTRY * thread_p, XASL_CACHE_ENTRY * xcache_entry)
|
| void |
xcache_cleanup (THREAD_ENTRY * thread_p)
|
| void |
xcache_clone_decache (THREAD_ENTRY * thread_p, XASL_CLONE * xclone, XASL_CACHE_ENTRY * xcache_entry)
|
| BH_CMP_RESULT |
xcache_compare_cleanup_candidates (const void * left, const void * right, BH_CMP_ARG ignore_arg)
|
| int |
xcache_compare_key (void * key1, void * key2)
|
| int |
xcache_copy_key (void * src, void * dest)
|
| void * |
xcache_entry_alloc (void)
|
| int |
xcache_entry_free (void * entry)
|
| INT32 |
xcache_entry_get_clonesize (XASL_CACHE_ENTRY * xcache_entry)
|
| INT32 |
xcache_entry_get_entrysize (XASL_CACHE_ENTRY * xcache_entry)
|
| INT32 |
xcache_entry_get_one_clonesize (XASL_CACHE_ENTRY * xcache_entry)
|
| int |
xcache_entry_init (void * entry)
|
| bool |
xcache_entry_is_related_to_oid (XASL_CACHE_ENTRY * xcache_entry, const void * arg)
|
| bool |
xcache_entry_is_related_to_sha1 (XASL_CACHE_ENTRY * xcache_entry, const void * arg)
|
| bool |
xcache_entry_mark_deleted (THREAD_ENTRY * thread_p, XASL_CACHE_ENTRY * xcache_entry)
|
| bool |
xcache_entry_set_request_recompile_flag (THREAD_ENTRY * thread_p, XASL_CACHE_ENTRY * xcache_entry, bool set_flag)
|
| int |
xcache_entry_uninit (void * entry)
|
| unsigned int |
xcache_hash_key (void * key, int hash_table_size)
|
| void |
xcache_invalidate_entries (THREAD_ENTRY * thread_p, bool(*)(XASL_CACHE_ENTRY *, const void *) invalidate_check, const void * arg)
|
| XCACHE_CLEANUP_REASON |
xcache_need_cleanup (void)
|
Macros
| Type |
Name |
| define |
TIME_DIFF_SEC (t1, t2) ([**t1.tv\_sec**](broker__monitor_8c.md#function-timeout) - [**t2.tv\_sec**](broker__monitor_8c.md#function-timeout))
|
| define |
XCACHE_ATOMIC_CAS_CACHE_FLAG (xid, oldcf, newcf) ([**ATOMIC\_CAS\_32**](broker__monitor_8c.md#function-timeout) (&(xid)->cache\_flag, [**oldcf**](broker__monitor_8c.md#function-timeout), [**newcf**](broker__monitor_8c.md#function-timeout)))
|
| define |
XCACHE_CLEANUP_MIN_NUM_ENTRIES 20
|
| define |
XCACHE_CLEANUP_NUM_ENTRIES (capacity) ([**MAX**](broker__monitor_8c.md#function-timeout) (([**int**](broker__monitor_8c.md#function-timeout)) (2 \* [**XCACHE\_CLEANUP\_RATIO**](xasl__cache_8c.md#define-xcache_cleanup_ratio) \* (capacity)), [**XCACHE\_CLEANUP\_MIN\_NUM\_ENTRIES**](xasl__cache_8c.md#define-xcache_cleanup_min_num_entries)))
|
| define |
XCACHE_CLEANUP_RATIO 0.2
|
| define |
XCACHE_DELETE_XIDS_SIZE 1024
|
| define |
XCACHE_ENTRY_CLEANUP (([**INT32**](broker__monitor_8c.md#function-timeout)) 0x08000000)
|
| define |
XCACHE_ENTRY_DELETED_BY_ME (([**XCACHE\_ENTRY\_MARK\_DELETED**](xasl__cache_8c.md#define-xcache_entry_mark_deleted) \| [**XCACHE\_ENTRY\_FIX\_COUNT\_MASK**](xasl__cache_8c.md#define-xcache_entry_fix_count_mask)) - [**logtb\_get\_current\_tran\_index**](log__impl_8h.md#function-logtb_get_current_tran_index) ())
|
| define |
XCACHE_ENTRY_FIX_COUNT_MASK (([**INT32**](broker__monitor_8c.md#function-timeout)) 0x00FFFFFF)
|
| define |
XCACHE_ENTRY_FLAGS_MASK (([**INT32**](broker__monitor_8c.md#function-timeout)) 0xFF000000)
|
| define |
XCACHE_ENTRY_MARK_DELETED (([**INT32**](broker__monitor_8c.md#function-timeout)) 0x80000000)
|
| define |
XCACHE_ENTRY_RECOMPILED_REQUESTED (([**INT32**](broker__monitor_8c.md#function-timeout)) 0x04000000)
|
| define |
XCACHE_ENTRY_SKIP_TO_BE_RECOMPILED (([**INT32**](broker__monitor_8c.md#function-timeout)) 0x10000000)
|
| define |
XCACHE_ENTRY_TO_BE_RECOMPILED (([**INT32**](broker__monitor_8c.md#function-timeout)) 0x40000000)
|
| define |
XCACHE_ENTRY_WAS_RECOMPILED (([**INT32**](broker__monitor_8c.md#function-timeout)) 0x20000000)
|
| define |
XCACHE_LOG_CLONE /* multi line expression */
|
| define |
XCACHE_LOG_CLONE_ARGS (xclone) [**XASL\_CLONE\_AS\_ARGS**](xasl__cache_8h.md#define-xasl_clone_as_args) ([**xclone**](broker__monitor_8c.md#function-timeout))
|
| define |
XCACHE_LOG_ENTRY_ARGS (xent) /* multi line expression */
|
| define |
XCACHE_LOG_ENTRY_OBJECT_ARGS (xent, oidx) /* multi line expression */
|
| define |
XCACHE_LOG_ENTRY_OBJECT_TEXT (msg) /* multi line expression */
|
| define |
XCACHE_LOG_ENTRY_PTR_TEXT "\t\t entry ptr = %[**p**](dynamic__load_8c.md#variable-p) \[**n"**](broker__monitor_8c.md#function-timeout)
|
| define |
XCACHE_LOG_ENTRY_TEXT (msg) /* multi line expression */
|
| define |
XCACHE_LOG_ERROR_TEXT "\t error\_code = %d \[**n"**](broker__monitor_8c.md#function-timeout)
|
| define |
XCACHE_LOG_EXEINFO_TEXT /* multi line expression */
|
| define |
XCACHE_LOG_OBJECT_TEXT /* multi line expression */
|
| define |
XCACHE_LOG_SHA1_ARGS (sha1) [**SHA1\_AS\_ARGS**](sha1_8h.md#define-sha1_as_args) (sha1)
|
| define |
XCACHE_LOG_SHA1_TEXT "\t\t\t sha1 = %08[**x**](broker__monitor_8c.md#function-timeout) \| %08[**x**](broker__monitor_8c.md#function-timeout) \| %08[**x**](broker__monitor_8c.md#function-timeout) \| %08[**x**](broker__monitor_8c.md#function-timeout) \| %08[**x**](broker__monitor_8c.md#function-timeout) \[**n"**](broker__monitor_8c.md#function-timeout)
|
| define |
XCACHE_LOG_TIME_STORED_TEXT "\t\t\t time [**stored**](broker__monitor_8c.md#function-timeout) = %d sec, %d usec \[**n"**](broker__monitor_8c.md#function-timeout)
|
| define |
XCACHE_LOG_TRAN_ARGS (thrd) [**LOG\_FIND\_THREAD\_TRAN\_INDEX**](perf__monitor_8h.md#define-log_find_thread_tran_index) (thrd)
|
| define |
XCACHE_LOG_TRAN_TEXT "\t tran = %d \[**n"**](broker__monitor_8c.md#function-timeout)
|
| define |
XCACHE_LOG_XASL_ID_ARGS (xid) /* multi line expression */
|
| define |
XCACHE_LOG_XASL_ID_TEXT (msg) /* multi line expression */
|
| define |
XCACHE_PTR_TO_ENTRY (ptr) (([**XASL\_CACHE\_ENTRY**](xasl__cache_8h.md#typedef-xasl_cache_entry) \*) ptr)
|
| define |
XCACHE_PTR_TO_KEY (ptr) (([**XASL\_ID**](storage__common_8h.md#typedef-xasl_id) \*) ptr)
|
| define |
XCACHE_RT_CLASS_STAT_NEED_UPDATE (class_pages, heap_pages) /* multi line expression */
|
| define |
XCACHE_RT_FACTOR 10 /\* 10x [**or**](broker__monitor_8c.md#function-timeout) 0.1[**x**](broker__monitor_8c.md#function-timeout) [**cardinal**](broker__monitor_8c.md#function-timeout) [**change**](broker__monitor_8c.md#function-timeout) \*/
|
| define |
XCACHE_RT_MAX_THRESHOLD 10000 /\* 10k pages \*/
|
| define |
XCACHE_RT_TIMEDIFF_IN_SEC 360 /\* 10 [**minutes**](broker__monitor_8c.md#function-timeout) \*/
|
| define |
XCACHE_STATS_INITIALIZER { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
|
| define |
XCACHE_STAT_GET (name) [**ATOMIC\_LOAD\_64**](broker__monitor_8c.md#function-timeout) (&xcache\_Global.stats.name)
|
| define |
XCACHE_STAT_INC (name) [**ATOMIC\_INC\_64**](broker__monitor_8c.md#function-timeout) (&xcache\_Global.stats.name, 1)
|
| define |
xcache_Cleanup_array xcache\_Global.cleanup\_array
|
| define |
xcache_Cleanup_bh xcache\_Global.cleanup\_bh
|
| define |
xcache_Cleanup_flag xcache\_Global.cleanup\_flag
|
| define |
xcache_Enabled xcache\_Global.enabled
|
| define |
xcache_Entry_count xcache\_Global.entry\_count
|
| define |
xcache_Hard_limit xcache\_Global.hard\_limit
|
| define |
xcache_Hashmap xcache\_Global.hashmap
|
| define |
xcache_Last_cleaned_time xcache\_Global.last\_cleaned\_time
|
| define |
xcache_Log xcache\_Global.logging\_enabled
|
| define |
xcache_Max_clones xcache\_Global.max\_clones
|
| define |
xcache_Max_plan_size xcache\_Global.max\_plan\_size
|
| define |
xcache_Memory_usage_cache xcache\_Global.memory\_usage\_cache
|
| define |
xcache_Memory_usage_clone xcache\_Global.memory\_usage\_clone
|
| define |
xcache_Soft_capacity xcache\_Global.soft\_capacity
|
| define |
xcache_Soft_limit xcache\_Global.soft\_limit
|
| define |
xcache_Time_threshold xcache\_Global.time\_threshold
|
| define |
xcache_check_logging () ([**xcache\_Log**](xasl__cache_8c.md#define-xcache_log) = [**prm\_get\_bool\_value**](system__parameter_8h.md#function-prm_get_bool_value) (PRM\_ID\_XASL\_CACHE\_LOGGING))
|
| define |
xcache_log (...) [**if**](dynamic__load_8c.md#function-if) ([**xcache\_Log**](xasl__cache_8c.md#define-xcache_log)) [**\_er\_log\_debug**](error__manager_8c.md#function-_er_log_debug) ([**ARG\_FILE\_LINE**](error__manager_8h.md#define-arg_file_line), "XASL [**CACHE:**](broker__monitor_8c.md#function-timeout) " \_\_VA\_ARGS\_\_)
|
| define |
xcache_log_error (...) [**if**](dynamic__load_8c.md#function-if) ([**xcache\_Log**](xasl__cache_8c.md#define-xcache_log)) [**\_er\_log\_debug**](error__manager_8c.md#function-_er_log_debug) ([**ARG\_FILE\_LINE**](error__manager_8h.md#define-arg_file_line), "XASL [**CACHE**](broker__monitor_8c.md#function-timeout) [**ERROR:**](broker__monitor_8c.md#function-timeout) " \_\_VA\_ARGS\_\_)
|
Public Types Documentation
typedef XCACHE
typedef struct xcache XCACHE;
typedef XCACHE_CLEANUP_CANDIDATE
typedef struct xcache_cleanup_candidate XCACHE_CLEANUP_CANDIDATE;
typedef XCACHE_STATS
typedef struct xcache_stats XCACHE_STATS;
typedef xcache_hashmap_iterator
using xcache_hashmap_iterator = xcache_hashmap_type::iterator;
typedef xcache_hashmap_type
using xcache_hashmap_type = cubthread::lockfree_hashmap<xasl_id, xasl_cache_ent>;
Public Attributes Documentation
variable xcache_Global
Public Static Attributes Documentation
variable xcache_Entry_descriptor
LF_ENTRY_DESCRIPTOR xcache_Entry_descriptor;
Public Functions Documentation
function xcache_can_entry_cache_list
bool xcache_can_entry_cache_list (
XASL_CACHE_ENTRY * xcache_entry
)
function xcache_drop_all
void xcache_drop_all (
THREAD_ENTRY * thread_p
)
function xcache_dump
void xcache_dump (
THREAD_ENTRY * thread_p,
FILE * fp
)
function xcache_finalize
void xcache_finalize (
THREAD_ENTRY * thread_p
)
function xcache_find_sha1
int xcache_find_sha1 (
THREAD_ENTRY * thread_p,
const SHA1Hash * sha1,
const XASL_CACHE_SEARCH_MODE search_mode,
XASL_CACHE_ENTRY ** xcache_entry,
xasl_cache_rt_check_result * rt_check
)
function xcache_find_xasl_id_for_execute
int xcache_find_xasl_id_for_execute (
THREAD_ENTRY * thread_p,
const XASL_ID * xid,
XASL_CACHE_ENTRY ** xcache_entry,
XASL_CLONE * xclone
)
function xcache_get_entry_count
int xcache_get_entry_count (
void
)
function xcache_initialize
int xcache_initialize (
THREAD_ENTRY * thread_p
)
function xcache_insert
int xcache_insert (
THREAD_ENTRY * thread_p,
const compile_context * context,
XASL_STREAM * stream,
int n_oid,
const OID * class_oids,
const int * class_locks,
const int * tcards,
XASL_CACHE_ENTRY ** xcache_entry
)
function xcache_invalidate_qcaches
int xcache_invalidate_qcaches (
THREAD_ENTRY * thread_p,
const OID * oid
)
function xcache_remove_by_oid
void xcache_remove_by_oid (
THREAD_ENTRY * thread_p,
const OID * oid
)
function xcache_remove_by_sha1
void xcache_remove_by_sha1 (
THREAD_ENTRY * thread_p,
const char * sha1
)
function xcache_retire_clone
void xcache_retire_clone (
THREAD_ENTRY * thread_p,
XASL_CACHE_ENTRY * xcache_entry,
XASL_CLONE * xclone
)
function xcache_unfix
void xcache_unfix (
THREAD_ENTRY * thread_p,
XASL_CACHE_ENTRY * xcache_entry
)
function xcache_uses_clones
bool xcache_uses_clones (
void
)
Public Static Functions Documentation
function xcache_check_recompilation_threshold
static bool xcache_check_recompilation_threshold (
THREAD_ENTRY * thread_p,
XASL_CACHE_ENTRY * xcache_entry
)
function xcache_cleanup
static void xcache_cleanup (
THREAD_ENTRY * thread_p
)
function xcache_clone_decache
static void xcache_clone_decache (
THREAD_ENTRY * thread_p,
XASL_CLONE * xclone,
XASL_CACHE_ENTRY * xcache_entry
)
function xcache_compare_cleanup_candidates
static BH_CMP_RESULT xcache_compare_cleanup_candidates (
const void * left,
const void * right,
BH_CMP_ARG ignore_arg
)
function xcache_compare_key
static int xcache_compare_key (
void * key1,
void * key2
)
function xcache_copy_key
static int xcache_copy_key (
void * src,
void * dest
)
function xcache_entry_alloc
static void * xcache_entry_alloc (
void
)
function xcache_entry_free
static int xcache_entry_free (
void * entry
)
function xcache_entry_get_clonesize
static INT32 xcache_entry_get_clonesize (
XASL_CACHE_ENTRY * xcache_entry
)
function xcache_entry_get_entrysize
static INT32 xcache_entry_get_entrysize (
XASL_CACHE_ENTRY * xcache_entry
)
function xcache_entry_get_one_clonesize
static INT32 xcache_entry_get_one_clonesize (
XASL_CACHE_ENTRY * xcache_entry
)
function xcache_entry_init
static int xcache_entry_init (
void * entry
)
function xcache_entry_is_related_to_oid
static bool xcache_entry_is_related_to_oid (
XASL_CACHE_ENTRY * xcache_entry,
const void * arg
)
function xcache_entry_is_related_to_sha1
static bool xcache_entry_is_related_to_sha1 (
XASL_CACHE_ENTRY * xcache_entry,
const void * arg
)
function xcache_entry_mark_deleted
static bool xcache_entry_mark_deleted (
THREAD_ENTRY * thread_p,
XASL_CACHE_ENTRY * xcache_entry
)
function xcache_entry_set_request_recompile_flag
static bool xcache_entry_set_request_recompile_flag (
THREAD_ENTRY * thread_p,
XASL_CACHE_ENTRY * xcache_entry,
bool set_flag
)
function xcache_entry_uninit
static int xcache_entry_uninit (
void * entry
)
function xcache_hash_key
static unsigned int xcache_hash_key (
void * key,
int hash_table_size
)
function xcache_invalidate_entries
static void xcache_invalidate_entries (
THREAD_ENTRY * thread_p,
bool (*)( XASL_CACHE_ENTRY *, const void *) invalidate_check,
const void * arg
)
function xcache_need_cleanup
static XCACHE_CLEANUP_REASON xcache_need_cleanup (
void
)
Macro Definition Documentation
define TIME_DIFF_SEC
#define TIME_DIFF_SEC (
t1,
t2
) `( t1.tv_sec - t2.tv_sec )`
define XCACHE_ATOMIC_CAS_CACHE_FLAG
#define XCACHE_ATOMIC_CAS_CACHE_FLAG (
xid,
oldcf,
newcf
) `( ATOMIC_CAS_32 (&(xid)->cache_flag, oldcf , newcf ))`
define XCACHE_CLEANUP_MIN_NUM_ENTRIES
#define XCACHE_CLEANUP_MIN_NUM_ENTRIES `20`
define XCACHE_CLEANUP_NUM_ENTRIES
#define XCACHE_CLEANUP_NUM_ENTRIES (
capacity
) `( MAX (( int ) (2 * XCACHE_CLEANUP_RATIO * (capacity)), XCACHE_CLEANUP_MIN_NUM_ENTRIES ))`
define XCACHE_CLEANUP_RATIO
#define XCACHE_CLEANUP_RATIO `0.2`
define XCACHE_DELETE_XIDS_SIZE
#define XCACHE_DELETE_XIDS_SIZE `1024`
define XCACHE_ENTRY_CLEANUP
#define XCACHE_ENTRY_CLEANUP `(( INT32 ) 0x08000000)`
define XCACHE_ENTRY_DELETED_BY_ME
#define XCACHE_ENTRY_DELETED_BY_ME `(( XCACHE_ENTRY_MARK_DELETED | XCACHE_ENTRY_FIX_COUNT_MASK ) - logtb_get_current_tran_index ())`
define XCACHE_ENTRY_FIX_COUNT_MASK
#define XCACHE_ENTRY_FIX_COUNT_MASK `(( INT32 ) 0x00FFFFFF)`
define XCACHE_ENTRY_FLAGS_MASK
#define XCACHE_ENTRY_FLAGS_MASK `(( INT32 ) 0xFF000000)`
define XCACHE_ENTRY_MARK_DELETED
#define XCACHE_ENTRY_MARK_DELETED `(( INT32 ) 0x80000000)`
define XCACHE_ENTRY_RECOMPILED_REQUESTED
#define XCACHE_ENTRY_RECOMPILED_REQUESTED `(( INT32 ) 0x04000000)`
define XCACHE_ENTRY_SKIP_TO_BE_RECOMPILED
#define XCACHE_ENTRY_SKIP_TO_BE_RECOMPILED `(( INT32 ) 0x10000000)`
define XCACHE_ENTRY_TO_BE_RECOMPILED
#define XCACHE_ENTRY_TO_BE_RECOMPILED `(( INT32 ) 0x40000000)`
define XCACHE_ENTRY_WAS_RECOMPILED
#define XCACHE_ENTRY_WAS_RECOMPILED `(( INT32 ) 0x20000000)`
define XCACHE_LOG_CLONE
#define XCACHE_LOG_CLONE `/* multi line expression */`
define XCACHE_LOG_CLONE_ARGS
#define XCACHE_LOG_CLONE_ARGS (
xclone
) `XASL_CLONE_AS_ARGS ( xclone )`
define XCACHE_LOG_ENTRY_ARGS
#define XCACHE_LOG_ENTRY_ARGS (
xent
) `/* multi line expression */`
define XCACHE_LOG_ENTRY_OBJECT_ARGS
#define XCACHE_LOG_ENTRY_OBJECT_ARGS (
xent,
oidx
) `/* multi line expression */`
define XCACHE_LOG_ENTRY_OBJECT_TEXT
#define XCACHE_LOG_ENTRY_OBJECT_TEXT (
msg
) `"\t\t " msg ": \n" \ XCACHE_LOG_OBJECT_TEXT`
define XCACHE_LOG_ENTRY_PTR_TEXT
#define XCACHE_LOG_ENTRY_PTR_TEXT `"\t\t entry ptr = % p \ n"`
define XCACHE_LOG_ENTRY_TEXT
#define XCACHE_LOG_ENTRY_TEXT (
msg
) `/* multi line expression */`
define XCACHE_LOG_ERROR_TEXT
#define XCACHE_LOG_ERROR_TEXT `"\t error_code = %d \ n"`
define XCACHE_LOG_EXEINFO_TEXT
#define XCACHE_LOG_EXEINFO_TEXT `/* multi line expression */`
define XCACHE_LOG_OBJECT_TEXT
#define XCACHE_LOG_OBJECT_TEXT `/* multi line expression */`
define XCACHE_LOG_SHA1_ARGS
#define XCACHE_LOG_SHA1_ARGS (
sha1
) `SHA1_AS_ARGS (sha1)`
define XCACHE_LOG_SHA1_TEXT
#define XCACHE_LOG_SHA1_TEXT `"\t\t\t sha1 = %08 x | %08 x | %08 x | %08 x | %08 x \ n"`
define XCACHE_LOG_TIME_STORED_TEXT
#define XCACHE_LOG_TIME_STORED_TEXT `"\t\t\t time stored = %d sec, %d usec \ n"`
define XCACHE_LOG_TRAN_ARGS
#define XCACHE_LOG_TRAN_ARGS (
thrd
) `LOG_FIND_THREAD_TRAN_INDEX (thrd)`
define XCACHE_LOG_TRAN_TEXT
#define XCACHE_LOG_TRAN_TEXT `"\t tran = %d \ n"`
define XCACHE_LOG_XASL_ID_ARGS
#define XCACHE_LOG_XASL_ID_ARGS (
xid
) `SHA1_AS_ARGS (&(xid)->sha1), \ CACHE_TIME_AS_ARGS (&(xid)->time_stored)`
define XCACHE_LOG_XASL_ID_TEXT
#define XCACHE_LOG_XASL_ID_TEXT (
msg
) `"\t\t " msg ": \n" \ XCACHE_LOG_SHA1_TEXT \ XCACHE_LOG_TIME_STORED_TEXT`
define XCACHE_PTR_TO_ENTRY
#define XCACHE_PTR_TO_ENTRY (
ptr
) `(( XASL_CACHE_ENTRY *) ptr)`
define XCACHE_PTR_TO_KEY
#define XCACHE_PTR_TO_KEY (
ptr
) `(( XASL_ID *) ptr)`
define XCACHE_RT_CLASS_STAT_NEED_UPDATE
#define XCACHE_RT_CLASS_STAT_NEED_UPDATE (
class_pages,
heap_pages
) `/* multi line expression */`
define XCACHE_RT_FACTOR
#define XCACHE_RT_FACTOR `10 /* 10x or 0.1 x cardinal change */`
define XCACHE_RT_MAX_THRESHOLD
#define XCACHE_RT_MAX_THRESHOLD `10000 /* 10k pages */`
define XCACHE_RT_TIMEDIFF_IN_SEC
#define XCACHE_RT_TIMEDIFF_IN_SEC `360 /* 10 minutes */`
define XCACHE_STATS_INITIALIZER
#define XCACHE_STATS_INITIALIZER `{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }`
define XCACHE_STAT_GET
#define XCACHE_STAT_GET (
name
) `ATOMIC_LOAD_64 (&xcache_Global.stats.name)`
define XCACHE_STAT_INC
#define XCACHE_STAT_INC (
name
) `ATOMIC_INC_64 (&xcache_Global.stats.name, 1)`
define xcache_Cleanup_array
#define xcache_Cleanup_array `xcache_Global.cleanup_array`
define xcache_Cleanup_bh
#define xcache_Cleanup_bh `xcache_Global.cleanup_bh`
define xcache_Cleanup_flag
#define xcache_Cleanup_flag `xcache_Global.cleanup_flag`
define xcache_Enabled
#define xcache_Enabled `xcache_Global.enabled`
define xcache_Entry_count
#define xcache_Entry_count `xcache_Global.entry_count`
define xcache_Hard_limit
#define xcache_Hard_limit `xcache_Global.hard_limit`
define xcache_Hashmap
#define xcache_Hashmap `xcache_Global.hashmap`
define xcache_Last_cleaned_time
#define xcache_Last_cleaned_time `xcache_Global.last_cleaned_time`
define xcache_Log
#define xcache_Log `xcache_Global.logging_enabled`
define xcache_Max_clones
#define xcache_Max_clones `xcache_Global.max_clones`
define xcache_Max_plan_size
#define xcache_Max_plan_size `xcache_Global.max_plan_size`
define xcache_Memory_usage_cache
#define xcache_Memory_usage_cache `xcache_Global.memory_usage_cache`
define xcache_Memory_usage_clone
#define xcache_Memory_usage_clone `xcache_Global.memory_usage_clone`
define xcache_Soft_capacity
#define xcache_Soft_capacity `xcache_Global.soft_capacity`
define xcache_Soft_limit
#define xcache_Soft_limit `xcache_Global.soft_limit`
define xcache_Time_threshold
#define xcache_Time_threshold `xcache_Global.time_threshold`
define xcache_check_logging
#define xcache_check_logging (
) `( xcache_Log = prm_get_bool_value ( PRM_ID_XASL_CACHE_LOGGING ))`
define xcache_log
#define xcache_log (
...
) `if ( xcache_Log ) _er_log_debug ( ARG_FILE_LINE , "XASL CACHE: " __VA_ARGS__)`
define xcache_log_error
#define xcache_log_error (
...
) `if ( xcache_Log ) _er_log_debug ( ARG_FILE_LINE , "XASL CACHE ERROR: " __VA_ARGS__)`
The documentation for this class was generated from the following file cubrid/src/query/xasl_cache.c