Allow calling printInOrder from debugger
This commit is contained in:
@@ -50,11 +50,13 @@ cmake_pop_check_state()
|
||||
# https://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq
|
||||
include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/third_party/valgrind)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
if(APPLE)
|
||||
add_link_options(-Wl,-dead_strip)
|
||||
else()
|
||||
add_link_options(-Wl,--gc-sections)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
|
||||
|
||||
|
@@ -951,7 +951,13 @@ struct __attribute__((__visibility__("hidden"))) VersionedMap::Impl {
|
||||
void firstGeq(const Key *key, const int64_t *version, Iterator *iterator,
|
||||
int count) const;
|
||||
|
||||
Random random = seededRandom();
|
||||
Random random =
|
||||
#ifndef NDEBUG
|
||||
{};
|
||||
#else
|
||||
seededRandom();
|
||||
#endif
|
||||
|
||||
MemManager mm;
|
||||
RootSet roots;
|
||||
// Only meaningful within the callstack of `addMutations`
|
||||
@@ -1325,13 +1331,13 @@ int64_t VersionedMap::getBytes() const { return impl->getBytes(); }
|
||||
|
||||
// GCOVR_EXCL_START
|
||||
|
||||
inline void VersionedMap::Impl::printInOrder(int64_t version) {
|
||||
void VersionedMap::Impl::printInOrder(int64_t version) {
|
||||
printInOrderHelper(version,
|
||||
roots.getThreadSafeHandle().rootForVersion(version), 0);
|
||||
}
|
||||
|
||||
inline void VersionedMap::Impl::printInOrderHelper(int64_t version,
|
||||
uint32_t node, int depth) {
|
||||
void VersionedMap::Impl::printInOrderHelper(int64_t version, uint32_t node,
|
||||
int depth) {
|
||||
if (node == 0) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user