libfoedus-core
FOEDUS Core Library
|
Debug-Support functionalities. More...
Debug-Support functionalities.
The engine provides API to turn on/of various debug-support functionalities.
Classes | |
struct | DebuggingOptions |
Set of options for debugging support. More... | |
class | DebuggingSupports |
APIs to support debugging functionalities. More... | |
class | RdtscWatch |
A RDTSC-based low-overhead stop watch. More... | |
class | StopWatch |
A high-resolution stop watch. More... | |
Functions | |
uint64_t | get_rdtsc () |
Returns the current CPU cycle via x86 RDTSC. More... | |
void | wait_rdtsc_cycles (uint64_t cycles) |
Wait until the given CPU cycles elapse. More... | |
uint64_t | get_now_nanosec () |
Variables | |
int | static_glog_initialize_counter = 0 |
This and static_glog_initialize_lock are the only static variables we have in the entire code base. More... | |
std::mutex | static_glog_initialize_lock |
Exclusive lock variable for Google-logging's initialization/uninitialization. More... | |
uint64_t foedus::debugging::get_now_nanosec | ( | ) |
Definition at line 25 of file stop_watch.cpp.
Referenced by foedus::debugging::StopWatch::peek_elapsed_ns(), foedus::debugging::StopWatch::start(), and foedus::debugging::StopWatch::stop().
int foedus::debugging::static_glog_initialize_counter = 0 |
This and static_glog_initialize_lock are the only static variables we have in the entire code base.
Because google-logging requires initialization/uninitialization only once in a process, we need this to coordinate it between multiple engines. We increment/decrement this after taking lock on static_glog_initialize_lock. The one who observed "0" as old value on increment, will initialize glog. The one who observed "1" as old value on decrement, will uninitialize glog.
Definition at line 54 of file debugging_supports.cpp.
std::mutex foedus::debugging::static_glog_initialize_lock |
Exclusive lock variable for Google-logging's initialization/uninitialization.
Each thread takes this mutex while init/uninit glog.
Definition at line 61 of file debugging_supports.cpp.