chore: remove obsolete build options & other stuff
TODO: remove JSON with the old frontend
This commit is contained in:
parent
f4ffebf01c
commit
32b98a1d4a
9 changed files with 13 additions and 426 deletions
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
|
||||
BreakBeforeBraces: 'Attach'
|
||||
|
||||
IndentWidth: 4
|
||||
11
.codecov.yml
11
.codecov.yml
|
|
@ -1,11 +0,0 @@
|
|||
comment: off
|
||||
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
threshold: 10%
|
||||
patch:
|
||||
default:
|
||||
target: 0%
|
||||
threshold: 10%
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.10)
|
||||
if ((${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.1) OR (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 3.1))
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
endif()
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
if(NOT (${CMAKE_GENERATOR} MATCHES "Unix Makefiles"))
|
||||
message(FATAL_ERROR "The only supported CMake generator at the moment is 'Unix Makefiles'")
|
||||
endif()
|
||||
|
|
@ -34,9 +32,6 @@ option(MULTI_THREAD "MULTI_THREAD" ON)
|
|||
option(CCACHE "use ccache" ON)
|
||||
option(STATIC "STATIC" OFF)
|
||||
option(SPLIT_STACK "SPLIT_STACK" OFF)
|
||||
option(VM_UNCHECKED "VM_UNCHECKED" OFF)
|
||||
option(TCMALLOC "TCMALLOC" OFF)
|
||||
option(JEMALLOC "JEMALLOC" OFF)
|
||||
# When OFF we disable JSON support to support older compilers
|
||||
option(JSON "JSON" ON)
|
||||
# When OFF we disable LLVM support
|
||||
|
|
@ -45,9 +40,6 @@ option(COMPRESSED_OBJECT_HEADER "Use compressed object headers in 64-bit machine
|
|||
option(SMALL_RC "Use only 32-bits for RC, this option is only relevant when COMPRESSED_OBJECT_HEARDER is ON" ON)
|
||||
option(CHECK_RC_OVERFLOW "Check for RC overflows when SMALL_RC is ON" OFF)
|
||||
|
||||
# When cross-compiling, we do not compile the standard library since
|
||||
# the executable will not work on the host machine
|
||||
option(CROSS_COMPILE "CROSS_COMPILE" OFF)
|
||||
# Include MSYS2 required DLLs and binaries in the binary distribution package
|
||||
option(INCLUDE_MSYS2_DLLS "INCLUDE_MSYS2_DLLS" OFF)
|
||||
# When ON we include githash in the version string
|
||||
|
|
@ -79,50 +71,6 @@ option(CHECK_OLEAN_VERSION "Only load .olean files compiled with the current ver
|
|||
set(LEAN_EXTRA_MAKE_OPTS "" CACHE STRING "extra options to lean --make")
|
||||
set(MINGW_LOCAL_DIR "C:/msys64/mingw64/bin" CACHE STRING "where to find MSYS2 required DLLs and binaries")
|
||||
|
||||
if (NOT("${FREE_VAR_RANGE_OPT}" MATCHES "ON"))
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_NO_FREE_VAR_RANGE_OPT")
|
||||
endif()
|
||||
|
||||
if (NOT("${HAS_LOCAL_OPT}" MATCHES "ON"))
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_NO_HAS_LOCAL_OPT")
|
||||
endif()
|
||||
|
||||
if (NOT("${ABSTRACTION_CACHE}" MATCHES "ON"))
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_NO_ABSTRACT_CACHE")
|
||||
endif()
|
||||
|
||||
if (NOT("${TYPE_CLASS_CACHE}" MATCHES "ON"))
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_NO_TYPE_CLASS_CACHE")
|
||||
endif()
|
||||
|
||||
if (NOT("${TYPE_INFER_CACHE}" MATCHES "ON"))
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_NO_TYPE_INFER_CACHE")
|
||||
endif()
|
||||
|
||||
if ("${ALPHA}" MATCHES "ON")
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_USE_ALPHA")
|
||||
endif()
|
||||
|
||||
if ("${TRACK_CUSTOM_ALLOCATORS}" MATCHES "ON")
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_TRACK_CUSTOM_ALLOCATORS")
|
||||
endif()
|
||||
|
||||
if ("${TRACK_LIVE_EXPRS}" MATCHES "ON")
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_TRACK_LIVE_EXPRS")
|
||||
endif()
|
||||
|
||||
if (NOT("${CUSTOM_ALLOCATORS}" MATCHES "ON"))
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_NO_CUSTOM_ALLOCATORS")
|
||||
endif()
|
||||
|
||||
if (NOT("${SAVE_SNAPSHOT}" MATCHES "ON"))
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_NO_SNAPSHOT")
|
||||
endif()
|
||||
|
||||
if (NOT("${SAVE_INFO}" MATCHES "ON"))
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_NO_INFO")
|
||||
endif()
|
||||
|
||||
if ("${FAKE_FREE}" MATCHES "ON")
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_FAKE_FREE")
|
||||
endif()
|
||||
|
|
@ -189,8 +137,6 @@ endif()
|
|||
|
||||
# Added for CTest
|
||||
include(CTest)
|
||||
configure_file("${LEAN_SOURCE_DIR}/CTestCustom.cmake.in"
|
||||
"${LEAN_BINARY_DIR}/CTestCustom.cmake" @ONLY)
|
||||
|
||||
# Windows does not support ulimit -s unlimited. So, we reserve a lot of stack space: 100Mb
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
|
|
@ -204,11 +150,13 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
|||
set(EXTRA_UTIL_LIBS ${EXTRA_UTIL_LIBS} -lpsapi)
|
||||
endif()
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_WINDOWS -D LEAN_WIN_STACK_SIZE=${LEAN_WIN_STACK_SIZE}")
|
||||
else()
|
||||
# Windows does not support pthread or fPIC
|
||||
set(LEANC_EXTRA_FLAGS "${LEANC_EXTRA_FLAGS} -pthread -fPIC")
|
||||
endif()
|
||||
|
||||
# OSX default thread stack size is very small. Moreover, in Debug mode, each new stack frame consumes a lot of extra memory.
|
||||
if ((${MULTI_THREAD} MATCHES "ON") AND (${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
|
||||
set(LEAN_EXTRA_MAKE_OPTS -s40000 ${LEAN_EXTRA_MAKE_OPTS})
|
||||
endif ()
|
||||
|
||||
if(JSON)
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_JSON")
|
||||
else()
|
||||
|
|
@ -222,10 +170,6 @@ else()
|
|||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_MULTI_THREAD")
|
||||
endif()
|
||||
|
||||
if(VM_UNCHECKED)
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_VM_UNCHECKED")
|
||||
endif()
|
||||
|
||||
if(AUTO_THREAD_FINALIZATION AND NOT MSVC)
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_AUTO_THREAD_FINALIZATION")
|
||||
endif()
|
||||
|
|
@ -269,20 +213,6 @@ set(CMAKE_CXX_FLAGS_DEBUG "-DLEAN_DEBUG -DLEAN_TRACE")
|
|||
set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_GPROF "-O2 -g -pg")
|
||||
set(CMAKE_CXX_FLAGS_LPROF "-O2 -g -fprofile-instr-generate -fcoverage-mapping")
|
||||
|
||||
# OSX .dmg generation (this is working in progress)
|
||||
set(CPACK_DMG_BACKGROUND_IMAGE "${LEAN_SOURCE_DIR}/../images/lean.png")
|
||||
set(CPACK_DMG_VOLUME_NAME "Lean-${LEAN_VERSION_STRING}")
|
||||
set(CPACK_BUNDLE_NAME "Lean-${LEAN_VERSION_STRING}")
|
||||
set(CPACK_PACKAGE_ICON "${LEAN_SOURCE_DIR}/../images/lean.png")
|
||||
##################
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
# The following options is needed to generate a shared library
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
endif()
|
||||
|
||||
# SPLIT_STACK
|
||||
if (SPLIT_STACK)
|
||||
|
|
@ -294,11 +224,6 @@ if (SPLIT_STACK)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Test coverage
|
||||
if(TESTCOV)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
|
||||
endif()
|
||||
|
||||
# Compiler-specific C++14 activation.
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
|
||||
execute_process(
|
||||
|
|
@ -368,11 +293,6 @@ else()
|
|||
set(EXTRA_LIBS ${EXTRA_LIBS} ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
# TRACK_MEMORY_USAGE
|
||||
if(TRACK_MEMORY_USAGE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D LEAN_TRACK_MEMORY")
|
||||
endif()
|
||||
|
||||
# ccache
|
||||
if(CCACHE)
|
||||
find_program(CCACHE_PATH ccache)
|
||||
|
|
@ -384,36 +304,6 @@ if(CCACHE)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# jemalloc
|
||||
if(JEMALLOC)
|
||||
find_package(Jemalloc)
|
||||
if(${JEMALLOC_FOUND})
|
||||
set(COPY_LIBS ${COPY_LIBS} ${JEMALLOC_LIBRARIES})
|
||||
set(LEANC_EXTRA_FLAGS "${LEANC_EXTRA_FLAGS} -ljemalloc")
|
||||
message(STATUS "Using jemalloc.")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D HAS_JEMALLOC")
|
||||
else()
|
||||
message(STATUS "Failed to find jemalloc, will try tcmalloc and then standard malloc.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# tcmalloc
|
||||
if(NOT "${JEMALLOC_FOUND}")
|
||||
if(TCMALLOC)
|
||||
find_package(Tcmalloc)
|
||||
if(${TCMALLOC_FOUND})
|
||||
set(COPY_LIBS ${COPY_LIBS} ${TCMALLOC_LIBRARIES})
|
||||
set(LEANC_EXTRA_FLAGS "${LEANC_EXTRA_FLAGS} -ltcmalloc")
|
||||
message(STATUS "Using tcmalloc.")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D HAS_TCMALLOC")
|
||||
else()
|
||||
message(STATUS "Failed to find tcmalloc, using standard malloc.")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Using standard malloc.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} ${COPY_LIBS})
|
||||
|
||||
# Python
|
||||
|
|
@ -421,6 +311,10 @@ find_package(PythonInterp)
|
|||
|
||||
include_directories(${CMAKE_BINARY_DIR}/include)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(LEANC_SHARED_LINKER_FLAGS "${LEANC_SHARED_LINKER_FLAGS} -fPIC")
|
||||
endif()
|
||||
|
||||
# export all symbols for the interpreter
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LEAN_EXTRA_LINKER_FLAGS} -Wl,--export-all")
|
||||
|
|
@ -444,8 +338,8 @@ endif()
|
|||
|
||||
if(MULTI_THREAD AND NOT MSVC AND (NOT ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")))
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
|
||||
set(LEANC_EXTRA_FLAGS "${LEANC_EXTRA_FLAGS} -pthread")
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS_TESTCOV "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
|
||||
|
||||
# Git HASH
|
||||
set(LEAN_PACKAGE_VERSION "NOT-FOUND")
|
||||
|
|
@ -470,12 +364,6 @@ else()
|
|||
endif()
|
||||
configure_file("${LEAN_SOURCE_DIR}/githash.h.in" "${LEAN_BINARY_DIR}/githash.h")
|
||||
|
||||
# OSX default thread stack size is very small. Moreover, in Debug mode, each new stack frame consumes a lot of extra memory.
|
||||
# See issue #1721
|
||||
if ((${MULTI_THREAD} MATCHES "ON") AND (${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
|
||||
set(LEAN_EXTRA_MAKE_OPTS -s40000 ${LEAN_EXTRA_MAKE_OPTS})
|
||||
endif ()
|
||||
|
||||
# Version
|
||||
configure_file("${LEAN_SOURCE_DIR}/version.h.in" "${LEAN_BINARY_DIR}/version.h")
|
||||
if (${STAGE} EQUAL 0)
|
||||
|
|
@ -614,17 +502,6 @@ install(FILES ${LEAN_SOURCE_DIR}/bin/leanmake
|
|||
|
||||
add_subdirectory(shell)
|
||||
|
||||
function(add_exec_test name tgt)
|
||||
if(${EMSCRIPTEN})
|
||||
target_link_libraries(${tgt} "--memory-init-file 0")
|
||||
add_test(NAME ${name} COMMAND ${NODE_JS} ${CMAKE_CURRENT_BINARY_DIR}/${tgt}.js)
|
||||
else()
|
||||
add_test(NAME ${name} COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${tgt})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# add_subdirectory(tests/util)
|
||||
|
||||
# Include style check
|
||||
if (NOT(${CMAKE_SYSTEM_NAME} MATCHES "Windows") AND PYTHONINTERP_FOUND)
|
||||
include(StyleCheck)
|
||||
|
|
@ -637,7 +514,7 @@ add_test(NAME style_check COMMAND "${PYTHON_EXECUTABLE}" "${LEAN_SOURCE_DIR}/cma
|
|||
endif()
|
||||
|
||||
add_custom_target(clean-stdlib
|
||||
COMMAND rm -rf "${CMAKE_BINARY_DIR}/lib" "${CMAKE_BINARY_DIR}/stage2" "${CMAKE_BINARY_DIR}/stage3" || true)
|
||||
COMMAND rm -rf "${CMAKE_BINARY_DIR}/lib" || true)
|
||||
|
||||
add_custom_target(clean-olean
|
||||
DEPENDS clean-stdlib)
|
||||
|
|
@ -653,7 +530,7 @@ file(COPY ${CMAKE_SOURCE_DIR}/include/lean DESTINATION ${CMAKE_BINARY_DIR}/inclu
|
|||
FILES_MATCHING PATTERN "*.h")
|
||||
|
||||
if("${INCLUDE_MSYS2_DLLS}" MATCHES "ON")
|
||||
# TODO(Leo): do not use hardlinks to required DLLs.
|
||||
# TODO(Leo): do not hardcode required DLLs.
|
||||
# For example, we can try to use ldd to retrieve the list of required DLLs.
|
||||
set(RUNTIME_LIBRARIES
|
||||
${MINGW_LOCAL_DIR}/libgmp-10.dll
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
## This file should be placed in the root directory of your project.
|
||||
## Then modify the CMakeLists.txt file in the root directory of your
|
||||
## project to incorporate the testing dashboard.
|
||||
##
|
||||
## # The following are required to submit to the CDash dashboard:
|
||||
## ENABLE_TESTING()
|
||||
## INCLUDE(CTest)
|
||||
|
||||
set(CTEST_PROJECT_NAME "Lean")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
||||
|
||||
# Specify MEMCHECK Option: http://valgrind.org/docs/manual/mc-manual.html
|
||||
# Note: We use "--trace-children=yes" to valgrind-ise child processes (follow execve)
|
||||
# Note: We turn off "--show-reachable=yes" option.
|
||||
#set(MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_SOURCE_DIR}/memcheck.supp)
|
||||
file(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}/memcheck.supp" MEMORYCHECK_SUPPRESSIONS_FILE)
|
||||
set(VALGRIND_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes --leak-check=full --track-origins=yes --gen-suppressions=all")
|
||||
set(MEMORYCHECK_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes --leak-check=full --track-origins=yes --gen-suppressions=all")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "borel.modck.cs.cmu.edu")
|
||||
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Lean")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
|
||||
set(UPDATE_COMMAND "git")
|
||||
set(COVERAGE_COMMAND "gcov-4.8")
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# Complete list of options is available at http://cmake.org/Wiki/CMake/Testing_With_CTest
|
||||
|
||||
# List of tests to ignore during the MemCheck stage
|
||||
SET(CTEST_CUSTOM_MEMCHECK_IGNORE ${CTEST_CUSTOM_MEMCHECK_IGNORE}
|
||||
# The following tests are disabled since they take too much time on travis-ci
|
||||
"leanslowtests"
|
||||
"threads"
|
||||
"style_check"
|
||||
)
|
||||
|
||||
# Regular expression for excluding files from coverage testing
|
||||
SET(CTEST_CUSTOM_COVERAGE_EXCLUDE ${CTEST_CUSTOM_COVERAGE_EXCLUDE} "tests/*")
|
||||
|
||||
# Suppress warnings from OSX/Travis
|
||||
SET(CTEST_CUSTOM_WARNING_EXCEPTION
|
||||
${CTEST_CUSTOM_WARNING_EXCEPTION}
|
||||
"ld: warning: ignoring file /usr/local/lib/gcc/x86_64-apple-darwin12.4.0/4.9.0/libgcc.a.*")
|
||||
|
|
@ -14,14 +14,4 @@ void set_max_memory(size_t max);
|
|||
void set_max_memory_megabyte(unsigned max);
|
||||
void check_memory(char const * component_name);
|
||||
size_t get_allocated_memory();
|
||||
|
||||
#ifdef LEAN_TRACK_CUSTOM_ALLOCATORS
|
||||
/* We use report_memory_deallocated to track memory released by custom allocators such
|
||||
as memory_pool. */
|
||||
void report_memory_deallocated(size_t s);
|
||||
size_t get_memory_deallocated();
|
||||
#define lean_report_memory_deallocated(s) report_memory_deallocated(s)
|
||||
#else
|
||||
#define lean_report_memory_deallocated(s)
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,12 +44,6 @@ void initialize() {
|
|||
}
|
||||
|
||||
void finalize() {
|
||||
#ifdef LEAN_TRACK_CUSTOM_ALLOCATORS
|
||||
std::cerr << "memory deallocated by memory_pool (before finalization): " << get_memory_deallocated() << "\n";
|
||||
#endif
|
||||
#ifdef LEAN_TRACK_LIVE_EXPRS
|
||||
std::cerr << "number of live expressions (before finalization): " << get_num_live_exprs() << "\n";
|
||||
#endif
|
||||
run_thread_finalizers();
|
||||
finalize_frontend_lean_module();
|
||||
finalize_equations_compiler_module();
|
||||
|
|
@ -61,19 +55,7 @@ void finalize() {
|
|||
finalize_kernel_module();
|
||||
finalize_util_module();
|
||||
run_post_thread_finalizers();
|
||||
#ifdef LEAN_TRACK_CUSTOM_ALLOCATORS
|
||||
std::cerr << "memory deallocated by memory_pool (after finalization): " << get_memory_deallocated() << "\n";
|
||||
#endif
|
||||
#ifdef LEAN_TRACK_LIVE_EXPRS
|
||||
std::cerr << "number of live expressions (after finalization): " << get_num_live_exprs() << "\n";
|
||||
#endif
|
||||
delete_thread_finalizer_manager();
|
||||
#ifdef LEAN_TRACK_CUSTOM_ALLOCATORS
|
||||
std::cerr << "memory deallocated by memory_pool (after thread finalization): " << get_memory_deallocated() << "\n";
|
||||
#endif
|
||||
#ifdef LEAN_TRACK_LIVE_EXPRS
|
||||
std::cerr << "number of live expressions (after thread finalization): " << get_num_live_exprs() << "\n";
|
||||
#endif
|
||||
}
|
||||
|
||||
initializer::initializer() {
|
||||
|
|
|
|||
|
|
@ -1,193 +0,0 @@
|
|||
# Suppress warnings produced by Valgrind.
|
||||
# http://wiki.wxwidgets.org/Valgrind_Suppression_File_Howto
|
||||
{
|
||||
# This warning is due to a memory-leak bug in the g++ compiler.
|
||||
# Soonho reported the problem. Gcc team said this a known problem, and will be fixed
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58142
|
||||
Suppress_GCC-4.8_Memory_Leak_Bug_in_Thread1
|
||||
Memcheck:Leak
|
||||
fun:*nothrow_t
|
||||
fun:*_thread_atexit
|
||||
fun:*
|
||||
fun:*
|
||||
fun:*_Bind_simple*_invoke*_Index_tuple*
|
||||
fun:*_Bind_simple*
|
||||
fun:*_Bind_simple*
|
||||
obj:*/libstdc++.so*
|
||||
fun:start_thread
|
||||
fun:clone
|
||||
}
|
||||
|
||||
{
|
||||
# This warning is due to a memory-leak bug in the g++ compiler.
|
||||
# Soonho reported the problem. Gcc team said this a known problem, and will be fixed
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58142
|
||||
Suppress_GCC-4.8_Memory_Leak_Bug_in_Thread2
|
||||
Memcheck:Leak
|
||||
fun:*nothrow_t
|
||||
fun:*_thread_atexit
|
||||
fun:*
|
||||
obj:*/libstdc++.so*
|
||||
fun:start_thread
|
||||
fun:clone
|
||||
}
|
||||
|
||||
{
|
||||
# This warning is due to a memory-leak bug in the g++ compiler.
|
||||
# Soonho reported the problem. Gcc team said this a known problem, and will be fixed
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58142
|
||||
Suppress_GCC-4.8_Memory_Leak_Bug_in_Thread3
|
||||
Memcheck:Leak
|
||||
fun:*nothrow_t
|
||||
fun:*_thread_atexit
|
||||
fun:*
|
||||
fun:*_Bind_simple*
|
||||
obj:*/libstdc++.so*
|
||||
fun:start_thread
|
||||
fun:clone
|
||||
}
|
||||
|
||||
{
|
||||
# This warning is due to a memory-leak bug in the g++ compiler.
|
||||
# Soonho reported the problem. Gcc team said this a known problem, and will be fixed
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58142
|
||||
Suppress_GCC-4.8_Memory_Leak_Bug_in_Thread_32Bit_Ubuntu
|
||||
Memcheck:Leak
|
||||
fun:*nothrow_t
|
||||
fun:*_thread_atexit
|
||||
fun:*
|
||||
fun:*_Bind_simple*
|
||||
fun:*_Bind_simple*
|
||||
fun:*_Bind_simple*
|
||||
obj:*/libstdc++.so*
|
||||
fun:clone
|
||||
}
|
||||
|
||||
{
|
||||
Suppress_Bash_Memory_Leak_on_Fedora19
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
fun:xmalloc
|
||||
fun:make_if_command
|
||||
fun:yyparse
|
||||
fun:parse_command
|
||||
fun:read_command
|
||||
fun:reader_loop
|
||||
fun:main
|
||||
}
|
||||
|
||||
{
|
||||
# This entry suppresses the warning caused by a bug in tcmalloc
|
||||
TCMalloc_Bug1
|
||||
Memcheck:Param
|
||||
msync(start)
|
||||
fun:__msync_nocancel
|
||||
obj:*/libunwind.so.*
|
||||
...
|
||||
fun:_UL*_step
|
||||
fun:*GetStackTrace*
|
||||
fun:*PageHeap*GrowHeap*
|
||||
fun:*PageHeap*New*
|
||||
fun:*CentralFreeList*Populate*
|
||||
fun:*CentralFreeList*FetchFromSpansSafe*
|
||||
fun:*CentralFreeList*RemoveRange*
|
||||
fun:*ThreadCache*FetchFromCentralCache*
|
||||
fun:malloc
|
||||
...
|
||||
}
|
||||
|
||||
{
|
||||
# This entry suppresses the warning caused by a bug in tcmalloc
|
||||
TCMalloc_Bug2
|
||||
Memcheck:Param
|
||||
msync(start)
|
||||
obj:*/libpthread-2.*.*
|
||||
obj:*/libunwind.so.*
|
||||
...
|
||||
fun:_UL*_step
|
||||
fun:*GetStackTrace*
|
||||
fun:*PageHeap*GrowHeap*
|
||||
fun:*PageHeap*New*
|
||||
fun:*CentralFreeList*Populate*
|
||||
fun:*CentralFreeList*FetchFromSpansSafe*
|
||||
fun:*CentralFreeList*RemoveRange*
|
||||
fun:*ThreadCache*FetchFromCentralCache*
|
||||
fun:malloc
|
||||
...
|
||||
}
|
||||
|
||||
{
|
||||
# This entry suppresses the warning caused by a bug in tcmalloc
|
||||
# It is the equivalent of TCMalloc_Bug2 for realloc
|
||||
TCMalloc_Bug3
|
||||
Memcheck:Param
|
||||
msync(start)
|
||||
obj:*/libpthread-2.*.*
|
||||
obj:*/libunwind.so.*
|
||||
...
|
||||
fun:_UL*_step
|
||||
fun:*GetStackTrace*
|
||||
fun:*PageHeap*GrowHeap*
|
||||
fun:*PageHeap*New*
|
||||
fun:*CentralFreeList*Populate*
|
||||
fun:*CentralFreeList*FetchFromSpansSafe*
|
||||
fun:*CentralFreeList*RemoveRange*
|
||||
fun:*ThreadCache*FetchFromCentralCache*
|
||||
fun:realloc
|
||||
...
|
||||
}
|
||||
|
||||
{
|
||||
# This entry suppresses the warning caused by a bug in luajit 2.0
|
||||
LuaJIT_Bug1
|
||||
Memcheck:Cond
|
||||
obj:*luajit-5.1*
|
||||
...
|
||||
fun:lua_pcall
|
||||
...
|
||||
}
|
||||
|
||||
{
|
||||
# This entry suppresses the warning caused by a bug in luajit 2.0
|
||||
LuaJIT_Bug2
|
||||
Memcheck:Cond
|
||||
obj:*luajit-5.1*
|
||||
...
|
||||
fun:luaL_checklstring
|
||||
...
|
||||
}
|
||||
|
||||
{
|
||||
# This entry suppresses a false positive in luajit 2.0
|
||||
LuaJIT_Bug3
|
||||
Memcheck:Addr4
|
||||
obj:*luajit-5.1*
|
||||
...
|
||||
}
|
||||
|
||||
{
|
||||
# This entry Suppresses memory leaks at awk. We use awk at doc/lua/test.sh and doc/lua/test_single.sh
|
||||
AWK_Bug1
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
obj:*/bin/mawk
|
||||
...
|
||||
}
|
||||
|
||||
{
|
||||
# This entry Suppresses memory leaks at awk. We use awk at doc/lua/test.sh and doc/lua/test_single.sh
|
||||
AWK_Bug2
|
||||
Memcheck:Leak
|
||||
fun:realloc
|
||||
obj:*/bin/mawk
|
||||
...
|
||||
}
|
||||
|
||||
{
|
||||
readline_suppress_1
|
||||
Memcheck:Param
|
||||
sendmsg(msg.msg_name)
|
||||
fun:__sendmsg_nocancel
|
||||
fun:readline
|
||||
...
|
||||
}
|
||||
|
|
@ -142,14 +142,4 @@ void check_memory(char const * component_name) {
|
|||
size_t get_allocated_memory() {
|
||||
return get_current_rss();
|
||||
}
|
||||
|
||||
static atomic<size_t> g_memory_deallocated(0);
|
||||
|
||||
void report_memory_deallocated(size_t s) {
|
||||
atomic_fetch_add_explicit(&g_memory_deallocated, s, memory_order_release);
|
||||
}
|
||||
|
||||
size_t get_memory_deallocated() {
|
||||
return g_memory_deallocated;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue