|
libfoedus-core
FOEDUS Core Library
|
Debug-Support functionalities. More...
Debug-Support functionalities.
The engine provides API to turn on/of various debug-support functionalities.
|
Files | |
| file | fwd.hpp |
| Forward declarations of classes in debugging package. | |
| file | rdtsc.hpp |
| Implements an RDTSC (Real-time time stamp counter) wait to emulate latency on slower devices. | |
Classes | |
| struct | foedus::debugging::DebuggingOptions |
| Set of options for debugging support. More... | |
| struct | foedus::debugging::DebuggingSupports::PapiCounters |
| class | foedus::debugging::DebuggingSupports |
| APIs to support debugging functionalities. More... | |
| class | foedus::debugging::RdtscWatch |
| A RDTSC-based low-overhead stop watch. More... | |
| class | foedus::debugging::StopWatch |
| A high-resolution stop watch. More... | |
Functions | |
| uint64_t | foedus::debugging::get_rdtsc () |
| Returns the current CPU cycle via x86 RDTSC. More... | |
| void | foedus::debugging::wait_rdtsc_cycles (uint64_t cycles) |
| Wait until the given CPU cycles elapse. More... | |
| struct foedus::debugging::DebuggingSupports::PapiCounters |
Definition at line 37 of file debugging_supports.hpp.
| Class Members | ||
|---|---|---|
| long long int | counters_[128] | wanna use int64_t, but to align with PAPI... |
|
inline |
Returns the current CPU cycle via x86 RDTSC.
Definition at line 35 of file rdtsc.hpp.
Referenced by foedus::memory::SharedMemory::alloc(), foedus::debugging::RdtscWatch::start(), foedus::debugging::RdtscWatch::stop(), and foedus::debugging::wait_rdtsc_cycles().

|
inline |
Wait until the given CPU cycles elapse.
| [in] | cycles | CPU cycles to wait for |
In case of context switch to a different CPU that has a very different timing (esp on NUMA), we also check if the RDTSC value is not bogus. In that case, we exit the wait. This is also a safety net for wrap-around. Anyways, it's a rare case.
Definition at line 60 of file rdtsc.hpp.
References foedus::debugging::get_rdtsc().
Referenced by foedus::fs::DirectIoFile::read_raw(), foedus::fs::DirectIoFile::seek(), foedus::fs::DirectIoFile::write_raw(), and foedus::assorted::SpinlockStat::yield_backoff().

