]> git.saurik.com Git - redis.git/commitdiff
reports if tcmalloc is in used in INFO output
authorantirez <antirez@gmail.com>
Thu, 21 Oct 2010 22:10:17 +0000 (00:10 +0200)
committerantirez <antirez@gmail.com>
Thu, 21 Oct 2010 22:10:17 +0000 (00:10 +0200)
src/Makefile
src/redis.c

index dd18b2c70af860c69004084a3bde87117d09d37a..e99a18a5b582161a68383592cb79cc343696b214 100644 (file)
@@ -15,6 +15,7 @@ endif
 
 ifeq ($(USE_TCMALLOC),yes)
   CCLINK+= -ltcmalloc
+  CCFLAGS+= -DUSE_TCMALLOC
 endif
 CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF)
 DEBUG?= -g -rdynamic -ggdb 
index f3cf100e9ee6a662cf7113d015e625c7a9b2c151..7749cb902227d262f86f63e070b6e6b0224c1e73 100644 (file)
@@ -1185,6 +1185,7 @@ sds genRedisInfoString(void) {
         "used_memory:%zu\r\n"
         "used_memory_human:%s\r\n"
         "mem_fragmentation_ratio:%.2f\r\n"
+        "use_tcmalloc:%d\r\n"
         "changes_since_last_save:%lld\r\n"
         "bgsave_in_progress:%d\r\n"
         "last_save_time:%ld\r\n"
@@ -1219,6 +1220,11 @@ sds genRedisInfoString(void) {
         zmalloc_used_memory(),
         hmem,
         zmalloc_get_fragmentation_ratio(),
+#ifdef USE_TCMALLOC
+        1,
+#else
+        0,
+#endif
         server.dirty,
         server.bgsavechildpid != -1,
         server.lastsave,