20 #include <glog/logging.h>
56 bool intermediate_only,
59 << std::endl <<
"***************************************************************"
61 << std::endl <<
"*** volatile_only=" << volatile_only
62 <<
", intermediate_only=" << intermediate_only <<
", max_pages=" << max_pages
63 << std::endl <<
"***************************************************************";
73 LOG(INFO) <<
"First, dumping volatile pages...";
76 LOG(INFO) <<
"No volatile pages.";
81 uint32_t remaining = max_pages - 1U;
90 LOG(INFO) <<
"Dumped volatile pages.";
92 LOG(INFO) <<
"Now dumping snapshot pages...";
94 LOG(INFO) <<
"No snapshot pages.";
99 uint32_t remaining = max_pages - 1U;
108 LOG(INFO) <<
"Dumped snapshot pages.";
120 bool follow_volatile,
121 bool intermediate_only,
122 uint32_t* remaining) {
123 if (((*remaining) == 0) || --(*remaining) == 0) {
124 LOG(INFO) <<
"Reached write-out max. skip the following";
128 LOG(INFO) << *parent;
130 if (bottom && intermediate_only) {
136 for (uint8_t i = 0; i < kHashIntermediatePageFanout && ((*remaining) > 0); ++i) {
138 if (follow_volatile) {
185 bool follow_volatile,
186 uint32_t* remaining) {
191 if ((*remaining) == 0 || --(*remaining) == 0) {
192 LOG(INFO) <<
"Reached write-out max. skip the following";
199 if (follow_volatile) {
215 << std::endl <<
"***************************************************************"
217 << std::endl <<
"*** temperature stat for HCC"
218 << std::endl <<
"***************************************************************";
222 LOG(INFO) <<
"No volatile pages.";
227 LOG(INFO) <<
"Done resettting";
237 const bool bottom = page->
get_level() == 0;
261 cur =
reinterpret_cast<HashDataPage*
>(resolver.resolve_offset(next_id));
memory::AlignedMemory buf_
numa_alloc_onnode() and numa_free().
Represents a pointer to another page (usually a child page).
ErrorStack debugout_single_thread(Engine *engine, bool volatile_only, bool intermediate_only, uint32_t max_pages)
These are defined in hash_storage_debug.cpp.
ErrorCode read_page(storage::SnapshotPagePointer page_id, void *out)
Automatically calls if uninitialize() wasn't called when it gets out of scope, and just complains whe...
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
const GlobalVolatilePageResolver & get_global_volatile_page_resolver() const
Returns the page resolver to convert volatile page ID to page pointer.
Represents a pointer to a volatile page with modification count for preventing ABA.
ErrorStack uninitialize() override final
Typical implementation of Initializable::uninitialize() that provides uninitialize-once semantics...
Brings error stacktrace information as return value of functions.
ErrorStack hcc_reset_all_temperature_stat()
For stupid reasons (I'm lazy!) these are defined in _debug.cpp.
void alloc(uint64_t size, uint64_t alignment, AllocType alloc_type, int numa_node) noexcept
Allocate a memory, releasing the current memory if exists.
Engine * engine_
Most attachable object stores an engine pointer (local engine), so we define it here.
Holds a set of read-only file objects for snapshot files.
ErrorStack hcc_reset_all_temperature_stat_intermediate(VolatilePagePointer intermediate_page_id)
VolatilePagePointer volatile_pointer_
ErrorStack debugout_single_thread_data(Engine *engine, cache::SnapshotFileSet *fileset, HashDataPage *head, bool follow_volatile, uint32_t *remaining_pages)
HashStorageControlBlock * control_block_
The shared data on shared memory that has been initialized in some SOC or master engine.
uint64_t SnapshotPagePointer
Page ID of a snapshot page.
Calls Initializable::uninitialize() automatically when it gets out of scope.
ErrorStack initialize() override final
Typical implementation of Initializable::initialize() that provides initialize-once semantics...
Database engine object that holds all resources and provides APIs.
SnapshotPagePointer snapshot_pointer_
Just a marker to denote that the memory region represents a data page.
void * get_block() const
Returns the memory block.
ErrorStack hcc_reset_all_temperature_stat_data(VolatilePagePointer head_page_id)
Represents a key-value store based on a dense and regular hash.
uint64_t get_size() const
Returns the byte size of the memory block.
ErrorStack debugout_single_thread_intermediate(Engine *engine, cache::SnapshotFileSet *fileset, HashIntermediatePage *parent, bool follow_volatile, bool intermediate_only, uint32_t *remaining_pages)
Represents an intermediate page in Hashtable Storage.
Represents an individual data page in Hashtable Storage.
#define CHECK_ERROR(x)
This macro calls x and checks its returned value.
Represents one memory block aligned to actual OS/hardware pages.
const ErrorStack kRetOk
Normal return value for no-error case.
uint8_t get_level() const
const uint8_t kHashIntermediatePageFanout
Number of pointers in an intermediate page of hash storage.
ErrorStack init(cache::SnapshotFileSet *files, SnapshotPagePointer pointer)
HashIntermediatePage * as_intermediate()
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
Definitions of IDs in this package and a few related constant values.
#define WRAP_ERROR_CODE(x)
Same as CHECK_ERROR(x) except it receives only an error code, thus more efficient.
DualPagePointer & get_pointer(uint16_t index)
memory::EngineMemory * get_memory_manager() const
See Memory Manager.
bool is_null() const
Returns if this object doesn't hold a valid memory block.