]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
compression: instrumentate XXX_Supported() to verify algorithms' statuses.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 5 Dec 2018 07:56:14 +0000 (08:56 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 5 Dec 2018 07:56:14 +0000 (08:56 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
util/compression.h

index c3c3d79ff7ac9b76ad4b9fbe0671b02e0b37d748..d2455fbcd702752def73cecbc42dc3fc422d3e88 100644 (file)
 
 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;