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