-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cachelib] add new facebook cachelib port (#29973)
* Add new unofficial facebook cachelib port * fix comments * versions * update version database * update deps & version database * update deps & version databases * fix comments * update version database * find numa.h and warn when not found
- Loading branch information
Showing
5 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
diff --git a/cachelib/cachebench/util/JSONConfig.h b/cachelib/cachebench/util/JSONConfig.h | ||
index 7da93fc4..cb46b33b 100644 | ||
--- a/cachelib/cachebench/util/JSONConfig.h | ||
+++ b/cachelib/cachebench/util/JSONConfig.h | ||
@@ -146,10 +146,6 @@ struct Options {}; | ||
|
||
template <typename Type, size_t size> | ||
constexpr void checkCorrectSize() { | ||
-#ifndef SKIP_OPTION_SIZE_VERIFY | ||
- Options<sizeof(Type)> var = Options<size>{}; | ||
- (void)var; | ||
-#endif | ||
} | ||
} // namespace cachebench | ||
} // namespace cachelib | ||
diff --git a/cachelib/common/CMakeLists.txt b/cachelib/common/CMakeLists.txt | ||
index 1e6d1a88..fad14a18 100644 | ||
--- a/cachelib/common/CMakeLists.txt | ||
+++ b/cachelib/common/CMakeLists.txt | ||
@@ -36,9 +36,6 @@ target_link_libraries(cachelib_common PUBLIC | ||
FBThrift::thriftprotocol | ||
Folly::folly | ||
Folly::follybenchmark | ||
- Folly::folly_exception_tracer | ||
- Folly::folly_exception_tracer_base | ||
- Folly::folly_exception_counter | ||
) | ||
|
||
install(TARGETS cachelib_common | ||
diff --git a/cachelib/common/Utils.cpp b/cachelib/common/Utils.cpp | ||
index 3e149469..0e6b6d9c 100644 | ||
--- a/cachelib/common/Utils.cpp | ||
+++ b/cachelib/common/Utils.cpp | ||
@@ -15,7 +15,6 @@ | ||
*/ | ||
|
||
#include <dirent.h> | ||
-#include <folly/experimental/exception_tracer/ExceptionTracer.h> | ||
#include <sys/mman.h> | ||
#include <sys/resource.h> | ||
#include <sys/shm.h> | ||
@@ -420,10 +419,6 @@ size_t getMemAvailable() { | ||
} | ||
|
||
void printExceptionStackTraces() { | ||
- auto exceptions = folly::exception_tracer::getCurrentExceptions(); | ||
- for (auto& exc : exceptions) { | ||
- std::cerr << exc << std::endl; | ||
- } | ||
} | ||
|
||
} // namespace util | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO facebook/CacheLib | ||
REF "v${VERSION}" | ||
SHA512 53f2eb4de0d1c5d4184d7e1d8ceb958625d9426eebaf434227179c9b2a6ed3a3bf063758f86c2e517ca910556230a764bfd54890dc718c2f45aec1d5a806788c | ||
HEAD_REF master | ||
PATCHES | ||
fix-build.patch | ||
) | ||
|
||
FIND_PATH(NUMA_INCLUDE_DIR NAME numa.h | ||
PATHS ENV NUMA_ROOT | ||
HINTS "$ENV{HOME}/local/include" /opt/local/include /usr/local/include /usr/include | ||
) | ||
|
||
IF (NOT NUMA_INCLUDE_DIR) | ||
MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)") | ||
ENDIF () | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}/cachelib" | ||
OPTIONS | ||
-DBUILD_TESTS=OFF | ||
-DCMAKE_INSTALL_DIR=share/cachelib | ||
) | ||
|
||
vcpkg_cmake_install() | ||
vcpkg_cmake_config_fixup(CONFIG_PATH share/cachelib PACKAGE_NAME cachelib) | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") | ||
endif() | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") | ||
|
||
vcpkg_fixup_pkgconfig() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "cachelib", | ||
"version-string": "2023.02.27.00", | ||
"description": "facebook cachelib", | ||
"homepage": "https://github.com/facebook/CacheLib", | ||
"license": "Apache-2.0", | ||
"supports": "linux & x64 & static", | ||
"dependencies": [ | ||
"fbthrift", | ||
"fizz", | ||
"fmt", | ||
"folly", | ||
"gflags", | ||
"glog", | ||
"gtest", | ||
"tsl-sparse-map", | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
}, | ||
"wangle" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "0311771f0b688e0ff8ffd3c6d297dfbbf43dfd33", | ||
"version-string": "2023.02.27.00", | ||
"port-version": 0 | ||
} | ||
] | ||
} |