message(FATAL_ERROR "Your libunwind version is apparently too old and does not have the unw_backtrace function.")
endif()
+check_library_exists (${LIBUNWIND_LIBRARY} _ULx86_64_set_cache_log_size "" HAVE_UNW_SET_CACHE_LOG_SIZE)
+
include (CheckCXXSourceCompiles)
check_cxx_source_compiles(
"#include <unordered_map>
if (unw_set_caching_policy(unw_local_addr_space, UNW_CACHE_PER_THREAD)) {
fprintf(stderr, "Failed to enable per-thread libunwind caching.\n");
}
+#if HAVE_UNW_SET_CACHE_LOG_SIZE
if (unw_set_cache_log_size(unw_local_addr_space, 10)) {
fprintf(stderr, "Failed to set libunwind cache size.\n");
}
+#endif
data.reset(new Data(outputFileName, stopCallback));