From: Radoslaw Zarzynski Date: Wed, 5 Dec 2018 07:56:14 +0000 (+0100) Subject: compression: instrumentate XXX_Supported() to verify algorithms' statuses. X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d1d64ca9968f43955d8163893a3d6df28b4ff4c4;p=rocksdb.git compression: instrumentate XXX_Supported() to verify algorithms' statuses. Signed-off-by: Radoslaw Zarzynski --- diff --git a/util/compression.h b/util/compression.h index c3c3d79f..d2455fbc 100644 --- a/util/compression.h +++ b/util/compression.h @@ -43,42 +43,42 @@ namespace rocksdb { -inline bool Snappy_Supported() { +static bool __attribute__((noinline)) Snappy_Supported() { #ifdef SNAPPY return true; #endif return false; } -inline bool Zlib_Supported() { +static bool __attribute__((noinline)) Zlib_Supported() { #ifdef ZLIB return true; #endif return false; } -inline bool BZip2_Supported() { +static bool __attribute__((noinline)) BZip2_Supported() { #ifdef BZIP2 return true; #endif return false; } -inline bool LZ4_Supported() { +static bool __attribute__((noinline)) LZ4_Supported() { #ifdef LZ4 return true; #endif return false; } -inline bool XPRESS_Supported() { +static bool __attribute__((noinline)) XPRESS_Supported() { #ifdef XPRESS return true; #endif return false; } -inline bool ZSTD_Supported() { +static bool __attribute__((noinline)) ZSTD_Supported() { #ifdef ZSTD // ZSTD format is finalized since version 0.8.0. return (ZSTD_versionNumber() >= 800); @@ -86,14 +86,14 @@ inline bool ZSTD_Supported() { return false; } -inline bool ZSTDNotFinal_Supported() { +static bool __attribute__((noinline)) ZSTDNotFinal_Supported() { #ifdef ZSTD return true; #endif return false; } -inline bool CompressionTypeSupported(CompressionType compression_type) { +static bool __attribute__((noinline)) CompressionTypeSupported(CompressionType compression_type) { switch (compression_type) { case kNoCompression: return true;