diff --git a/core/tiny_fastcache.h b/core/tiny_fastcache.h index 36b604ad..2fa9f011 100644 --- a/core/tiny_fastcache.h +++ b/core/tiny_fastcache.h @@ -67,12 +67,16 @@ static inline uint64_t tiny_fast_rdtsc(void) { return 0; } extern int g_profile_enabled; static inline int tiny_fast_profile_enabled(void) { +#if !HAKMEM_BUILD_RELEASE extern int g_profile_enabled; if (__builtin_expect(g_profile_enabled == -1, 0)) { const char* env = getenv("HAKMEM_TINY_PROFILE"); g_profile_enabled = (env && *env && *env != '0') ? 1 : 0; } return g_profile_enabled; +#else + return 0; +#endif } // ========== Size to Class Mapping ==========