Commit 2df9e3ed authored by Marc Vef's avatar Marc Vef
Browse files

Merge branch 'jemalloc_support' into 'master'

Adding optional JeMalloc dependency + rocksdb version bump

See merge request zdvresearch_bsc/adafs!27
parents 2b73d387 53c756ea
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
# - Try to find jemalloc headers and libraries.
#
# Usage of this module as follows:
#
#     find_package(JeMalloc)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
#  JEMALLOC_ROOT_DIR Set this variable to the root installation of
#                    jemalloc if the module has problems finding
#                    the proper installation path.
#
# Variables defined by this module:
#
#  JEMALLOC_FOUND             System has jemalloc libs/headers
#  JEMALLOC_LIBRARIES         The jemalloc library/libraries
#  JEMALLOC_INCLUDE_DIR       The location of jemalloc headers

find_path(JEMALLOC_ROOT_DIR
    NAMES include/jemalloc/jemalloc.h
    )

find_library(JEMALLOC_LIBRARIES
    NAMES jemalloc
    HINTS ${JEMALLOC_ROOT_DIR}/lib
    )

find_path(JEMALLOC_INCLUDE_DIR
    NAMES jemalloc/jemalloc.h
    HINTS ${JEMALLOC_ROOT_DIR}/include
    )

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JeMalloc DEFAULT_MSG
    JEMALLOC_LIBRARIES
    JEMALLOC_INCLUDE_DIR
    )

mark_as_advanced(
    JEMALLOC_ROOT_DIR
    JEMALLOC_LIBRARIES
    JEMALLOC_INCLUDE_DIR
)
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ find_package(BZip2 REQUIRED)
find_package(GFlags REQUIRED)
find_package(snappy REQUIRED)
find_package(ZStd REQUIRED)
find_package(JeMalloc) # required if rocksdb has been build with jemalloc
find_package(RocksDB REQUIRED)
# margo dependencies
find_package(Libev REQUIRED)
+1 −1
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ clonedeps "abt-snoozer" "https://xgitlab.cels.anl.gov/sds/abt-snoozer.git" "3d92
# get Margo
clonedeps "margo" "https://xgitlab.cels.anl.gov/sds/margo.git" "72eec057314a4251d8658e03a18240275992e1ce" &
# get rocksdb
wgetdeps "rocksdb" "https://github.com/facebook/rocksdb/archive/v5.10.3.tar.gz" &
wgetdeps "rocksdb" "https://github.com/facebook/rocksdb/archive/v5.11.3.tar.gz" &

# Wait for all download to be completed 
wait
+4 −5
Original line number Diff line number Diff line
@@ -30,10 +30,6 @@ set(DAEMON_HEADERS
    ../../include/daemon/handler/rpc_defs.hpp
    )
add_executable(adafs_daemon ${DAEMON_SRC} ${DAEMON_HEADERS})
# define target specific directory includes
target_include_directories(adafs_daemon PUBLIC
    ${ROCKSDB_INCLUDE_DIRS}
)
target_link_libraries(adafs_daemon
    ${ROCKSDB_LIBRARIES}
    # rocksdb libs
@@ -53,3 +49,6 @@ target_link_libraries(adafs_daemon
    ${Boost_LIBRARIES}
    Threads::Threads
    )
if (${JEMALLOC_FOUND})
    target_link_libraries(adafs_daemon ${JEMALLOC_LIBRARIES})
endif ()