summaryrefslogtreecommitdiffstats
path: root/jemalloc/src
diff options
context:
space:
mode:
authorJason Evans <je@facebook.com>2010-04-09 02:14:51 (GMT)
committerJason Evans <je@facebook.com>2010-04-09 02:14:51 (GMT)
commit68f91893bdc19d009497810c8b945991e1489e71 (patch)
tree6a8267d2138bb26a9f2effb8c021aae035abfb7b /jemalloc/src
parent3395860921f80788d1daa8b767e7989ea175ca9e (diff)
downloadjemalloc-68f91893bdc19d009497810c8b945991e1489e71.zip
jemalloc-68f91893bdc19d009497810c8b945991e1489e71.tar.gz
jemalloc-68f91893bdc19d009497810c8b945991e1489e71.tar.bz2
Fix P/p reporting in stats_print().
Now that JEMALLOC_OPTIONS=P isn't the only way to cause stats_print() to be called, opt_stats_print must actually be checked when reporting the state of the P/p option.
Diffstat (limited to 'jemalloc/src')
-rw-r--r--jemalloc/src/stats.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/jemalloc/src/stats.c b/jemalloc/src/stats.c
index 0c3b8f2..9dc7529 100644
--- a/jemalloc/src/stats.c
+++ b/jemalloc/src/stats.c
@@ -466,7 +466,9 @@ stats_print(void (*write_cb)(void *, const char *), void *cbopaque,
if ((err = JEMALLOC_P(mallctl)("opt.overcommit", &bv, &bsz,
NULL, 0)) == 0)
write_cb(cbopaque, bv ? "O" : "o");
- write_cb(cbopaque, "P");
+ if ((err = JEMALLOC_P(mallctl)("opt.stats_print", &bv, &bsz,
+ NULL, 0)) == 0)
+ write_cb(cbopaque, bv ? "P" : "p");
if ((err = JEMALLOC_P(mallctl)("opt.prof_udump", &bv, &bsz,
NULL, 0)) == 0)
write_cb(cbopaque, bv ? "U" : "u");