zstd_stats.h included only in debug mode

This commit is contained in:
inikep
2016-05-24 15:36:37 +02:00
parent a1653fbfd0
commit fb5df613cf
4 changed files with 18 additions and 72 deletions
+11 -1
View File
@@ -201,6 +201,16 @@ typedef struct {
U32 rep[ZSTD_REP_INIT];
} ZSTD_optimal_t;
#if ZSTD_OPT_DEBUG == 3
#include ".debug/zstd_stats.h"
#else
struct ZSTD_stats_s { U32 unused; };
MEM_STATIC void ZSTD_statsPrint(ZSTD_stats_t* stats, U32 searchLength) { (void)stats; (void)searchLength; }
MEM_STATIC void ZSTD_statsInit(ZSTD_stats_t* stats) { (void)stats; }
MEM_STATIC void ZSTD_statsResetFreqs(ZSTD_stats_t* stats) { (void)stats; }
MEM_STATIC void ZSTD_statsUpdatePrices(ZSTD_stats_t* stats, size_t litLength, const BYTE* literals, size_t offset, size_t matchLength) { (void)stats; (void)litLength; (void)literals; (void)offset; (void)matchLength; }
#endif // #if ZSTD_OPT_DEBUG == 3
typedef struct {
void* buffer;
U32* offsetStart;
@@ -237,7 +247,7 @@ typedef struct {
U32 cachedPrice;
U32 cachedLitLength;
const BYTE* cachedLiterals;
ZSTD_stats_t* stats;
ZSTD_stats_t stats;
} seqStore_t;
const seqStore_t* ZSTD_getSeqStore(const ZSTD_CCtx* ctx);