summaryrefslogtreecommitdiffstats
path: root/cli/src/cli.c
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2013-02-16 22:51:10 +0530
committerAnand Avati <avati@redhat.com>2013-02-17 16:55:37 -0800
commitfc501a57bc595ec1d65fa466cfd7d34f28f2012b (patch)
tree1fb687c25ce4c249f2fe02e17e8e2ac776e16e3e /cli/src/cli.c
parentfcc230c99dd7318c2bee54beaa152b5a8c66f186 (diff)
Better mechanism to handle memory accounting
Memory accounting will now be enabled if: 1) Any glusterfs process is spawned with argument --mem-accounting. 2) DEBUG is defined. Change-Id: I3345e114127a57ce61916be0e2c4e0049a4c3432 BUG: 834465 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/4523 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'cli/src/cli.c')
-rw-r--r--cli/src/cli.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 082ba67c0e2..37015c33d35 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -572,7 +572,9 @@ main (int argc, char *argv[])
if (!ctx)
return ENOMEM;
+#ifdef DEBUG
gf_mem_acct_enable_set (ctx);
+#endif
ret = glusterfs_globals_init (ctx);
if (ret)