CUBRID Engine
latest
|
Namespaces | |
internal_tasks_worker_pool | |
Classes | |
class | callable_task |
class | callable_task< void > |
class | context_manager |
class | daemon |
class | daemon_entry_manager |
class | entry |
class | entry_manager |
class | lockfree_hashmap |
class | looper |
class | manager |
class | task |
class | task< void > |
struct | wait_duration |
class | waiter |
class | worker_pool |
class | worker_pool_task_capper |
Typedefs | |
using | entry_task = task< entry > |
using | entry_callable_task = callable_task< entry > |
typedef std::chrono::system_clock::duration | delta_time |
typedef std::function< void(bool &, delta_time &)> | period_function |
using | entry_workpool = worker_pool< entry > |
using | task_without_context = task< void > |
using | wait_seconds = wait_duration< std::chrono::seconds > |
typedef std::chrono::system_clock::duration cubthread::delta_time |
Definition at line 40 of file thread_looper.hpp.
using cubthread::entry_callable_task = typedef callable_task<entry> |
Definition at line 58 of file thread_entry_task.hpp.
using cubthread::entry_task = typedef task<entry> |
Definition at line 57 of file thread_entry_task.hpp.
using cubthread::entry_workpool = typedef worker_pool<entry> |
Definition at line 65 of file thread_manager.hpp.
typedef std::function<void (bool &, delta_time &)> cubthread::period_function |
Definition at line 41 of file thread_looper.hpp.
using cubthread::task_without_context = typedef task<void> |
Definition at line 131 of file thread_task.hpp.
using cubthread::wait_seconds = typedef wait_duration<std::chrono::seconds> |
Definition at line 133 of file thread_waiter.hpp.
void cubthread::check_not_single_thread | ( | void | ) |
Definition at line 630 of file thread_manager.cpp.
References assert.
Referenced by cubthread::manager::create_and_track_resource(), cubthread::manager::destroy_and_untrack_resource(), cubthread::manager::push_task(), cubthread::manager::push_task_on_core(), and cubthread::manager::try_task().
void cubthread::clear_thread_local_entry | ( | void | ) |
Definition at line 617 of file thread_manager.cpp.
Referenced by test_mvcc_get_oldest(), test_mvcc_get_snapshot(), and test_new_mvcc_complete().
void cubthread::condvar_wait | ( | std::condition_variable & | condvar, |
std::unique_lock< std::mutex > & | lock, | ||
const wait_duration< D > & | duration | ||
) |
Definition at line 148 of file thread_waiter.hpp.
References cubthread::wait_duration< D >::m_duration, and cubthread::wait_duration< D >::m_infinite.
Referenced by cubthread::worker_pool< Context >::core::worker::get_new_task().
bool cubthread::condvar_wait | ( | std::condition_variable & | condvar, |
std::unique_lock< std::mutex > & | lock, | ||
const wait_duration< D > & | duration, | ||
P | pred | ||
) |
Definition at line 163 of file thread_waiter.hpp.
References cubthread::wait_duration< D >::m_duration, and cubthread::wait_duration< D >::m_infinite.
void cubthread::finalize | ( | void | ) |
Definition at line 514 of file thread_manager.cpp.
References cuberr::context::deregister_thread_local(), cubthread::entry::get_error_context(), Main_entry_p, Manager, and NULL.
Referenced by boot_restart_server(), net_server_start(), xboot_delete(), xboot_initialize_server(), and xboot_shutdown_server().
entry & cubthread::get_entry | ( | void | ) |
Definition at line 599 of file thread_manager.cpp.
References assert, NULL, and tl_Entry_p.
Referenced by mvcctable::compute_oldest_visible_mvccid(), cubload::error_handler::get_driver_lineno(), cubmem::get_private_heapid(), cubload::error_handler::get_scanner_lineno(), cuberr::context::get_thread_local_context(), heap_classrepr_logging_template(), cubload::server_object_loader::init(), cubload::session::interrupt(), ldr_init_driver(), ldr_sa_load(), cubload::server_class_installer::locate_class(), cubload::session::notify_batch_done_and_register_tran_end(), cubthread::manager::push_task(), cubthread::manager::push_task_on_core(), cubload::server_class_installer::register_class_with_attributes(), log_system_tdes::rv_end_simulation(), log_system_tdes::rv_simulate_system_tdes(), vacuum_job_cursor::search(), cubload::session::session(), vacuum_job_cursor::start_job_on_current_entry(), thread_get_thread_entry_info(), vacuum_job_cursor::unload(), and vacuum_data::update().
entry * cubthread::get_main_entry | ( | void | ) |
Definition at line 569 of file thread_manager.cpp.
References assert, Main_entry_p, and NULL.
manager * cubthread::get_manager | ( | void | ) |
Definition at line 577 of file thread_manager.cpp.
References assert, Manager, and NULL.
Referenced by cubthread::entry_manager::create_context(), css_init(), css_internal_connection_handler(), dwb_read_page(), get_thread_entry_lftransys(), cuberr::context::get_thread_local_context(), cubthread::internal_tasks_worker_pool::initialize(), lock_initialize(), log_is_log_flush_daemon_available(), log_stop_ha_delay_registration(), pgbuf_get_page_flush_interval(), cubthread::entry_manager::retire_context(), session_free_prepared_statement(), thread_get_manager(), vacuum_boot(), vacuum_data_unload_first_and_last_page(), vacuum_stop_master(), vacuum_stop_workers(), cubload::worker_manager_register_session(), and cubload::worker_manager_unregister_session().
std::size_t cubthread::get_max_thread_count | ( | void | ) |
Definition at line 592 of file thread_manager.cpp.
References cubthread::manager::get_max_thread_count(), and NULL.
Referenced by thread_num_total_threads().
lockfree::tran::system & cubthread::get_thread_entry_lftransys | ( | ) |
Definition at line 26 of file thread_lockfree_hash_map.cpp.
References cubthread::manager::get_lockfree_transys(), and get_manager().
Referenced by cubthread::lockfree_hashmap< Key, T >::init().
void cubthread::initialize | ( | entry *& | my_entry | ) |
Definition at line 472 of file thread_manager.cpp.
References assert, cubthread::entry::get_error_context(), cubthread::entry::index, cubthread::entry::m_status, Main_entry_p, cubthread::manager::manager(), NULL, prm_get_bool_value(), PRM_ID_PERF_TEST_MODE, cubthread::entry::register_id(), cuberr::context::register_thread_local(), cubthread::entry::resume_status, thread_get_thread_entry_info(), THREAD_RESUME_NONE, cubthread::entry::tran_index, cubthread::entry::TS_RUN, and wp_set_force_thread_always_alive().
Referenced by boot_restart_server(), net_server_start(), xboot_delete(), xboot_emergency_patch(), and xboot_initialize_server().
int cubthread::initialize_thread_entries | ( | bool | with_lock_free | ) |
Definition at line 532 of file thread_manager.cpp.
References cubthread::manager::alloc_entries(), assert, ASSERT_ERROR, lockfree::tran::system::assign_index(), cubthread::entry::assign_lf_tran_index(), cubthread::manager::get_lockfree_transys(), cubthread::manager::get_max_thread_count(), cubthread::manager::init_entries(), cubthread::manager::init_lockfree_system(), lf_initialize_transaction_systems(), NO_ERROR, NULL, cubthread::entry::request_lock_free_transactions(), and cubthread::manager::set_max_thread_count_from_config().
Referenced by boot_restart_server(), xboot_delete(), xboot_emergency_patch(), and xboot_initialize_server().
Definition at line 650 of file thread_manager.cpp.
References flag< T >::is_flag_set(), prm_get_integer_value(), and PRM_ID_THREAD_LOGGING_FLAG.
Referenced by btree_is_worker_pool_logging_true(), css_init(), and vacuum_boot().
bool cubthread::is_single_thread | ( | void | ) |
Definition at line 624 of file thread_manager.cpp.
References Is_single_thread.
Referenced by cubthread::manager::create_daemon(), cubthread::manager::create_daemon_without_entry(), cubthread::manager::create_worker_pool(), rmutex_lock(), and rmutex_unlock().
void cubthread::return_lock_free_transaction_entries | ( | void | ) |
Definition at line 636 of file thread_manager.cpp.
References NULL, cubthread::manager::return_lock_free_transaction_entries(), and cubthread::entry::return_lock_free_transaction_entries().
Referenced by cubthread::manager::get_lockfree_transys(), and thread_return_lock_free_transaction_entries().
void cubthread::set_manager | ( | manager * | manager | ) |
Definition at line 584 of file thread_manager.cpp.
References assert, cubthread::manager::manager(), and NULL.
void cubthread::set_thread_local_entry | ( | entry & | tl_entry | ) |
Definition at line 610 of file thread_manager.cpp.
Referenced by test_mvcc_get_oldest(), test_mvcc_get_snapshot(), and test_new_mvcc_complete().
std::size_t cubthread::system_core_count | ( | void | ) |
Definition at line 113 of file thread_worker_pool.cpp.
References cubregex::count().
Referenced by css_init().
void cubthread::wp_call_func_throwing_system_error | ( | const char * | message, |
Func & | func | ||
) |
Definition at line 1457 of file thread_worker_pool.hpp.
References wp_handle_system_error().
Referenced by cubthread::worker_pool< Context >::core::worker::start_thread().
void cubthread::wp_er_log_stats | ( | const char * | header, |
cubperf::stat_value * | statsp | ||
) |
Definition at line 134 of file thread_worker_pool.cpp.
References _er_log_debug(), ARG_FILE_LINE, cubperf::statset_definition::get_value_count(), and cubperf::statset_definition::get_value_name().
Referenced by cubthread::worker_pool< Context >::er_log_stats().
Definition at line 126 of file thread_worker_pool.cpp.
References ARG_FILE_LINE, assert, and er_print_callstack().
Referenced by wp_call_func_throwing_system_error().
bool cubthread::wp_is_thread_always_alive_forced | ( | ) |
Definition at line 37 of file thread_worker_pool.cpp.
References FORCE_THREAD_ALWAYS_ALIVE.
Referenced by cubthread::worker_pool< Context >::worker_pool().
void cubthread::wp_set_force_thread_always_alive | ( | ) |
Definition at line 43 of file thread_worker_pool.cpp.
Referenced by initialize().
void cubthread::wp_worker_statset_accumulate | ( | const cubperf::statset & | what, |
cubperf::stat_value * | where | ||
) |
Definition at line 91 of file thread_worker_pool.cpp.
References cubperf::statset_definition::add_stat_values_with_converted_timers().
Referenced by cubthread::worker_pool< Context >::core::worker::get_stats().
cubperf::statset & cubthread::wp_worker_statset_create | ( | void | ) |
Definition at line 73 of file thread_worker_pool.cpp.
References cubperf::statset_definition::create_statset().
void cubthread::wp_worker_statset_destroy | ( | cubperf::statset & | stats | ) |
Definition at line 79 of file thread_worker_pool.cpp.
Referenced by cubthread::worker_pool< Context >::core::worker::~worker().
std::size_t cubthread::wp_worker_statset_get_count | ( | void | ) |
Definition at line 97 of file thread_worker_pool.cpp.
References cubperf::statset_definition::get_value_count().
const char * cubthread::wp_worker_statset_get_name | ( | std::size_t | stat_index | ) |
Definition at line 103 of file thread_worker_pool.cpp.
References cubperf::statset_definition::get_value_name().
void cubthread::wp_worker_statset_time_and_increment | ( | cubperf::statset & | stats, |
cubperf::stat_id | id | ||
) |
Definition at line 85 of file thread_worker_pool.cpp.
References cubperf::statset_definition::time_and_increment().
Referenced by cubthread::worker_pool< Context >::core::worker::execute_current_task(), cubthread::worker_pool< Context >::core::worker::finish_run(), cubthread::worker_pool< Context >::core::worker::get_new_task(), cubthread::worker_pool< Context >::core::worker::init_run(), and cubthread::worker_pool< Context >::core::worker::retire_current_task().
const std::size_t cubthread::ALLOC_TRACK_MAX_ITEMS = 32767 |
Definition at line 65 of file thread_entry.cpp.
const char* cubthread::ALLOC_TRACK_NAME = "Virtual Memory" |
Definition at line 63 of file thread_entry.cpp.
const char* cubthread::ALLOC_TRACK_RES_NAME = "res_ptr" |
Definition at line 64 of file thread_entry.cpp.
constexpr size_t cubthread::CORE_COUNT = 1 |
Definition at line 30 of file internal_tasks_worker_pool.cpp.
|
static |
Definition at line 39 of file thread_daemon.cpp.
constexpr bool cubthread::ENABLE_LOGGING = true |
Definition at line 31 of file internal_tasks_worker_pool.cpp.
Definition at line 54 of file thread_entry.cpp.
|
static |
Definition at line 34 of file thread_worker_pool.cpp.
Referenced by wp_is_thread_always_alive_forced().
entry_workpool* cubthread::instance = NULL |
Definition at line 33 of file internal_tasks_worker_pool.cpp.
Referenced by cubthread::internal_tasks_worker_pool::finalize(), cubthread::internal_tasks_worker_pool::get_instance(), otable_insert(), and otable_reserve().
Definition at line 465 of file thread_manager.cpp.
Referenced by cubthread::manager::find_by_tid(), and is_single_thread().
const int cubthread::LOG_DAEMON_ALL = 0xFFFF0000 |
Definition at line 305 of file thread_manager.hpp.
const int cubthread::LOG_DAEMON_VACUUM = 0x10000 |
Definition at line 304 of file thread_manager.hpp.
const int cubthread::LOG_MANAGER = 0x1 |
Definition at line 293 of file thread_manager.hpp.
const int cubthread::LOG_MANAGER_ALL = 0xFF |
Definition at line 294 of file thread_manager.hpp.
const int cubthread::LOG_WORKER_POOL_ALL = 0xFF00 |
Definition at line 301 of file thread_manager.hpp.
const int cubthread::LOG_WORKER_POOL_CONNECTIONS = 0x200 |
Definition at line 298 of file thread_manager.hpp.
Referenced by css_init().
const int cubthread::LOG_WORKER_POOL_INDEX_BUILDER = 0x800 |
Definition at line 300 of file thread_manager.hpp.
Referenced by btree_is_worker_pool_logging_true().
const int cubthread::LOG_WORKER_POOL_TRAN_WORKERS = 0x400 |
Definition at line 299 of file thread_manager.hpp.
Referenced by css_init().
const int cubthread::LOG_WORKER_POOL_VACUUM = 0x100 |
Definition at line 297 of file thread_manager.hpp.
Referenced by vacuum_boot().
|
static |
Definition at line 36 of file thread_looper.cpp.
Definition at line 469 of file thread_manager.cpp.
Referenced by finalize(), get_main_entry(), and initialize().
Definition at line 468 of file thread_manager.cpp.
Referenced by finalize(), and get_manager().
const std::size_t cubthread::MAX_LOOPER_PERIODS = 3 |
Definition at line 44 of file thread_looper.hpp.
const unsigned cubthread::PGBUF_TRACK_MAX_AMOUNT = 16 |
Definition at line 71 of file thread_entry.cpp.
const std::size_t cubthread::PGBUF_TRACK_MAX_ITEMS = 1024 |
Definition at line 70 of file thread_entry.cpp.
const char* cubthread::PGBUF_TRACK_NAME = "Page Buffer" |
Definition at line 68 of file thread_entry.cpp.
const char* cubthread::PGBUF_TRACK_RES_NAME = "pgptr" |
Definition at line 69 of file thread_entry.cpp.
|
static |
Definition at line 40 of file thread_waiter.cpp.
|
static |
Definition at line 36 of file thread_waiter.cpp.
|
static |
Definition at line 37 of file thread_daemon.cpp.
|
static |
Definition at line 38 of file thread_daemon.cpp.
|
static |
Definition at line 35 of file thread_looper.cpp.
|
static |
Definition at line 34 of file thread_looper.cpp.
|
static |
Definition at line 39 of file thread_waiter.cpp.
|
static |
Definition at line 37 of file thread_waiter.cpp.
|
static |
Definition at line 38 of file thread_waiter.cpp.
|
static |
Definition at line 53 of file thread_waiter.cpp.
Referenced by cubthread::waiter::get_stat_name().
constexpr size_t cubthread::TASK_COUNT = 10 |
Definition at line 29 of file internal_tasks_worker_pool.cpp.
Definition at line 47 of file thread_manager.cpp.
Referenced by cubthread::manager::claim_entry(), and get_entry().
|
static |
Definition at line 41 of file thread_waiter.cpp.
constexpr size_t cubthread::WORKER_COUNT = 2 |
Definition at line 28 of file internal_tasks_worker_pool.cpp.
|
static |
Definition at line 52 of file thread_worker_pool.cpp.
|
static |
Definition at line 491 of file thread_worker_pool.hpp.
|
static |
Definition at line 492 of file thread_worker_pool.hpp.
|
static |
Definition at line 494 of file thread_worker_pool.hpp.
|
static |
Definition at line 496 of file thread_worker_pool.hpp.
|
static |
Definition at line 497 of file thread_worker_pool.hpp.
|
static |
Definition at line 493 of file thread_worker_pool.hpp.
|
static |
Definition at line 490 of file thread_worker_pool.hpp.
|
static |
Definition at line 495 of file thread_worker_pool.hpp.