20 #include <glog/logging.h>
41 << std::endl <<
"***************************************************************"
43 << std::endl <<
"*** volatile_only=" << volatile_only <<
", max_pages=" << max_pages
44 << std::endl <<
"***************************************************************";
50 LOG(INFO) <<
"First, dumping volatile pages...";
53 LOG(INFO) <<
"No volatile pages.";
55 uint32_t remaining = max_pages;
58 LOG(INFO) <<
"Dumped volatile pages.";
60 LOG(INFO) <<
"Now dumping snapshot pages...";
62 LOG(INFO) <<
"No snapshot pages.";
64 uint32_t remaining = max_pages;
67 LOG(INFO) <<
"Dumped snapshot pages.";
80 uint32_t* remaining_pages) {
81 if (((*remaining_pages) == 0) || --(*remaining_pages) == 0) {
82 LOG(INFO) <<
"Reached write-out max. skip the following";
97 for (uint16_t i = 0; i < key_count; ++i) {
126 bool follow_volatile,
127 uint32_t* remaining_pages) {
128 if ((*remaining_pages) == 0) {
131 if (follow_volatile) {
153 << std::endl <<
"***************************************************************"
155 << std::endl <<
"*** temperature stat for HCC"
156 << std::endl <<
"***************************************************************";
160 LOG(INFO) <<
"No volatile pages.";
165 LOG(INFO) <<
"Done resettting";
175 for (uint16_t i = 0; i < key_count; ++i) {
185 it.get_pointer().volatile_pointer_));
SlotIndex get_key_count() const __attribute__((always_inline))
physical key count (those keys might be deleted) in this page.
numa_alloc_onnode() and numa_free().
Represents a pointer to another page (usually a child page).
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).
bool is_border() const __attribute__((always_inline))
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...
Represents one border page in Masstree Storage.
Brings error stacktrace information as return value of functions.
DualPagePointer * get_next_layer(SlotIndex index) __attribute__((always_inline))
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_follow(VolatilePagePointer page_id)
Definitions of IDs in this package and a few related constant values.
Common base of MasstreeIntermediatePage and MasstreeBorderPage.
VolatilePagePointer volatile_pointer_
MasstreeStorageControlBlock * control_block_
The shared data on shared memory that has been initialized in some SOC or master engine.
ErrorStack hcc_reset_all_temperature_stat_recurse(MasstreePage *parent)
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_
ErrorStack debugout_single_thread_recurse(Engine *engine, cache::SnapshotFileSet *fileset, MasstreePage *parent, bool follow_volatile, uint32_t *remaining_pages)
void * get_block() const
Returns the memory block.
Represents a Masstree 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.
ErrorStack hcc_reset_all_temperature_stat()
For stupid reasons (I'm lazy!) these are defined in _debug.cpp.
Represents one intermediate page in Masstree Storage.
ErrorStack debugout_single_thread_follow(Engine *engine, cache::SnapshotFileSet *fileset, const DualPagePointer &pointer, bool follow_volatile, uint32_t *remaining_pages)
#define WRAP_ERROR_CODE(x)
Same as CHECK_ERROR(x) except it receives only an error code, thus more efficient.
bool does_point_to_layer(SlotIndex index) const __attribute__((always_inline))
memory::EngineMemory * get_memory_manager() const
See Memory Manager.
ErrorStack debugout_single_thread(Engine *engine, bool volatile_only, uint32_t max_pages)
These are defined in masstree_storage_debug.cpp.